use of com.intellij.openapi.editor.actionSystem.EditorAction in project intellij-community by JetBrains.
the class PydevConsoleRunnerImpl method createSplitLineAction.
protected AnAction createSplitLineAction() {
class ConsoleSplitLineAction extends EditorAction {
private static final String CONSOLE_SPLIT_LINE_ACTION_ID = "Console.SplitLine";
public ConsoleSplitLineAction() {
super(new EditorWriteActionHandler() {
private final SplitLineAction mySplitLineAction = new SplitLineAction();
@Override
public boolean isEnabled(Editor editor, DataContext dataContext) {
return mySplitLineAction.getHandler().isEnabled(editor, dataContext);
}
@Override
public void executeWriteAction(Editor editor, @Nullable Caret caret, DataContext dataContext) {
((EditorWriteActionHandler) mySplitLineAction.getHandler()).executeWriteAction(editor, caret, dataContext);
editor.getCaretModel().getCurrentCaret().moveCaretRelatively(0, 1, false, true);
}
});
}
public void setup() {
EmptyAction.setupAction(this, CONSOLE_SPLIT_LINE_ACTION_ID, null);
}
}
ConsoleSplitLineAction action = new ConsoleSplitLineAction();
action.setup();
return action;
}
use of com.intellij.openapi.editor.actionSystem.EditorAction in project intellij-plugins by JetBrains.
the class HbsLiveTemplatesTest method expandTemplate.
private void expandTemplate() {
EditorAction action = (EditorAction) ActionManager.getInstance().getAction(IdeActions.ACTION_EXPAND_LIVE_TEMPLATE_BY_TAB);
action.actionPerformed(myFixture.getEditor(), DataManager.getInstance().getDataContext());
}
use of com.intellij.openapi.editor.actionSystem.EditorAction in project idea-handlebars by dmarcotte.
the class HbsLiveTemplatesTest method expandTemplate.
private void expandTemplate() {
EditorAction action = (EditorAction) ActionManager.getInstance().getAction(IdeActions.ACTION_EXPAND_LIVE_TEMPLATE_BY_TAB);
action.actionPerformed(myFixture.getEditor(), DataManager.getInstance().getDataContext());
}
Aggregations