Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RCP shortcut keys! Pls HELP!

 
Benjamin Malebana
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone I have an RCP(Rich Client Platform) Application with different toolBar actions, what I want is to have a shortcut key for each action the toolbar. My actions have been created programatically in .java file not in an xml file.

I have a code but it doesn't respont when a shortcut key assigned to it is pressed.

>>>>>>>>My xml code>>>>>>>>>>>>>>>>

<extension
point="org.eclipse.ui.commands">
<category
id="UserManagementWorkStation.category"
name="User Management Workstation"/>
<command
name="Undo all Modifications"
description="Undo all Modifications"
categoryId="UserManagementWorkStation.category"
id="UserManagementWorkStation.openMessage">
</command>
<keyBinding
commandId="UserManagementWorkStation.openMessage"
description="Add new User"
keyConfigurationId="org.eclipse.ui.defaultAcceleratorConfiguration"
keySequence= "CTRL+N">
</keyBinding>
</extension>
<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>

>>>>>>>>>>>>>>>My Java code>>>>>>>>>>>>>>>>
getViewSite().getKeyBindingService().registerAction(addUserAction);
getViewSite().getActionBars().setGlobalActionHandler(addUserAction.getId(), addUserAction);

The above java code is supposed to register the shortcut key is I am not mistaken.

Please help me guys I can't move from this point. Some people did give advice but its more Swing orientated I want the RCP orientated solution.
[ July 21, 2005: Message edited by: Benjamin Malebana ]
 
Benjamin Malebana
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the shortcut keys working guys thank you. The problem I have just realised was that the CTRL+"ANY KEY" isn't working, then I resorted to Alt+"any key". Maybe its a problem of Eclipse 3.0 I am using, I am not sure.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic