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.
See issue #140443 for background; need a way to communicate that an "action" is just a placeholder for a presenter or can only be used context-sensitively. Suggested solutions included a special PHONY_ACTION boolean key and a special PhonyActionException.
Rather than this, provide default, fallback implementation. In case of bug 140443, open a dialog and let user choose which configuration to use. Code like this will make your actions more accessible.
No one is going to write such a dialog, and it is not needed because the action already has multiple, accessible presentations. All that is needed is to ensure that Quick Search and the Keymaps customizer do not offer it as a regular action.
*** Bug 203757 has been marked as a duplicate of this bug. ***
Geertjan was also asking for a way to use @ActionRegistration to register something that just has, say, a toolbar presenter. Currently you cannot: you have to implement Action (or extend AbstractAction) and either throw an error or silently do nothing if and when a misled user triggers actionPerformed.
*** Bug 204065 has been marked as a duplicate of this bug. ***
1. Everyone can provide its own presenter. 2. Each action should, in my opinion, have a fallback implementation when invoked directly #1 improves user experience and #2 improves accessibility.