So I thought I'll make a post as personal reference and maybe it helps some other developer.
This is what I did in ApplicationActionBarAdvisor.makeActions().
IBindingService bindingService = (IBindingService) window.getService(IBindingService.class);
bindingService.addBindingManagerListener(new IBindingManagerListener() {
@Override
public void bindingManagerChanged(BindingManagerEvent event) {
BindingManager manager = event.getManager();
for (Binding binding : manager.getBindings()) {
ParameterizedCommand command = binding.getParameterizedCommand();
if (command != null && ActionFactory.SAVE.getCommandId().equals(command.getId())) {
manager.removeBinding(binding);
}
}
}
});
IWorkbenchAction saveDocumentAction = ActionFactory.SAVE.create(window);
saveDocumentAction.setId("saveDocument");
saveDocumentAction.setActionDefinitionId(SAVE_DOCUMENT_COMMAND);
register(saveDocumentAction);
3 comments:
Another possible way is to define your own scheme. This is described here: http://www.vogella.de/articles/EclipseCommands/article.html
Thx for the article... helped me in solving a similar problem
Thanks for sharing your thoughts. I truly appreciate your efforts and I will be waiting for your further write ups thank you once again.
Agen Bola Terfavorit Agen Bola Terfavorit
Taruhan Bola Terfavorit Taruhan Bola Terfavorit
Kasino Online Terlengkap Kasino Online Terlengkap
bandar Kasino Online Terlengkap
Post a Comment