Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312556

Summary: [actions] cannot bind keyboard shortcut to "Use as Source Folder" command (and other buildpath actions)
Product: [Eclipse Project] JDT Reporter: heekyu <heekyu83>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: markus.kell.r
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description heekyu CLA 2010-05-12 05:25:32 EDT
Build Identifier: 20100218-1602

I can add selected folders to source folder along with
right click -> Build Path -> Use as Source Path.
I want to do this action with keyboard shortcut, but there is no way to assign a key to this command.
I looked into related source codes a little of time.
It seems to be able to assign keys to commands which are configured with "org.eclipse.ui.commands" extension point. "Use as Source Path" is not a command of this type and so cannot assign key bindings.

I want to know whether my analysis is correct and get solution or workaround.

I'll be waiting your answer.
Thank you.

Reproducible: Always

Steps to Reproduce:
1. explained all in Details
Comment 1 Markus Keller CLA 2010-05-12 06:46:30 EDT
Yes, we currently don't have commands for all the build path actions from GenerateBuildPathActionGroup.

Fix would be to define them in the plugin.xml, add constants to IJavaEditorActionDefinitionIds, and set the command ids via Action#setActionDefinitionId(String).
Comment 2 heekyu CLA 2010-05-12 07:11:59 EDT
OK, I understood totally.
Thank you for your kind answer.
If plan to fix the code according to your comments, it will be helpful that add comments about that in this Issue.