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 222389 - ActionRegistration should be able override label and icon
Summary: ActionRegistration should be able override label and icon
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 7.2.1
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-19 13:59 UTC by _ wadechandler
Modified: 2013-01-03 14:47 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ wadechandler 2012-11-19 13:59:47 UTC
Given an extension of AbstractAction where one has not used putValue to set icons and labels, the ActionRegistration annotation should/could override those values. Currently I have an instance which I need to extend AbstractAction because I need this action to enable and disable based on various information some in the lookup and some bound to external events such as services coming and going on the network. Everything works as expected except for the displayName and iconBase attributes of the annotation are not used and instead the actions values are used. I feel ActionRegistration should override those values and help me bind that into NB better. For instance, NB lets one point to the iconBase and derives other icons for me based on their naming like the regular NB IDE actions have done. Now, I need to set both icons myself. This affects the speed at which one can throw an app together.
Comment 1 Jaroslav Tulach 2013-01-03 14:47:40 UTC
Your request is contradictory to

a452fab284a5 - jtulach Jul 15, 2008
Always enabled action is "dynamic". As soon as its underlaying action is created, it correctly delegates to it.

But of course I can imagine an API enhancement that would support your request. For example adding following attribute to @ActionRegistration:

String[] staticValues();

which you could use to specify which static values to prefer to dynamic ones. However I don't see huge benefit for such API change and I don't plan to implement it. 

Should you decide to donate an API patch, I am ready to help you go through the API review process.