I have an RCP application with an existing command and handler to switch perspective programmatically. And I also have and new plugin consumed by the existing RCP application. I want this new plugin to execute the command/handler of my RCP application, what can be the possible solution for this?
You may need to define a handler for that command (not sure), but executing commands programmatically looks like this:
Command command = ((ICommandService) getSite().getService(ICommandService.class)).getCommand(commandId);
...
final Event trigger = new Event();
ExecutionEvent executionEvent = ((IHandlerService) getSite().getService(IHandlerService.class)).createExecutionEvent(command, trigger);
command.executeWithChecks(executionEvent);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With