Search in sources :

Example 16 with EditorActionHandler

use of com.intellij.openapi.editor.actionSystem.EditorActionHandler in project intellij-plugins by JetBrains.

the class HbActionHandlerTest method doEnterTest.

/**
   * 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, () -> enterActionHandler.execute(myFixture.getEditor(), ((EditorEx) myFixture.getEditor()).getDataContext()));
}
Also used : EditorEx(com.intellij.openapi.editor.ex.EditorEx) EditorActionHandler(com.intellij.openapi.editor.actionSystem.EditorActionHandler)

Aggregations

EditorActionHandler (com.intellij.openapi.editor.actionSystem.EditorActionHandler)16 EditorActionManager (com.intellij.openapi.editor.actionSystem.EditorActionManager)7 ASTNode (com.intellij.lang.ASTNode)2 DataContext (com.intellij.openapi.actionSystem.DataContext)2 EditorEx (com.intellij.openapi.editor.ex.EditorEx)2 CodeBlockEndAction (com.intellij.codeInsight.editorActions.CodeBlockEndAction)1 CodeBlockStartAction (com.intellij.codeInsight.editorActions.CodeBlockStartAction)1 Template (com.intellij.codeInsight.template.Template)1 Document (com.intellij.openapi.editor.Document)1 Editor (com.intellij.openapi.editor.Editor)1 Project (com.intellij.openapi.project.Project)1 TextRange (com.intellij.openapi.util.TextRange)1 PsiCodeBlock (com.intellij.psi.PsiCodeBlock)1 PsiElement (com.intellij.psi.PsiElement)1 NonNls (org.jetbrains.annotations.NonNls)1