I was trying the bellow snippet, but the invoked command is executed with empty parameter map.
ICommandService service = (ICommandService) ((IServiceLocator) PlatformUI.getWorkbench())
.getService(ICommandService.class);
Command command = service.getCommand(Constants.COMMAND_ID);
ExecutionEvent eventWithParam = new ExecutionEvent(command,
Collections.singletonMap(Constants.COMMAND_PARAM, "true"), null, null);
command.execute(eventWithParam);
The issue seems to be that when it goes to compatibility layer is looses PARM_MAP
in HandlerServiceHanlder.execute
method.
Is there any workaround?