ICommandService service = (ICommandService) PlatformUI.getWorkbench().getAdapter(
ICommandService.class);
private IHandler commandHandler;;
public void activate( EditToolHandler handler ) {
commandHandler=new AdvancedBehaviourCommandHandler(handler.getContext().getMapDisplay());
Command command = service.getCommand(COMMAND_ID);
if (command != null)
command.setHandler(commandHandler);
}