Package com.intellij.openapi.actionSystem

Examples of com.intellij.openapi.actionSystem.AnAction


        });
    }

    @NotNull
    private String getPerformAgainMessage(@NotNull final BWACHandlerBrowse.BrowseDirection browseDirection) {
        AnAction action = ActionManager.getInstance().getAction(browseDirection == BWACHandlerBrowse.BrowseDirection.NEXT ? "BrowseWordAtCaretPlugin.Next" : "BrowseWordAtCaretPlugin.Previous");
        String shortcutsText = KeymapUtil.getFirstKeyboardShortcutText(action);
        String message;
        if (shortcutsText.length() > 0) {
            if (browseDirection == BWACHandlerBrowse.BrowseDirection.NEXT) {
                message = "Not found, press " + shortcutsText + " to browse from the top";
View Full Code Here


      setLayout(new BorderLayout());

    final DefaultActionGroup toolbarGroup = new DefaultActionGroup();

    for (int i = 0; i < actions.length; i++) {
      AnAction action = actions[i];
      toolbarGroup.add(action);
    }

    final ActionManager actionManager = ActionManager.getInstance();
    final ActionToolbar toolbar = actionManager.createActionToolbar(Constants.PLUGIN_ID, toolbarGroup, false);
View Full Code Here

    editor.setForeground(settings.getCommandShellForegroundColor());
  }

    public void toggleActions(){
        for (int i = 0; i < actions.length; i++) {
            AnAction action = actions[i];
            if (action instanceof RerunScriptAction) {
                RerunScriptAction rerunScriptAction = (RerunScriptAction) action;
                rerunScriptAction.setEnabled(!rerunScriptAction.isEnabled());
            }
View Full Code Here

    }

    public StopScriptAction getStopScriptAction(){
        for (int i = 0; i < actions.length; i++) {
            AnAction action = actions[i];
            if (action instanceof StopScriptAction){
                return (StopScriptAction) action;
            }
        }
        return null;           
View Full Code Here

                    RerunScriptAction rerunAction = new RerunScriptAction();
                    StopScriptAction stopScriptAction = new StopScriptAction();
                    CloseScriptConsoleAction closeAction = new CloseScriptConsoleAction(contentName);
                    OpenHelpAction openHelpAction = new OpenHelpAction();

                    AnAction scriptConsoleActions[] = {rerunAction, stopScriptAction, closeAction, openHelpAction};

                    panel = new ScriptShellPanel(commandProcessor, scriptConsoleActions);
                    content = toolWindow.addContentPanel(contentName, panel);
                } else {
                    ScriptShellTabContent tabContent = (ScriptShellTabContent) content.getComponent();
View Full Code Here

    ClearEditorAction clearEditorAction = new ClearEditorAction();
    ShowScriptMonkeyConfigurationAction showConfigurationAction = new ShowScriptMonkeyConfigurationAction();
    OpenHelpAction openHelpAction = new OpenHelpAction();

    AnAction commandShellActions[] = {clearEditorAction, showConfigurationAction, openHelpAction};

    commandShellPanel = new ScriptShellPanel(commandProcessor, commandShellActions);
    commandShellPanel.applySettings(ScriptMonkeyApplicationComponent.getInstance().getSettings());
    clearEditorAction.setScriptShellPanel(commandShellPanel);
    commandProcessor.processCommandLine();
View Full Code Here

    public NginxExecutionResult(final ExecutionConsole console, ProcessHandler processHandler) {
        this.console = console;
        handler = processHandler;

        ActionManager actionManager = ActionManager.getInstance();
        AnAction reloadAction = actionManager.getAction(RELOAD_ACTION_ID);
        actions = new AnAction[]{reloadAction};

    }
View Full Code Here

    epDetails.setText(details);
  }

  private void createUIComponents()
  {
    AnAction previousAction = new AnAction(null, RevuBundle.message("statusPopup.previous.tip"),
      IconLoader.getIcon("/actions/back.png"))
    {
      @Override
      public void actionPerformed(AnActionEvent e)
      {
        StatusBarPopup.this.update(currentIndex - 1);
      }

      @Override
      public void update(AnActionEvent e)
      {
        e.getPresentation().setEnabled(currentIndex > 0);
      }
    };
    AnAction nextAction = new AnAction(null, RevuBundle.message("statusPopup.next.tip"),
      IconLoader.getIcon("/actions/forward.png"))
    {

      @Override
      public void actionPerformed(AnActionEvent e)
View Full Code Here

        final FileEditorManager manager = FileEditorManager.getInstance(project);
        for (VirtualFile file : files) {
          manager.openFile(file, true);

          if (PubspecYamlUtil.PUBSPEC_YAML.equals(file.getName())) {
            final AnAction pubGetAction = ActionManager.getInstance().getAction("Dart.pub.get");
            final Module module = ModuleUtilCore.findModuleForFile(file, project);
            if (pubGetAction instanceof DartPubGetAction && module != null) {
              ((DartPubGetAction)pubGetAction).performPubAction(module, file, false);
            }
          }
View Full Code Here

        showAllTabsOfUsersWithMessages();
      }
    });
    myPanel.add(myContentManager.getComponent());

    AnAction toolbarGroup = myActionManager.getAction("IDEtalk.MessageWindowToolbar");
    if (toolbarGroup != null) {
      ActionToolbar toolbar = myActionManager.createActionToolbar(PLACE_TOOLBAR, (ActionGroup) toolbarGroup, false);
      myPanel.add(toolbar.getComponent(), BorderLayout.WEST);
    }
  }
View Full Code Here

TOP

Related Classes of com.intellij.openapi.actionSystem.AnAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.