This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 42870 - New File wizard, not iterator impl, should open created files
Summary: New File wizard, not iterator impl, should open created files
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks: 41535
  Show dependency tree
 
Reported: 2004-05-05 19:50 UTC by Jesse Glick
Modified: 2006-03-24 10:16 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
only draft, not final (15.40 KB, patch)
2004-05-09 23:34 UTC, Jiri Rechtacek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-05-05 19:50:39 UTC
There is no point in having a return value of
InstantiatingIterator at all if you are not going
to use it...

See my last comment in issue #40894, not yet
addressed.
Comment 1 Jiri Rechtacek 2004-05-09 23:34:42 UTC
Created attachment 14774 [details]
only draft, not final
Comment 2 Jesse Glick 2004-05-10 01:29:26 UTC
In NewProject.java:

+                                // open main class in editor
+                                FileObject mainFO = getMainClassFO
(getSourcesRoot (p), "com.myapp.Test");

is presumably there by accident. Delete it and the gMCFO method - the
wizard impl should return the main class if it made one. Delete the
getSourcesRoot method too.

Very confusing to name the FileObject prjDirFO but then actually
handle the case that it is not a project dir (or a dir at all). Give
the var a more neutral name.

Please run DataObject.getNodeDelegate in EQ.

NewJ2SEPWI.java:

  mainClass = mainClass.replace ('.', File.separatorChar);

is wrong; use '/' (passed to FO.gFO). Also I am not sure you can use a
/-separared path in the two-arg version of getFileObject; construct
the full path (+ ".java") just to be sure.
Comment 3 Jiri Rechtacek 2004-05-10 14:07:40 UTC
fixed

Checking in
java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/wizards/NewJ2SEProjectWizardIterator.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/wizards/NewJ2SEProjectWizardIterator.java,v
 <--  NewJ2SEProjectWizardIterator.java
new revision: 1.6; previous revision: 1.5
done
Processing log script arguments...
More commits to come...
Checking in
java/project/src/org/netbeans/modules/java/project/NewJavaFileWizardIterator.java;
/cvs/java/project/src/org/netbeans/modules/java/project/NewJavaFileWizardIterator.java,v
 <--  NewJavaFileWizardIterator.java
new revision: 1.7; previous revision: 1.6
done
Processing log script arguments...
More commits to come...
Checking in
projects/projectui/src/org/netbeans/modules/project/ui/NewFileWizard.java;
/cvs/projects/projectui/src/org/netbeans/modules/project/ui/NewFileWizard.java,v
 <--  NewFileWizard.java
new revision: 1.8; previous revision: 1.7
done
RCS file:
/cvs/projects/projectui/src/org/netbeans/modules/project/ui/NewProjectWizard.java,v
done
Checking in
projects/projectui/src/org/netbeans/modules/project/ui/NewProjectWizard.java;
/cvs/projects/projectui/src/org/netbeans/modules/project/ui/NewProjectWizard.java,v
 <--  NewProjectWizard.java
initial revision: 1.1
done
Processing log script arguments...
More commits to come...
Checking in
projects/projectui/src/org/netbeans/modules/project/ui/actions/NewFile.java;
/cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/NewFile.java,v
 <--  NewFile.java
new revision: 1.5; previous revision: 1.4
done
Checking in
projects/projectui/src/org/netbeans/modules/project/ui/actions/NewProject.java;
/cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/NewProject.java,v
 <--  NewProject.java
new revision: 1.4; previous revision: 1.3
done
Comment 4 Marian Mirilovic 2005-12-20 15:52:33 UTC
This issue was solved long time ago. Because nobody has reopened it neither
added comments, we are verifying/closing it now. 
If you are still able to reproduce the problem, please reopen. Thanks in advance.