Example usage for com.intellij.openapi.actionSystem IdeActions ACTION_EDITOR_SPLIT

List of usage examples for com.intellij.openapi.actionSystem IdeActions ACTION_EDITOR_SPLIT

Introduction

In this page you can find the example usage for com.intellij.openapi.actionSystem IdeActions ACTION_EDITOR_SPLIT.

Prototype

String ACTION_EDITOR_SPLIT

To view the source code for com.intellij.openapi.actionSystem IdeActions ACTION_EDITOR_SPLIT.

Click Source Link

Usage

From source file:com.intellij.testFramework.EditorTestUtil.java

License:Apache License

public static void performTypingAction(Editor editor, char c) {
    EditorActionManager actionManager = EditorActionManager.getInstance();
    if (c == BACKSPACE_FAKE_CHAR) {
        EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_BACKSPACE);
        actionHandler.execute(editor, DataManager.getInstance().getDataContext());
    } else if (c == SMART_ENTER_FAKE_CHAR) {
        EditorActionHandler actionHandler = actionManager
                .getActionHandler(IdeActions.ACTION_EDITOR_COMPLETE_STATEMENT);
        actionHandler.execute(editor, DataManager.getInstance().getDataContext());
    } else if (c == SMART_LINE_SPLIT_CHAR) {
        EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_SPLIT);
        actionHandler.execute(editor, DataManager.getInstance().getDataContext());
    } else if (c == '\n') {
        EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_ENTER);
        actionHandler.execute(editor, DataManager.getInstance().getDataContext());
    } else {//from w w w. j a v a 2  s.c  o  m
        TypedAction action = actionManager.getTypedAction();
        action.actionPerformed(editor, c, DataManager.getInstance().getDataContext());
    }
}

From source file:org.startica.meeniex.intellij.plugin.eclipseLikeEnterInStringLiteralHandler.editor.actionSystem.EclipseLikeEnterInStringLiteralHandler.java

License:Open Source License

private boolean isSplitLineAction() {
    ActionManagerEx actionManagerEx = ActionManagerEx.getInstanceEx();
    String prevPreformedActionId = actionManagerEx.getPrevPreformedActionId();
    String lastPreformedActionId = actionManagerEx.getLastPreformedActionId();

    return IdeActions.ACTION_EDITOR_SPLIT.equals(prevPreformedActionId)
            || IdeActions.ACTION_EDITOR_SPLIT.equals(lastPreformedActionId);
}