Example usage for com.intellij.openapi.actionSystem EmptyAction setupAction

List of usage examples for com.intellij.openapi.actionSystem EmptyAction setupAction

Introduction

In this page you can find the example usage for com.intellij.openapi.actionSystem EmptyAction setupAction.

Prototype

public static void setupAction(@NotNull AnAction action, @NotNull String id, @Nullable JComponent component) 

Source Link

Usage

From source file:com.intellij.diff.actions.impl.FocusOppositePaneAction.java

License:Apache License

public void setupAction(@NotNull JComponent component) {
    String action = myScrollToPosition ? "Diff.FocusOppositePaneAndScroll" : "Diff.FocusOppositePane";
    EmptyAction.setupAction(this, action, component);
}

From source file:com.intellij.diff.actions.impl.GoToChangePopupAction.java

License:Apache License

public GoToChangePopupAction() {
    setEnabledInModalContext(true);
    EmptyAction.setupAction(this, "GotoChangedFile", null);
}

From source file:com.intellij.diff.actions.impl.NextChangeAction.java

License:Apache License

public NextChangeAction() {
    setEnabledInModalContext(true);
    EmptyAction.setupAction(this, "Diff.NextChange", null);
}

From source file:com.intellij.diff.actions.impl.NextDifferenceAction.java

License:Apache License

public NextDifferenceAction() {
    setEnabledInModalContext(true);
    EmptyAction.setupAction(this, IdeActions.ACTION_NEXT_DIFF, null);
}

From source file:com.intellij.diff.actions.impl.OpenInEditorAction.java

License:Apache License

public OpenInEditorAction(@Nullable Runnable afterRunnable) {
    EmptyAction.setupAction(this, "EditSource", null);
    myAfterRunnable = afterRunnable;
}

From source file:com.intellij.diff.actions.impl.PrevChangeAction.java

License:Apache License

public PrevChangeAction() {
    setEnabledInModalContext(true);
    EmptyAction.setupAction(this, "Diff.PrevChange", null);
}

From source file:com.intellij.diff.actions.impl.PrevDifferenceAction.java

License:Apache License

public PrevDifferenceAction() {
    setEnabledInModalContext(true);
    EmptyAction.setupAction(this, IdeActions.ACTION_PREVIOUS_DIFF, null);
}

From source file:com.intellij.execution.console.ConsoleExecuteAction.java

License:Apache License

private ConsoleExecuteAction(@NotNull LanguageConsoleImpl console, @Nullable LanguageConsoleView consoleView,
        @NotNull ConsoleExecuteActionHandler executeActionHandler, @NotNull String emptyExecuteActionId,
        @Nullable Condition<LanguageConsoleImpl> enabledCondition) {
    super(null, null, AllIcons.Actions.Execute);

    myConsole = console;//  w w w . j  a va  2 s  .  c o m
    myConsoleView = consoleView;
    myExecuteActionHandler = executeActionHandler;
    myEnabledCondition = enabledCondition == null ? Conditions.<LanguageConsoleImpl>alwaysTrue()
            : enabledCondition;

    EmptyAction.setupAction(this, emptyExecuteActionId, null);
}

From source file:com.intellij.execution.console.ConsoleHistoryController.java

License:Apache License

private void configureActions() {
    EmptyAction.setupAction(myHistoryNext, "Console.History.Next", null);
    EmptyAction.setupAction(myHistoryPrev, "Console.History.Previous", null);
    EmptyAction.setupAction(myBrowseHistory, "Console.History.Browse", null);
    if (!myMultiline) {
        EmptyAction.setupAction(myBrowseHistory, "Console.History.BrowseTW", null);
        myHistoryNext.registerCustomShortcutSet(KeyEvent.VK_UP, 0, null);
        myHistoryPrev.registerCustomShortcutSet(KeyEvent.VK_DOWN, 0, null);
    }//from  w ww  .  j a va2  s .  c o m
    myHistoryNext.registerCustomShortcutSet(myHistoryNext.getShortcutSet(),
            myConsole.getCurrentEditor().getComponent());
    myHistoryPrev.registerCustomShortcutSet(myHistoryPrev.getShortcutSet(),
            myConsole.getCurrentEditor().getComponent());
    myBrowseHistory.registerCustomShortcutSet(myBrowseHistory.getShortcutSet(),
            myConsole.getCurrentEditor().getComponent());
}

From source file:javarepl.plugin.JavaREPLConsoleHistoryController.java

License:Apache License

private void configureActions() {
    EmptyAction.setupAction(myHistoryNext, "Console.History.Next", null);
    EmptyAction.setupAction(myHistoryPrev, "Console.History.Previous", null);
    EmptyAction.setupAction(myBrowseHistory, "Console.History.Browse", null);
    if (!myMultiline) {
        myHistoryNext.registerCustomShortcutSet(KeyEvent.VK_UP, 0, null);
        myHistoryPrev.registerCustomShortcutSet(KeyEvent.VK_DOWN, 0, null);
    }// www  .ja  v  a2 s. c o m
    myHistoryNext.registerCustomShortcutSet(myHistoryNext.getShortcutSet(),
            myConsole.getCurrentEditor().getComponent());
    myHistoryPrev.registerCustomShortcutSet(myHistoryPrev.getShortcutSet(),
            myConsole.getCurrentEditor().getComponent());
    myBrowseHistory.registerCustomShortcutSet(myBrowseHistory.getShortcutSet(),
            myConsole.getCurrentEditor().getComponent());
}