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.
[ BUILD # : 200409141800 ] [ JDK VERSION : J2SE 1.4.2 ] Opened Project Properties for a Freeform project and changed the target mapping for "Build Project" from "ear" to "make". Next time I called up the context menu for the project node I found a bunch of action names such as "compile.single" mixed with the normal menu items. After inspecting the project.xml file I found that all these actions had automatically been added the <context-menu> section. I'll attach the complete file.
Created attachment 17687 [details] Project file with messed up context menu.
David, whatever code you have to regenerate the context menu seems to not know about context-sensitive actions. They should never be included in the context menu. Gunnar, note that the project properties dialog has a simplified model of the project.xml format, and while it tries to avoid losing hand-edited information, it is best to avoid using the dialog if you have complex edits to project.xml that could not have been made from the GUI, especially in the same areas as are manipulated by the dialog panels you use. For example, in this case you have some hand-edited context-sensitive actions, in the //ide-actions section, then you opened the properties dialog and changed things that could affect both //ide-actions and //view/context-menu. Updating //ide-actions from the GUI is not problematic really, but when action mappings are changed from the GUI, //view/context-menu is partially regenerated (to handle changes you may have made in the GUI). This bug with context-sensitive actions can be fixed, but you may still find that in //view/context-menu (1) all ./action are put after all ./ide-action, regardless of where you had them before, (2) ./separator (if there are any) are just lumped together somewhere. Perhaps a future rewrite of the project.xml modeling code will enable it to be friendlier to manual edits.
I see, will fix that. Re. "but you may still find that in //view/context-menu (1) all ./action are put after all ./ide-action, regardless of where you had them before, (2) ./separator (if there are any) are just lumped together somewhere." - true. The similar case is also //view/items.
Fixed in: src/org/netbeans/modules/ant/freeform/FreeformProjectGenerator.java; new revision: 1.25; previous revision: 1.24 test/unit/src/org/netbeans/modules/ant/freeform/FreeformProjectGeneratorTest.java; new revision: 1.11; previous revision: 1.10
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.