Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Problems regarding the mapping of key bindings with the EMF Model(Have switched my application from my previous RCP plugin to EMF, key bindings dont work as it used to in the former( code written in the same manner i.e. defining extensions and action classes).)
Problems regarding the mapping of key bindings with the EMF Model [message #508515] Tue, 19 January 2010 09:52 Go to next message
Rahul is currently offline RahulFriend
Messages: 13
Registered: July 2009
Location: India
Junior Member
The plugin XML i am currently using is the following, this was working fine in RCP :-

<extension
point="org.eclipse.ui.bindings">
<key
commandId="com.myproj.commands.playOrStopAudio"
contextId="com.myproj.contexts.speechmarker"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="CTRL+SPACE">
</key>
</extension>

<extension
point="org.eclipse.ui.commands">
<category
id="com.myprj.commands.category.telisma"
name="some name">
</category>
<command
categoryId="com.myproj.commands.category.telisma"
id="com.myproj.commands.playOrStopAudio"
name="Play/Stop Audio">
</command>
</extension>

<extension
point="org.eclipse.ui.editorActions">
<editorContribution
id="com.telisma.sca.editorActions.spmEditorContribution"
targetID="com.myproj.AgEditorID">
<action
class="com.myproj.action.PlayOrStopAudioEditorActionDelegate "
definitionId="com.myproj.commands.playOrStopAudio"
id="com.myproj.editorActions.playOrStopAudio"
label="Play/Stop Audio">
</action>
</editorContribution>
</extension>

<extension point="org.eclipse.ui.editors">
<editor
id="com.myproj.AgEditorID"
name="%_UI_AgEditor_label"
icon="icons/full/obj16/AgModelFile.gif"
extensions="ag"
class="com.myproj.AgEditor"
contributorClass="com.myproj.AgActionBarContributor">
</editor>
</extension>




the action classes are working perfectly fine when called by a menu command and effects the emf model, but the key bindings dont have any such effect as the action itself is not called.

Please provide a solution as how to associate key bindings with the workbench commands(i.e. actions). I have also read somewhere that workbench commands were intoduced only in Eclipse v3.1, this doesnt seem to be a problem as we use latest EMF v3.5. Any help provided will be deeply appreciated.

Thanks in advance
Rahul
Re: Problems regarding the mapping of key bindings with the EMF Model [message #508605 is a reply to message #508515] Tue, 19 January 2010 15:36 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30653
Registered: July 2009
Senior Member
Rahul,

I know nothing about how key bindings work. Perhaps you're registering
one that's a conflict. In the preferences one can bind keys dynamically
so maybe have a look if you can control it there...

Rahul wrote:
> The plugin XML i am currently using is the following, this was working
> fine in RCP :-
>
> <extension
> point="org.eclipse.ui.bindings">
> <key
> commandId="com.myproj.commands.playOrStopAudio"
> contextId="com.myproj.contexts.speechmarker"
> schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
> sequence="CTRL+SPACE">
> </key>
> </extension>
>
> <extension
> point="org.eclipse.ui.commands">
> <category
> id="com.myprj.commands.category.telisma"
> name="some name">
> </category>
> <command
> categoryId="com.myproj.commands.category.telisma"
> id="com.myproj.commands.playOrStopAudio"
> name="Play/Stop Audio">
> </command>
> </extension>
>
> <extension
> point="org.eclipse.ui.editorActions">
> <editorContribution
> id="com.telisma.sca.editorActions.spmEditorContribution"
> targetID="com.myproj.AgEditorID">
> <action
>
> class="com.myproj.action.PlayOrStopAudioEditorActionDelegate "
> definitionId="com.myproj.commands.playOrStopAudio"
> id="com.myproj.editorActions.playOrStopAudio"
> label="Play/Stop Audio">
> </action>
> </editorContribution>
> </extension>
>
> <extension point="org.eclipse.ui.editors">
> <editor
> id="com.myproj.AgEditorID"
> name="%_UI_AgEditor_label"
> icon="icons/full/obj16/AgModelFile.gif"
> extensions="ag"
> class="com.myproj.AgEditor"
> contributorClass="com.myproj.AgActionBarContributor">
> </editor>
> </extension>
>
>
>
>
> the action classes are working perfectly fine when called by a menu
> command and effects the emf model, but the key bindings dont have any
> such effect as the action itself is not called.
>
> Please provide a solution as how to associate key bindings with the
> workbench commands(i.e. actions). I have also read somewhere that
> workbench commands were intoduced only in Eclipse v3.1, this doesnt
> seem to be a problem as we use latest EMF v3.5. Any help provided will
> be deeply appreciated.
>
> Thanks in advance
> Rahul
>
Previous Topic:Using MyItemProvider commands in my editors
Next Topic:Problem in opening an editor in a multipage editor from a table
Goto Forum:
  


Current Time: Sat Nov 23 03:26:28 GMT 2019

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

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

Back to the top