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 234245 - DelegateAction.putValue() does not notify PropertyChangeListeners
Summary: DelegateAction.putValue() does not notify PropertyChangeListeners
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 7.3
Hardware: PC Mac OS X
: P3 normal with 1 vote (vote)
Assignee: Jan Peska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-12 02:06 UTC by ebakke
Modified: 2013-08-12 02:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ebakke 2013-08-12 02:06:58 UTC
According to the Javadoc for javax.swing.Action, org.openide.awt.GeneralAction.DelegateAction.putValue() should notify subscribed PropertyChangeListeners whenever a value is changed. This is not currently done; see the implementation of putValue() in the superclass GeneralAction.BaseDelAction.

One example of a problem that results from this is that clients can not reliably listen for changes to the Action.ACCELERATOR_KEY property on an Action using a PropertyChangeListener. If AcceleratorBinding.setAccelerator() is called on an Action, NbKeymap.keyStrokeForAction() will ensure that Action.putValue(Action.ACCELERATOR_KEY, keystroke) is always called whenever the keybinding is changed. Listening for such a change currently works only on non-lazily loaded actions, however, due to the bug described above.