};
String commandName = getTemplatePresentation().getText();
if (commandName == null) commandName = "";
// use new Ref() here to avoid merging two consequential commands, and, in the same time, pass along the Document
commandProcessor.executeCommand(editor.getProject(), command, commandName, new Ref(editor.getDocument()));
}
public void update(Editor editor, Presentation presentation, DataContext dataContext) {
presentation.setEnabled(getHandler().isEnabled(editor, dataContext));
}