ITextEditor textEditor = tryCast(part, ITextEditor.class);
IHandlerService handlerService = getHandlerService(textEditor);
if(handlerActivation != null) {
handlerService.deactivateHandler(handlerActivation);
handlerActivation = null;
}
IHandler handler = getHandler(textEditor);
if(handler != null) {
handlerActivation = handlerService.activateHandler(commandId, handler);