Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Using F3 key with and without JDT
Using F3 key with and without JDT [message #327895] Wed, 07 May 2008 13:35 Go to next message
Eclipse UserFriend
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 #327910 is a reply to message #327895] Thu, 08 May 2008 05:26 Go to previous messageGo to next message
Eclipse UserFriend
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
>
>
>
Re: Using F3 key with and without JDT [message #327924 is a reply to message #327910] Thu, 08 May 2008 10:14 Go to previous messageGo to next message
Eclipse UserFriend
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.

"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
>>
>>
Re: Using F3 key with and without JDT [message #327946 is a reply to message #327924] Fri, 09 May 2008 05:05 Go to previous messageGo to next message
Eclipse UserFriend
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
> "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
>>>
>>>
>>>
>
>
>
Re: Using F3 key with and without JDT [message #328034 is a reply to message #327946] Mon, 12 May 2008 16:47 Go to previous message
Eclipse UserFriend
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
>>>>
>>>>
>>>>
>>
>>
>>
Previous Topic:Suggestion: Syntax Coloring Eclipse 3.4
Next Topic:infocenter as a war
Goto Forum:
  


Current Time: Fri May 09 10:58:57 EDT 2025

Powered by FUDForum. Page generated in 0.04168 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top