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 - Means of marking an action as placeholder
Summary: Means of marking an action as placeholder
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: API
: 203757 204065 (view as bug list)
Depends on:
Blocks: 71280 140443
  Show dependency tree
 
Reported: 2008-08-27 15:33 UTC by Jesse Glick
Modified: 2012-06-20 14:27 UTC (History)
3 users (show)

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 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.