Search in sources :

Example 11 with EditorActionHandler

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

the class JoinLinesTest method performAction.

private void performAction() {
    EditorActionManager actionManager = EditorActionManager.getInstance();
    EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_JOIN_LINES);
    actionHandler.execute(getEditor(), DataManager.getInstance().getDataContext());
}
Also used : EditorActionManager(com.intellij.openapi.editor.actionSystem.EditorActionManager) EditorActionHandler(com.intellij.openapi.editor.actionSystem.EditorActionHandler)

Example 12 with EditorActionHandler

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

the class CustomFileTypeEditorTest method performStartBlockAction.

private static void performStartBlockAction() {
    EditorActionHandler actionHandler = new CodeBlockStartAction().getHandler();
    actionHandler.execute(getEditor(), getCurrentEditorDataContext());
}
Also used : EditorActionHandler(com.intellij.openapi.editor.actionSystem.EditorActionHandler) CodeBlockStartAction(com.intellij.codeInsight.editorActions.CodeBlockStartAction)

Example 13 with EditorActionHandler

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

the class MvnDependencyPasteTest method performPaste.

private static void performPaste() {
    EditorActionManager actionManager = EditorActionManager.getInstance();
    EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_PASTE);
    actionHandler.execute(getEditor(), null, DataManager.getInstance().getDataContextFromFocus().getResultSync());
}
Also used : EditorActionManager(com.intellij.openapi.editor.actionSystem.EditorActionManager) EditorActionHandler(com.intellij.openapi.editor.actionSystem.EditorActionHandler)

Example 14 with EditorActionHandler

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

the class PropertiesJoinLinesTest method performAction.

private static void performAction() {
    EditorActionManager actionManager = EditorActionManager.getInstance();
    EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_JOIN_LINES);
    actionHandler.execute(getEditor(), DataManager.getInstance().getDataContext());
}
Also used : EditorActionManager(com.intellij.openapi.editor.actionSystem.EditorActionManager) EditorActionHandler(com.intellij.openapi.editor.actionSystem.EditorActionHandler)

Example 15 with EditorActionHandler

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

the class XmlMoverTest method doTest.

private void doTest(String ext) throws Exception {
    final String baseName = getBasePath() + '/' + getTestName(true);
    final String fileName = baseName + "." + ext;
    @NonNls String afterFileName = baseName + "_afterUp." + ext;
    EditorActionHandler handler = new MoveStatementUpAction().getHandler();
    performAction(fileName, handler, afterFileName);
    afterFileName = baseName + "_afterDown." + ext;
    handler = new MoveStatementDownAction().getHandler();
    performAction(fileName, handler, afterFileName);
}
Also used : NonNls(org.jetbrains.annotations.NonNls) 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