Package com.intellij.openapi.editor.actionSystem

Examples of com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute()


  protected void doEnterTest(@NotNull String before, @NotNull String expected) {
    final EditorActionHandler enterActionHandler = EditorActionManager.getInstance().getActionHandler(IdeActions.ACTION_EDITOR_ENTER);
    doExecuteActionTest(before, expected, new Runnable() {
      @Override
      public void run() {
        enterActionHandler.execute(myFixture.getEditor(), ((EditorEx)myFixture.getEditor()).getDataContext());
      }
    });
  }

  /**
 
View Full Code Here


  protected void doEnterTest(@NotNull String before, @NotNull String expected) {
    final EditorActionHandler enterActionHandler = EditorActionManager.getInstance().getActionHandler(IdeActions.ACTION_EDITOR_ENTER);
    doExecuteActionTest(before, expected, new Runnable() {
      @Override
      public void run() {
        enterActionHandler.execute(myFixture.getEditor(), ((EditorEx)myFixture.getEditor()).getDataContext());
      }
    });
  }

  /**
 
View Full Code Here

    public static void pressEnter(Editor editor) {
        EditorActionManager manager = EditorActionManager.getInstance();
        EditorActionHandler enterHandler = manager.getActionHandler(IdeActions.ACTION_EDITOR_START_NEW_LINE);
        DataContext dc = DataManager.getInstance().getDataContext(editor.getContentComponent());
        enterHandler.execute(editor, editor.getCaretModel().getCurrentCaret(), dc);
    }

    public static void reformatLines(@NotNull PsiFile file, Editor editor, int startLine, int endLine) {
        Document doc = editor.getDocument();
        int start = doc.getLineStartOffset(startLine);
View Full Code Here

  }
  protected static void backspace() {
    EditorActionManager actionManager = EditorActionManager.getInstance();
    EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_BACKSPACE);

    actionHandler.execute(getEditor(), DataManager.getInstance().getDataContext());
  }

  protected DataContext getCurrentEditorDataContext() {
    final DataContext defaultContext = DataManager.getInstance().getDataContext();
    DataContext dataContext = new DataContext() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.