Search in sources :

Example 1 with CloseActiveTabAction

use of com.intellij.ide.actions.CloseActiveTabAction 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)

Aggregations

StopProcessAction (com.intellij.execution.actions.StopProcessAction)1 CloseActiveTabAction (com.intellij.ide.actions.CloseActiveTabAction)1 NotNull (org.jetbrains.annotations.NotNull)1