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.
To accommodate package annotations, javac accepts a package-info.java file. There is no obvious way to create this file in NetBeans. See JLS3: http://java.sun.com/docs/books/jls/third_edition/html/packages.html#7.4.1.1
looks like java file creation wizard problem? Reassigning to java module for evaluation
The java/project handles the wizards for creating the files. I've changed the wizard to allow creation of package-info.java, but the JavaDataObject thorws the following exception from JDO.handleCreateFromTemplate (). java.io.IOException: The specified name is not valid for use in a Java source file: package-info at org.netbeans.modules.java.JavaDataObject.handleCreateFromTemplate(JavaDataObject.java:298) at org.openide.loaders.DataObject$5.run(DataObject.java:713) at org.openide.loaders.DataObjectPool$1WrapAtomicAction.run(DataObjectPool.java:203) This exception has to be fixed before I integrate the undated wizard.
Created attachment 26375 [details] Diff of java/projects
I've attached the diff of java/project which solves the problem of New File Wizard. I am not able to commit it because the JDO problem. When the JDO will be fixed apply the diff. You can simulate the JDO problem by applying the diff and creating new Java Pakckage Info.
You can create JDO as package-info.java now. The rename works too. Fixed in /cvs/java/src/org/netbeans/modules/java/JavaDataObject.java new revision: 1.209; previous revision: 1.208 Honzo B. could you take a look at the refactoring error message? In case of the in-place renaming in the explorer you can rename the file to package-info (Rename without refactoring enabled) but in case of pop-up menu there is just the refactoring rename that blocks the renaming. Maybe a warning message would be fine there.
Is the java fix complete? If so, I am going to integrate the patch.
The JDO fix is complete. The question is if the refactoring module should be changed as well. It definitely does not block your integration.
OK, I am going to integrate the patch.
Now you can create the package-info using the Java Package Info template, but the created file has a wrong package name, the refactoring of the template failed, this should be fixed in the refactoring module. Checking in project/src/org/netbeans/modules/java/project/Bundle.properties; /cvs/java/project/src/org/netbeans/modules/java/project/Bundle.properties,v <-- Bundle.properties new revision: 1.35; previous revision: 1.34 done Checking in project/src/org/netbeans/modules/java/project/JavaTargetChooserPanel.java; /cvs/java/project/src/org/netbeans/modules/java/project/JavaTargetChooserPanel.java,v <-- JavaTargetChooserPanel.java new revision: 1.26; previous revision: 1.25 done Checking in project/src/org/netbeans/modules/java/project/JavaTargetChooserPanelGUI.form; /cvs/java/project/src/org/netbeans/modules/java/project/JavaTargetChooserPanelGUI.form,v <-- JavaTargetChooserPanelGUI.form new revision: 1.10; previous revision: 1.9 done Checking in project/src/org/netbeans/modules/java/project/JavaTargetChooserPanelGUI.java; /cvs/java/project/src/org/netbeans/modules/java/project/JavaTargetChooserPanelGUI.java,v <-- JavaTargetChooserPanelGUI.java new revision: 1.26; previous revision: 1.25 done Checking in 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.17; previous revision: 1.16 done Checking in project/src/org/netbeans/modules/java/project/layer.xml; /cvs/java/project/src/org/netbeans/modules/java/project/layer.xml,v <-- layer.xml new revision: 1.21; previous revision: 1.20 done RCS file: /cvs/java/project/src/org/netbeans/modules/java/project/resources/package-info.html,v done Checking in project/src/org/netbeans/modules/java/project/resources/package-info.html; /cvs/java/project/src/org/netbeans/modules/java/project/resources/package-info.html,v <-- package-info.html initial revision: 1.1 done RCS file: /cvs/java/project/src/org/netbeans/modules/java/project/resources/package-info.template,v done Checking in project/src/org/netbeans/modules/java/project/resources/package-info.template; /cvs/java/project/src/org/netbeans/modules/java/project/resources/package-info.template,v <-- package-info.template initial revision: 1.1 done Checking in project/src/org/netbeans/spi/java/project/support/ui/templates/JavaTemplates.java; /cvs/java/project/src/org/netbeans/spi/java/project/support/ui/templates/JavaTemplates.java,v <-- JavaTemplates.java new revision: 1.16; previous revision: 1.15 done
Checking in JavaDataObject.java; /cvs/java/src/org/netbeans/modules/java/JavaDataObject.java,v <-- JavaDataObject.java new revision: 1.210; previous revision: 1.209 done
*** Bug 73356 has been marked as a duplicate of this bug. ***