Package com.intellij.openapi.editor.actionSystem

Examples of com.intellij.openapi.editor.actionSystem.EditorActionHandler


  /**
   * Call this method to test behavior when Enter is typed.
   * See class documentation for more info: {@link HbActionHandlerTest}
   */
  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


    private static class WrappedEditorAction extends EditorAction implements DelegatesToAction {
        private final EditorAction originalAction;

        protected WrappedEditorAction(final Listener listener, final EditorAction originalAction) {
            super(new EditorActionHandler() {
                @Override protected void doExecute(Editor editor, Caret caret, DataContext dataContext) {
                    listener.beforeAction();
                    originalAction.getHandler().execute(editor, caret, dataContext);
                }
View Full Code Here

  private void doTest(String ext) throws Exception {
    final String baseName = getBasePath() + '/' + getTestName(true);
    final String fileName = baseName + "." + ext;

    @NonNls String afterFileName = baseName + "_after." + ext;
    EditorActionHandler handler = new MoveStatementUpAction().getHandler();
    performAction(fileName, handler, afterFileName);
  }
View Full Code Here

  /**
   * Call this method to test behavior when Enter is typed.
   * See class documentation for more info: {@link HbActionHandlerTest}
   */
  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

        pressEnter(editor);
    }

    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);
    }
View Full Code Here

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

    actionHandler.execute(getEditor(), DataManager.getInstance().getDataContext());
  }
View Full Code Here

TOP

Related Classes of com.intellij.openapi.editor.actionSystem.EditorActionHandler

Copyright © 2018 www.massapicom. 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.