Java 类com.intellij.openapi.actionSystem.EmptyAction 实例源码

项目:intellij-ce-playground    文件:LanguageConsoleImpl.java   
private void setupComponents() {
  myHelper.setupEditor(myConsoleEditor);
  myHelper.setupEditor(myHistoryViewer);

  myHistoryViewer.getComponent().setMinimumSize(JBUI.emptySize());
  myHistoryViewer.getComponent().setPreferredSize(JBUI.emptySize());
  myHistoryViewer.setCaretEnabled(false);

  myConsoleEditor.setContextMenuGroupId(IdeActions.GROUP_CONSOLE_EDITOR_POPUP);
  myConsoleEditor.setHighlighter(
    EditorHighlighterFactory.getInstance().createEditorHighlighter(getVirtualFile(), myConsoleEditor.getColorsScheme(), getProject()));

  myConsoleEditor.getScrollPane().getHorizontalScrollBar().setModel(
    myHistoryViewer.getScrollPane().getHorizontalScrollBar().getModel());
  setHistoryScrollBarVisible(false);

  myHistoryViewer.getContentComponent().addKeyListener(new KeyAdapter() {
    @Override
    public void keyTyped(KeyEvent event) {
      if (isConsoleEditorEnabled() && UIUtil.isReallyTypedEvent(event)) {
        myConsoleEditor.getContentComponent().requestFocus();
        myConsoleEditor.processKeyTyped(event);
      }
    }
  });

  EmptyAction.registerActionShortcuts(myHistoryViewer.getComponent(), myConsoleEditor.getComponent());
}
项目:intellij-ce-playground    文件:ConsoleExecuteAction.java   
public ConsoleExecuteAction(@NotNull LanguageConsoleView consoleView,
                             @NotNull ConsoleExecuteActionHandler executeActionHandler,
                             @NotNull String emptyExecuteActionId,
                             @Nullable Condition<LanguageConsoleView> enabledCondition) {
  super(null, null, AllIcons.Actions.Execute);

  myConsoleView = consoleView;
  myExecuteActionHandler = executeActionHandler;
  myEnabledCondition = enabledCondition == null ? Conditions.<LanguageConsoleView>alwaysTrue() : enabledCondition;

  EmptyAction.setupAction(this, emptyExecuteActionId, null);
}
项目:intellij-ce-playground    文件:ChangesBrowserWithRollback.java   
public ChangesBrowserWithRollback(@NotNull Project project, @NotNull List<Change> changes) {
  super(project, null, changes, null, false, true, null, MyUseCase.LOCAL_CHANGES, null);
  myOriginalChanges = changes;
  RollbackDialogAction rollback = new RollbackDialogAction();
  EmptyAction.setupAction(rollback, IdeActions.CHANGES_VIEW_ROLLBACK, this);
  addToolbarAction(rollback);
  setChangesToDisplay(changes);
}
项目:tools-idea    文件:ConsoleHistoryController.java   
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);
  }
  myHistoryNext.registerCustomShortcutSet(myHistoryNext.getShortcutSet(), myConsole.getCurrentEditor().getComponent());
  myHistoryPrev.registerCustomShortcutSet(myHistoryPrev.getShortcutSet(), myConsole.getCurrentEditor().getComponent());
  myBrowseHistory.registerCustomShortcutSet(myBrowseHistory.getShortcutSet(), myConsole.getCurrentEditor().getComponent());
}
项目:consulo    文件:ProxyUndoRedoAction.java   
public static void register(@javax.annotation.Nullable Project project, @Nonnull Editor editor, @Nonnull JComponent component) {
  UndoManager undoManager = project != null ? UndoManager.getInstance(project) : UndoManager.getGlobalInstance();
  TextEditor textEditor = TextEditorProvider.getInstance().getTextEditor(editor);
  if (undoManager != null) {
    EmptyAction.setupAction(new ProxyUndoRedoAction(undoManager, textEditor, true), IdeActions.ACTION_UNDO, component);
    EmptyAction.setupAction(new ProxyUndoRedoAction(undoManager, textEditor, false), IdeActions.ACTION_REDO, component);
  }
}
项目:consulo    文件:LanguageConsoleImpl.java   
private void setupComponents() {
  myHelper.setupEditor(myConsoleEditor);
  myHelper.setupEditor(myHistoryViewer);

  myHistoryViewer.getComponent().setMinimumSize(JBUI.emptySize());
  myHistoryViewer.getComponent().setPreferredSize(JBUI.emptySize());
  myHistoryViewer.setCaretEnabled(false);

  myConsoleEditor.setContextMenuGroupId(IdeActions.GROUP_CONSOLE_EDITOR_POPUP);
  myConsoleEditor
          .setHighlighter(EditorHighlighterFactory.getInstance().createEditorHighlighter(getVirtualFile(), myConsoleEditor.getColorsScheme(), getProject()));

  setHistoryScrollBarVisible(false);

  myHistoryViewer.getContentComponent().addKeyListener(new KeyAdapter() {
    @Override
    public void keyTyped(KeyEvent event) {
      if (isConsoleEditorEnabled() && UIUtil.isReallyTypedEvent(event)) {
        IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> {
          IdeFocusManager.getGlobalInstance().requestFocus(myConsoleEditor.getContentComponent(), true);
        });
        myConsoleEditor.processKeyTyped(event);
      }
    }
  });

  EmptyAction.registerActionShortcuts(myHistoryViewer.getComponent(), myConsoleEditor.getComponent());
}
项目:consulo    文件:ConsoleExecuteAction.java   
public ConsoleExecuteAction(@Nonnull LanguageConsoleView consoleView,
                            @Nonnull ConsoleExecuteActionHandler executeActionHandler,
                            @Nonnull String emptyExecuteActionId,
                            @Nullable Condition<LanguageConsoleView> enabledCondition) {
  super(null, null, AllIcons.Actions.Execute);

  myConsoleView = consoleView;
  myExecuteActionHandler = executeActionHandler;
  myEnabledCondition = enabledCondition == null ? Conditions.<LanguageConsoleView>alwaysTrue() : enabledCondition;

  EmptyAction.setupAction(this, emptyExecuteActionId, null);
}
项目:intellij-ce-playground    文件:EnableLeft.java   
protected EnableLeft(DirDiffTableModel model) {
  super(model);
  EmptyAction.setupAction(this, "DirDiffMenu.EnableLeft", null);
}
项目:intellij-ce-playground    文件:EnableEqual.java   
public EnableEqual(DirDiffTableModel model) {
  super(model);
  EmptyAction.setupAction(this, "DirDiffMenu.EnableEqual", null);
}
项目:intellij-ce-playground    文件:EnableNotEqual.java   
protected EnableNotEqual(DirDiffTableModel model) {
  super(model);
  EmptyAction.setupAction(this, "DirDiffMenu.EnableNotEqual", null);
}
项目:intellij-ce-playground    文件:EnableRight.java   
protected EnableRight(DirDiffTableModel model) {
  super(model);
  EmptyAction.setupAction(this, "DirDiffMenu.EnableRight", null);
}
项目:intellij-ce-playground    文件:NextChangeAction.java   
public NextChangeAction() {
  setEnabledInModalContext(true);
  EmptyAction.setupAction(this, "Diff.NextChange", null);
}
项目:intellij-ce-playground    文件:NextDifferenceAction.java   
public NextDifferenceAction() {
  setEnabledInModalContext(true);
  EmptyAction.setupAction(this, IdeActions.ACTION_NEXT_DIFF, null);
}
项目:intellij-ce-playground    文件:PrevDifferenceAction.java   
public PrevDifferenceAction() {
  setEnabledInModalContext(true);
  EmptyAction.setupAction(this, IdeActions.ACTION_PREVIOUS_DIFF, null);
}
项目:intellij-ce-playground    文件:PrevChangeAction.java   
public PrevChangeAction() {
  setEnabledInModalContext(true);
  EmptyAction.setupAction(this, "Diff.PrevChange", null);
}
项目:intellij-ce-playground    文件:OpenInEditorAction.java   
public OpenInEditorAction(@Nullable Runnable afterRunnable) {
  EmptyAction.setupAction(this, "EditSource", null);
  myAfterRunnable = afterRunnable;
}
项目:intellij-ce-playground    文件:GoToChangePopupAction.java   
public GoToChangePopupAction() {
  setEnabledInModalContext(true);
  EmptyAction.setupAction(this, "GotoChangedFile", null);
}
项目:intellij-ce-playground    文件:FocusOppositePaneAction.java   
public FocusOppositePaneAction(boolean scrollToPosition) {
  myScrollToPosition = scrollToPosition;
  setEnabledInModalContext(true);

  EmptyAction.setupAction(this, getActionId(), null);
}
项目:intellij-ce-playground    文件:AnnotateDiffViewerAction.java   
public AnnotateDiffViewerAction() {
  EmptyAction.setupAction(this, "Annotate", null);
  setEnabledInModalContext(true);
}
项目:cordovastudio    文件:CordovaStudioInitializer.java   
private void hideIdeaActions() {
    hideAction("NewPackageInfo", "package-info.java");

    hideAction("NewForm", "GUI Form");
    hideAction("NewDialog", "Dialog");
    hideAction("NewFormSnapshot", "Form Snapshot");
    replaceAction("Groovy.NewClass", new EmptyAction());
    replaceAction("Groovy.NewScript", new EmptyAction());
    hideAction("NewModule", "New Module...");
    hideAction("NewModuleInGroup", "Module");
    hideAction("CreateLibraryFromFile", "Add As Library...");
    hideAction("ImportModule", "Import Module...");
    //hideAction(IdeActions.GROUP_MOVE_MODULE_TO_GROUP, "Move Module to Group");
    hideAction(IdeActions.MODULE_SETTINGS, "Module Settings");

    //hideAction(IdeActions.GROUP_WELCOME_SCREEN_DOC, "Docs and How-Tos");
    //hideAction(IdeActions.GROUP_WELCOME_SCREEN_QUICKSTART, "WelcomeScreen.QuickStart"); //TODO: find name
    hideAction(IdeActions.ACTION_EXTERNAL_JAVADOC, "External Documentation");
    hideAction(IdeActions.ACTION_QUICK_JAVADOC, "Quick Documentation");

    hideAction("AddFrameworkSupport", "Add Framework Support...");

    hideAction(IdeActions.ACTION_GENERATE_ANT_BUILD, "Generate Ant Build...");
    hideAction("BuildArtifact", "Build Artifacts...");
    hideAction("RunTargetAction", "Run Ant Target");
    hideAction(IdeActions.ACTION_MAKE_MODULE, "Make Module");
    hideAction(IdeActions.ACTION_GENERATE_ANT_BUILD, "Generate Ant Build...");
    hideAction(IdeActions.ACTION_INSPECT_CODE, "Inspect Code...");
    //hideAction(IdeActions.GROUP_DEBUGGER, "DebuggerActions"); //TODO: find name
    hideAction(IdeActions.ACTION_DEFAULT_DEBUGGER, "Debug");
    hideAction(IdeActions.ACTION_TOGGLE_LINE_BREAKPOINT, "Toggle Line Breakpoint");
    //hideAction(IdeActions.GROUP_USAGE_VIEW_POPUP, "UsageView.Popup"); //TODO: find name
    hideAction(IdeActions.ACTION_GOTO_DECLARATION, "Declaration");
    hideAction(IdeActions.ACTION_GOTO_TYPE_DECLARATION, "Type Declaration");
    hideAction(IdeActions.ACTION_GOTO_IMPLEMENTATION, "Implementation(s)");

    hideAction(IdeActions.ACTION_ANALYZE_DEPENDENCIES, "Analyze Dependencies...");
    hideAction(IdeActions.ACTION_ANALYZE_BACK_DEPENDENCIES, "Analyze Backward Dependencies...");
    hideAction(IdeActions.ACTION_ANALYZE_CYCLIC_DEPENDENCIES, "Analyze Cyclic Dependencies...");

    //hideAction(IdeActions.GROUP_REFACTOR, "Refactor");

    hideAction(IdeActions.ACTION_TYPE_HIERARCHY, "Class Hierarchy");
    hideAction(IdeActions.ACTION_METHOD_HIERARCHY, "Method Hierarchy");
    hideAction(IdeActions.ACTION_CALL_HIERARCHY, "Call Hierarchy");
    //hideAction(IdeActions.GROUP_TYPE_HIERARCHY_POPUP, "TypeH ierarchy");
    //hideAction(IdeActions.GROUP_METHOD_HIERARCHY_POPUP, "Method Hierarchy");
    //hideAction(IdeActions.GROUP_CALL_HIERARCHY_POPUP, "Call Hierarchy");

    //hideAction(IdeActions.GROUP_COMMANDER_POPUP, "Commander");

    //hideAction(IdeActions.GROUP_TESTTREE_POPUP, "TestTreePopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_TESTSTATISTICS_POPUP, "TestStatisticsTablePopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_J2EE_VIEW_POPUP, "J2EEViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_EJB_TRANSACTION_ATTRIBUTES_VIEW_POPUP, "EjbTransactionAttributesViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_EJB_ENVIRONMENT_ENTRIES_VIEW_POPUP, "EjbEnvironmentEntriesViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_EJB_REFERENCES_VIEW_POPUP, "EjbReferencesViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_SECURITY_ROLES_VIEW_POPUP, "SecurityRolesViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_PARAMETERS_VIEW_POPUP, "ParametersViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_SERVLET_MAPPING_VIEW_POPUP, "ServletMappingViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_EJB_RESOURCE_REFERENCES_VIEW_POPUP, "EjbResourceReferencesViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_EJB_RESOURCE_ENVIRONMENT_REFERENCES_VIEW_POPUP, "EjbResourceEnvironmentReferencesViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_ADD_SUPPORT, "AddSupportGroup");

    hideAction(IdeActions.ACTION_QUICK_IMPLEMENTATIONS, "Quick Definition");
}
项目:consulo    文件:EnableLeft.java   
protected EnableLeft(DirDiffTableModel model) {
  super(model);
  EmptyAction.setupAction(this, "DirDiffMenu.EnableLeft", null);
}
项目:consulo    文件:EnableEqual.java   
public EnableEqual(DirDiffTableModel model) {
  super(model);
  EmptyAction.setupAction(this, "DirDiffMenu.EnableEqual", null);
}
项目:consulo    文件:EnableNotEqual.java   
protected EnableNotEqual(DirDiffTableModel model) {
  super(model);
  EmptyAction.setupAction(this, "DirDiffMenu.EnableNotEqual", null);
}
项目:consulo    文件:EnableRight.java   
protected EnableRight(DirDiffTableModel model) {
  super(model);
  EmptyAction.setupAction(this, "DirDiffMenu.EnableRight", null);
}
项目:consulo    文件:GoToChangePopupAction.java   
public GoToChangePopupAction() {
  setEnabledInModalContext(true);
  EmptyAction.setupAction(this, "GotoChangedFile", null);
}