KeyBoard shortcuts [message #830902] |
Wed, 28 March 2012 07:46 |
archana G Messages: 2 Registered: March 2012 |
Junior Member |
|
|
Hi,
I have created my eclipse application. I am using some keyboard shortcuts in it.When I launch my application for the first time, the keyboard shortcuts are not working. My binding service seems to be null. But when I close my application and launch it for the second time, keyboard shortcuts work fine. Can anyone provide me some input on this , inorder how to handle this issue.
Am sharing my code snippet
IBindingService bindingService = (IBindingService) workbench
.getService(IBindingService.class);
TriggerSequence sequence = bindingService
.getBestActiveBindingFor(commandId);
KeyBinding binding = (KeyBinding) bindingService
.getPerfectMatch(sequence);
if( binding != null){
ParameterizedCommand paramCommand = binding.getParameterizedCommand();
Command command = paramCommand.getCommand();
}
As my binding is null here , my keyboard shortcuts seems not work.
Any help will be appreciated
thanks in advance
Archana.G
|
|
|
Powered by
FUDForum. Page generated in 0.47691 seconds