Example usage for com.intellij.openapi.actionSystem ActionPlaces COMPILER_MESSAGES_TOOLBAR

List of usage examples for com.intellij.openapi.actionSystem ActionPlaces COMPILER_MESSAGES_TOOLBAR

Introduction

In this page you can find the example usage for com.intellij.openapi.actionSystem ActionPlaces COMPILER_MESSAGES_TOOLBAR.

Prototype

String COMPILER_MESSAGES_TOOLBAR

To view the source code for com.intellij.openapi.actionSystem ActionPlaces COMPILER_MESSAGES_TOOLBAR.

Click Source Link

Usage

From source file:com.intellij.ide.errorTreeView.NewErrorTreeViewPanel.java

License:Apache License

private JPanel createToolbarPanel(@Nullable Runnable rerunAction) {
    AnAction closeMessageViewAction = new CloseTabToolbarAction() {
        @Override/*from w  w  w.  j a v a 2  s . c o m*/
        public void actionPerformed(AnActionEvent e) {
            close();
        }
    };

    DefaultActionGroup leftUpdateableActionGroup = new DefaultActionGroup();
    if (rerunAction != null) {
        leftUpdateableActionGroup.add(new RerunAction(rerunAction, closeMessageViewAction));
    }

    leftUpdateableActionGroup.add(new StopAction());
    if (myCreateExitAction) {
        leftUpdateableActionGroup.add(closeMessageViewAction);
    }
    leftUpdateableActionGroup.add(new PreviousOccurenceToolbarAction(this));
    leftUpdateableActionGroup.add(new NextOccurenceToolbarAction(this));
    leftUpdateableActionGroup.add(new ExportToTextFileToolbarAction(myExporterToTextFile));
    leftUpdateableActionGroup.add(new ContextHelpAction(myHelpId));

    DefaultActionGroup rightUpdateableActionGroup = new DefaultActionGroup();
    fillRightToolbarGroup(rightUpdateableActionGroup);

    JPanel toolbarPanel = new JPanel(new GridLayout(1, 2));
    final ActionManager actionManager = ActionManager.getInstance();
    myLeftToolbar = actionManager.createActionToolbar(ActionPlaces.COMPILER_MESSAGES_TOOLBAR,
            leftUpdateableActionGroup, false);
    toolbarPanel.add(myLeftToolbar.getComponent());
    myRightToolbar = actionManager.createActionToolbar(ActionPlaces.COMPILER_MESSAGES_TOOLBAR,
            rightUpdateableActionGroup, false);
    toolbarPanel.add(myRightToolbar.getComponent());

    return toolbarPanel;
}

From source file:com.intellij.lang.jsgraphql.ide.project.toolwindow.JSGraphQLErrorTreeViewPanel.java

License:Open Source License

private Component createToolPanel() {
    CloseTabToolbarAction closeMessageViewAction = new CloseTabToolbarAction() {
        public void actionPerformed(AnActionEvent e) {
            close();/* w  w  w.  j  a  v a 2 s . c o  m*/
        }
    };
    DefaultActionGroup leftActionGroup = new DefaultActionGroup();
    DefaultActionGroup rightActionGroup = new DefaultActionGroup();
    if (myTreeExpander != null) {
        rightActionGroup.add(CommonActionsManager.getInstance().createExpandAllAction(myTreeExpander, this));
        rightActionGroup.add(CommonActionsManager.getInstance().createCollapseAllAction(myTreeExpander, this));
    }

    rightActionGroup.add(new DumbAwareAction("Clear All", null, Actions.GC) {
        public void actionPerformed(AnActionEvent e) {
            if (myCleanAction != null) {
                myCleanAction.run();
            }
            getErrorViewStructure().clear();
            updateTree();
        }
    });
    if (myActions != null) {
        for (AnAction rightToolbar : myActions) {
            leftActionGroup.add(rightToolbar);
        }
    }

    leftActionGroup.add(new ContextHelpAction(myHelpId));
    leftActionGroup.add(closeMessageViewAction);
    final JPanel panel = new JPanel(new BorderLayout());
    final ActionManager actionManager = ActionManager.getInstance();
    final ActionToolbar leftToolbar = actionManager.createActionToolbar(ActionPlaces.COMPILER_MESSAGES_TOOLBAR,
            leftActionGroup, false);
    final ActionToolbar rightToolbar = actionManager.createActionToolbar(ActionPlaces.COMPILER_MESSAGES_TOOLBAR,
            rightActionGroup, false);
    panel.add(leftToolbar.getComponent(), BorderLayout.WEST);
    panel.add(rightToolbar.getComponent(), BorderLayout.CENTER);
    return panel;
}

From source file:gradleplug.messages.MessagesPanel.java

License:Apache License

private JPanel createToolbarPanel() {
    DefaultActionGroup actionGroup = new DefaultActionGroup();
    actionGroup.add(new CloseTabToolbarAction() {
        public void actionPerformed(AnActionEvent e) {
            close();//from w  ww  .j a  v  a  2s. c o m
        }
    });
    actionGroup.add(new ExportToTextFileToolbarAction(exporterToTextFile));
    JPanel result = new JPanel(new GridLayout(1, 1));
    ActionToolbar myLeftToolbar = ActionManager.getInstance()
            .createActionToolbar(ActionPlaces.COMPILER_MESSAGES_TOOLBAR, actionGroup, false);
    result.add(myLeftToolbar.getComponent());
    return result;
}