Search in sources :

Example 1 with StopProcessAction

use of com.intellij.execution.actions.StopProcessAction in project intellij-plugins by JetBrains.

the class DartPubActionBase method createToolWindowActionsBar.

@NotNull
private static ActionToolbar createToolWindowActionsBar(@NotNull final PubToolWindowContentInfo info) {
    final DefaultActionGroup actionGroup = new DefaultActionGroup();
    final RerunPubCommandAction rerunPubCommandAction = new RerunPubCommandAction(info);
    info.rerunPubCommandAction = rerunPubCommandAction;
    actionGroup.addAction(rerunPubCommandAction);
    final StopProcessAction stopProcessAction = new StopProcessAction(DartBundle.message("stop.pub.process.action"), DartBundle.message("stop.pub.process.action"), null);
    info.stopProcessAction = stopProcessAction;
    actionGroup.addAction(stopProcessAction);
    actionGroup.add(ActionManager.getInstance().getAction(IdeActions.ACTION_PIN_ACTIVE_TAB));
    final AnAction closeContentAction = new CloseActiveTabAction();
    closeContentAction.getTemplatePresentation().setIcon(AllIcons.Actions.Cancel);
    closeContentAction.getTemplatePresentation().setText(UIBundle.message("tabbed.pane.close.tab.action.name"));
    actionGroup.add(closeContentAction);
    final ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("DartPubAction", actionGroup, false);
    toolbar.setTargetComponent(info.console.getComponent());
    return toolbar;
}
Also used : CloseActiveTabAction(com.intellij.ide.actions.CloseActiveTabAction) StopProcessAction(com.intellij.execution.actions.StopProcessAction) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with StopProcessAction

use of com.intellij.execution.actions.StopProcessAction in project intellij-plugins by JetBrains.

the class KarmaServerLogComponent method getToolbarActions.

@Nullable
@Override
public ActionGroup getToolbarActions() {
    if (myActionGroup != null) {
        return myActionGroup;
    }
    DefaultActionGroup group = new DefaultActionGroup();
    group.add(new StopProcessAction("Stop Karma Server", null, myServer.getProcessHandler()));
    final AnAction[] actions = myConsole.createConsoleActions();
    for (AnAction action : actions) {
        group.add(action);
    }
    group.addSeparator();
    myActionGroup = group;
    return myActionGroup;
}
Also used : DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup) AnAction(com.intellij.openapi.actionSystem.AnAction) StopProcessAction(com.intellij.execution.actions.StopProcessAction) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

StopProcessAction (com.intellij.execution.actions.StopProcessAction)2 CloseActiveTabAction (com.intellij.ide.actions.CloseActiveTabAction)1 AnAction (com.intellij.openapi.actionSystem.AnAction)1 DefaultActionGroup (com.intellij.openapi.actionSystem.DefaultActionGroup)1 NotNull (org.jetbrains.annotations.NotNull)1 Nullable (org.jetbrains.annotations.Nullable)1