Using F3 key with and without JDT [message #327895] |
Wed, 07 May 2008 13:35  |
Eclipse User |
|
|
|
I have written a graphical editor, and now I am wondering how I could use
the F3 key to open source files from a context menu within that editor. The
JDT is has defined this key already, so I can use their command's
definitionId when I define my action in the org.eclipse.ui.popupMenus
extension point. The problem is that my editor should be independent of the
JDT. When I try to define my own command and key to use when JDT is not
around, they collide with the JDT's definitions when JDT is there. Is there
any way I can resolve this and have my editor work with and without JDT?
Thanks, Felix
|
|
|
|
|
|
Re: Using F3 key with and without JDT [message #328034 is a reply to message #327946] |
Mon, 12 May 2008 16:47  |
Eclipse User |
|
|
|
Daniel Megert wrote [2008-05-09 11:05]:
> Felix L J Mayer wrote:
>> They collide because the F3 key binding has already been defined by
>> the JDT. This has nothing to do with the commands themselves. The
>> problem is that with JDT present, I need to retarget the F3 key
>> binding, while without JDT I need to define the key binding myself.
>>
> Simply define your own command (in different scope than JDT) and key
> binding. Then always retarget your command.
>
> Dani
F3 is bound in the "In Window" scope to the command by JDT. This is not
a proper solution for a multilanguage IDE (it should be in Platform or
bound to Java scopes).
Felix, you have to bind your command in a more special scope for your
language, then it overwrites the binding of JDT (as example you can look
in definitions of CDT).
Teddy
>> "Daniel Megert" <daniel_megert@ch.ibm.com> wrote in message
>> news:fvuh0e$jqh$2@build.eclipse.org...
>>
>>> Felix L J Mayer wrote:
>>>
>>>> I have written a graphical editor, and now I am wondering how I
>>>> could use the F3 key to open source files from a context menu within
>>>> that editor. The JDT is has defined this key already, so I can use
>>>> their command's definitionId when I define my action in the
>>>> org.eclipse.ui.popupMenus extension point. The problem is that my
>>>> editor should be independent of the JDT. When I try to define my own
>>>> command and key to use when JDT is not around, they collide with the
>>>> JDT's definitions when JDT is there.
>>>>
>>> Why do they collide? Make sure not to use the same ID when defining
>>> the command.
>>>
>>> Dani
>>>
>>>> Is there any way I can resolve this and have my editor work with
>>>> and without JDT?
>>>>
>>>> Thanks, Felix
>>>>
>>>>
>>>>
>>
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.04168 seconds