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

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

Introduction

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

Prototype

String ACTION_EDITOR_DELETE

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

Click Source Link

Usage

From source file:com.intellij.codeInsight.CodeInsightTestCase.java

License:Apache License

protected void delete(@NotNull final Editor editor) {
    CommandProcessor.getInstance().executeCommand(getProject(), new Runnable() {
        @Override//  w  ww . ja v a2  s.c o  m
        public void run() {
            EditorActionManager actionManager = EditorActionManager.getInstance();
            EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_DELETE);

            actionHandler.execute(editor, DataManager.getInstance().getDataContext());
        }
    }, "delete", editor.getDocument());
}

From source file:com.intellij.execution.impl.ConsoleViewImpl.java

License:Apache License

private void registerConsoleEditorActions() {
    HyperlinkNavigationAction hyperlinkNavigationAction = new HyperlinkNavigationAction();
    hyperlinkNavigationAction.registerCustomShortcutSet(CommonShortcuts.ENTER, myEditor.getContentComponent());
    registerActionHandler(myEditor, IdeActions.ACTION_GOTO_DECLARATION, hyperlinkNavigationAction);

    if (!myIsViewer) {
        new EnterHandler().registerCustomShortcutSet(CommonShortcuts.ENTER, myEditor.getContentComponent());
        registerActionHandler(myEditor, IdeActions.ACTION_EDITOR_PASTE, new PasteHandler());
        registerActionHandler(myEditor, IdeActions.ACTION_EDITOR_BACKSPACE, new BackSpaceHandler());
        registerActionHandler(myEditor, IdeActions.ACTION_EDITOR_DELETE, new DeleteHandler());

        registerActionHandler(myEditor, EOFAction.ACTION_ID,
                ActionManager.getInstance().getAction(EOFAction.ACTION_ID));
    }//from  w w  w .  j av a2  s. c  o m
}

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

License:Apache License

protected static void delete() {
    executeAction(IdeActions.ACTION_EDITOR_DELETE);
}