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 145314

Summary: Means of marking an action as placeholder
Product: platform Reporter: Jesse Glick <jglick>
Component: ActionsAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED WONTFIX    
Severity: blocker CC: geertjan, jtulach, nymo
Priority: P2 Keywords: API
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 71280, 140443    

Description Jesse Glick 2008-08-27 15:33:17 UTC
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.
Comment 1 Jaroslav Tulach 2010-10-13 11:45:07 UTC
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.
Comment 2 Jesse Glick 2010-10-13 16:25:17 UTC
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.
Comment 3 Jesse Glick 2011-10-31 00:43:44 UTC
*** Bug 203757 has been marked as a duplicate of this bug. ***
Comment 4 Jesse Glick 2011-10-31 00:48:15 UTC
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.
Comment 5 Jesse Glick 2011-11-07 23:03:17 UTC
*** Bug 204065 has been marked as a duplicate of this bug. ***
Comment 6 Jaroslav Tulach 2012-06-20 14:27:04 UTC
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.