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 32374 - Problems using javax.swing.Action and not SystemAction
Summary: Problems using javax.swing.Action and not SystemAction
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks: 27868
  Show dependency tree
 
Reported: 2003-03-26 21:43 UTC by Jesse Glick
Modified: 2008-12-22 22:01 UTC (History)
2 users (show)

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 Jesse Glick 2003-03-26 21:43:38 UTC
Some problems I uncovered with using plain Action:

- any ampersand from a mnemonic (*) is kept in the
popup menu used in the Explorer, should be stripped

- if it has no icon added to a menu, it is not
padded with a blank space (like SystemAction is)
to make left alignment work

- creating a new action instance in
getActions(boolean) rather than caching it from
call to call causes the action to be silently
omitted from the popup menu

- looks bad in Options dialog under Actions etc.
(wrong name and icon)

- not correctly handled in Keyboard Shortcuts dialog

- Explorer views do not check Node.preferredAction

(*) Yes I know about Action.MNEMONIC_KEY. However
it is not enough for us. See BT #4838135 for
explanation.

Also unsolvable given that DataLoader.actions is
of type SystemAction[] and we probably will not
change that:

- cannot be added to context menu of an object
type using context actions customizer
Comment 1 Jesse Glick 2003-03-26 21:44:25 UTC
Solved well enough for RefreshAllFilesystemsAction to work as an
AbstractAction.
Comment 2 Jesse Glick 2003-03-26 23:55:25 UTC
committed   * Up-To-Date  1.33       
core/src/org/netbeans/core/ActionsPanel.java
committed   * Up-To-Date  1.13       
core/src/org/netbeans/core/ShortcutsFolder.java
committed   * Up-To-Date  1.85       
openide/src/org/openide/awt/Actions.java
committed   * Up-To-Date  1.64       
openide/src/org/openide/explorer/view/ListView.java
committed   * Up-To-Date  1.50       
openide/src/org/openide/explorer/view/MenuView.java
committed   * Up-To-Date  1.43       
openide/src/org/openide/explorer/view/TreeTableView.java
committed   * Up-To-Date  1.130      
openide/src/org/openide/explorer/view/TreeView.java
committed   * Up-To-Date  1.81       
openide/src/org/openide/loaders/DataNode.java
committed   * Up-To-Date  1.30       
openide/src/org/openide/loaders/InstanceNode.java
committed   * Up-To-Date  1.61       
openide/src/org/openide/nodes/AbstractNode.java
committed   * Up-To-Date  1.70       
openide/src/org/openide/nodes/Node.java
committed   * Up-To-Date  1.41       
openide/src/org/openide/nodes/NodeOp.java
committed   * Up-To-Date  1.129      
openide/src/org/openide/util/Utilities.java
committed   * Up-To-Date  1.4        
openide/test/unit/src/org/openide/nodes/NodeOpTest.java
committed   * Up-To-Date  1.4        
openide/test/unit/src/org/openide/util/UtilitiesActionsTest.java
Comment 3 Jan Chalupa 2003-04-17 11:41:11 UTC
It's not clear to me whether there is any user visible impact of this
bug in the current NB 3.5 (resp. S1S5) builds. In other words, is
Jesse's fix worth integrating into release35?
Comment 4 Jesse Glick 2003-04-18 18:00:28 UTC
There should not be any user-visible impact in r35. If a module
developer creates some code with a UI that relies on the
javax.swing.Action-based code in Node to work, they will probably be
disappointed. No distributed code in r35 that I know of does rely on
this. So I think it can be waived and left in 4.0 only, unless someone
feels strongly that supporting new Action's in 3.5 is a real goal.

See also issue #32744, issue #33038.
Comment 5 pzajac 2004-02-25 14:50:17 UTC
verified