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

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

Introduction

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

Prototype

String GROUP_CUT_COPY_PASTE

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

Click Source Link

Usage

From source file:org.jetbrains.plugins.clojure.repl.LanguageConsoleImpl.java

License:Apache License

private void setupComponents() {
    setupEditorDefault(myConsoleEditor);
    setupEditorDefault(myHistoryViewer);

    myConsoleEditor// w ww  .jav  a  2s .  c  o m
            .addEditorMouseListener(EditorActionUtil.createEditorPopupHandler(IdeActions.GROUP_CUT_COPY_PASTE));

    myHistoryViewer.getComponent().setMinimumSize(new Dimension(0, 0));
    myHistoryViewer.getComponent().setPreferredSize(new Dimension(0, 0));
    //    myConsoleEditor.getSettings().setAdditionalLinesCount(2);
    myConsoleEditor.setHighlighter(
            EditorHighlighterFactory.getInstance().createEditorHighlighter(myProject, myFile.getVirtualFile()));
    myHistoryViewer.setCaretEnabled(false);

    myConsoleEditor.getScrollingModel().addVisibleAreaListener(new ConsoleVisibleAreaListener(myConsoleEditor));
    myHistoryViewer.getScrollingModel().addVisibleAreaListener(new ConsoleVisibleAreaListener(myHistoryViewer));

    myHistoryViewer.getContentComponent().addKeyListener(new KeyAdapter() {
        public void keyTyped(KeyEvent event) {
            if (myFullEditor == null && UIUtil.isReallyTypedEvent(event)) {
                myConsoleEditor.getContentComponent().requestFocus();
                myConsoleEditor.processKeyTyped(event);
            }
        }
    });
    for (AnAction action : createActions()) {
        action.registerCustomShortcutSet(action.getShortcutSet(), myConsoleEditor.getComponent());
    }
    registerActionShortcuts(myHistoryViewer.getComponent());
}