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 45688

Summary: Shortcut not shown on Run File action in Java node's popup menu
Product: java Reporter: Petr Jiricka <pjiricka>
Component: ProjectAssignee: Petr Hrebejk <phrebejk>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: jglick
Priority: P4 Keywords: UI
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 41535    
Attachments: Aborted attempt at a patch

Description Petr Jiricka 2004-06-29 16:09:14 UTC
1. Create a Java application project with main class
2. Right click on the main class that was created
3. The popup menu has action Run File. This action
has shortcut Shift-F6, which is the same as Run ->
Run Other -> Run "Main.java" in the main menu. 

Shortcut Shift-F6 should be shown next to the Run
File action is the file's popup menu. Same for
Debug File.
Comment 1 Jan Becicka 2004-08-04 14:08:38 UTC
"Run File" is registered by java/project.
Comment 2 Jesse Glick 2004-08-10 04:55:18 UTC
I tried for a while to fix this, without success. Will attach the
current state of my efforts.

Clearly the wrapper actions need to delegate to the originals declared
in the projectui layer, so as to get the accelerator registered to
them by ShortcutsFolder. However it seems that this is null even with
that change, and I am not sure why.

Also I am not sure if calling
ActionWrapper.putProperty(ACCELERATOR_KEY,acc) will do anything;
probably the context menu item delegates to the context sensitive
action for its appearance. If so, AcceleratorWrapper will need to be
uncommented and used instead of AW.putProperty.
Comment 3 Jesse Glick 2004-08-10 04:56:36 UTC
Created attachment 16712 [details]
Aborted attempt at a patch
Comment 4 Petr Jiricka 2004-08-10 10:17:52 UTC
Would it make sense to just use the same action in both the popup menu
and the main menu, and get rid of the wrapper/delegator mechanism
alltogether? Would that help?
Comment 5 Jesse Glick 2004-08-10 17:30:46 UTC
Can't. DataLoader.actions is of type SystemAction[], whereas the
original actions are not of type SystemAction.
Comment 6 Petr Hrebejk 2004-08-21 12:03:15 UTC

*** This issue has been marked as a duplicate of 47389 ***