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.
When I add some action folder in annotation XML file, as described at http://www.netbeans.org/download/dev/javadoc/org-openide-text/org/openide/text/doc-files/api.html#auto-ann the actions defined in that folder are not tested for whether they are enabled or not. Therefore they are always displayed, even when they can not be actually performed.
Should be fixed into 4.2, the fix is trivial, please review... Index: Annotations.java =================================================================== RCS file: /cvs/editor/libsrc/org/netbeans/editor/Annotations.java,v retrieving revision 1.23 diff -u -r1.23 Annotations.java --- Annotations.java 18 Aug 2004 17:22:15 -0000 1.23 +++ Annotations.java 27 May 2005 16:09:37 -0000 @@ -699,8 +699,11 @@ actions = type.getActions(); if (actions != null) { subMenu = new JMenu(type.getDescription()); - for (int j=0; j<actions.length; j++) - subMenu.add(createMenuItem(actions[j], kit)); + for (int j=0; j<actions.length; j++) { + if (actions[j].isEnabled()) { + subMenu.add(createMenuItem(actions[j], kit)); + } + } if (separator) { separator = false; //pm.addSeparator();
Assuming that the change is O.K. since there was no response. Committing...
Fixed in trunk: /cvs/editor/libsrc/org/netbeans/editor/Annotations.java,v <-- Annotations.java new revision: 1.25; previous revision: 1.24