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.
due to changes suggested in http://netbeans.org/bugzilla/show_bug.cgi?id=196290 we need to add the menuText and popupText atributes to ActionRegistration
Created attachment 107774 [details] api change and test
Y01 <description/> content is wrong. Y02 You may also assert that action.getValue(NAME) is correct. Otherwise OK, thanks for your contribution.
Created attachment 107808 [details] fixed Y01 and Y02
Looks good. [JG01] Do not forget to actually increment spec version of openide.awt and use that in apichanges.xml and @since. [JG02] Javadoc for menuText and popupText should most likely just @see #displayName to make it clear what you are providing an alternative to. [JG03] Unit test would be a bit clearer if testPopupText and testMenuText were merged into one method: Action a = (Action) FileUtil.getConfigFile("Actions/menutext/namedaction.instance").getAttribute("instanceCreate"); assertEquals("This is an Action", a.getValue(Action.NAME)); JMenuItem item = new JMenuItem(); Actions.connect(item, a, false); assertEquals("This is a Menu Action", item.getText()); item = new JMenuItem(); Actions.connect(item, a, true); assertEquals("This is a Popup Action", item.getText());
see core-main #a3c71d26e724 branch vcsannotation-196290 > [JG01] Do not forget to actually increment spec version of openide.awt and use > that in apichanges.xml and @since. ok, will do when merging... > [JG02] Javadoc for menuText and popupText should most likely just > @see #displayName > to make it clear what you are providing an alternative to. fixed the javadoc, hope it's clearer now > [JG03] Unit test would be a bit clearer if testPopupText and testMenuText were > merged into one method: done
fixed core-main #4e7a2416f448
Integrated into 'main-golden', will be available in build *201105310954* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/4e7a2416f448 User: Tomas Stupka <tstupka@netbeans.org> Log: issue #197789 - add menuText and popupText to ActionRegistration
Integrated into 'main-golden', will be available in build *201106010401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/4e7a2416f448 User: Tomas Stupka <tstupka@netbeans.org> Log: issue #197789 - add menuText and popupText to ActionRegistration
Integrated into 'main-golden', will be available in build *201106021001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/4e7a2416f448 User: Tomas Stupka <tstupka@netbeans.org> Log: issue #197789 - add menuText and popupText to ActionRegistration