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 - Shortcut not shown on Run File action in Java node's popup menu
Summary: Shortcut not shown on Run File action in Java node's popup menu
Status: RESOLVED DUPLICATE of bug 47389
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P4 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords: UI
Depends on:
Blocks: 41535
  Show dependency tree
 
Reported: 2004-06-29 16:09 UTC by Petr Jiricka
Modified: 2004-08-21 17:17 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Aborted attempt at a patch (9.12 KB, patch)
2004-08-10 04:56 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 ***