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 197789 - add menuText and popupText to ActionRegistration
Summary: add menuText and popupText to ActionRegistration
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 7.0.1
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks: 196290
  Show dependency tree
 
Reported: 2011-04-15 13:54 UTC by Tomas Stupka
Modified: 2011-06-02 20:03 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
api change and test (5.79 KB, patch)
2011-04-15 14:06 UTC, Tomas Stupka
Details | Diff
fixed Y01 and Y02 (6.21 KB, patch)
2011-04-18 08:35 UTC, Tomas Stupka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Stupka 2011-04-15 13:54:45 UTC
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
Comment 1 Tomas Stupka 2011-04-15 14:06:34 UTC
Created attachment 107774 [details]
api change and test
Comment 2 Jaroslav Tulach 2011-04-15 18:02:16 UTC
Y01 <description/> content is wrong.
Y02 You may also assert that action.getValue(NAME) is correct.

Otherwise OK, thanks for your contribution.
Comment 3 Tomas Stupka 2011-04-18 08:35:14 UTC
Created attachment 107808 [details]
fixed Y01 and Y02
Comment 4 Jesse Glick 2011-05-24 17:08:48 UTC
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());
Comment 5 Tomas Stupka 2011-05-25 10:15:58 UTC
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
Comment 6 Tomas Stupka 2011-05-30 13:30:19 UTC
fixed core-main #4e7a2416f448
Comment 7 Quality Engineering 2011-05-31 19:19:04 UTC
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
Comment 8 Quality Engineering 2011-06-01 13:11:34 UTC
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
Comment 9 Quality Engineering 2011-06-02 20:03:35 UTC
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