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

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

Introduction

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

Prototype

String ANT_EXPLORER_TOOLBAR

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

Click Source Link

Usage

From source file:com.headwire.aem.tooling.intellij.explorer.SlingPluginExplorer.java

License:Apache License

private JPanel createToolbarPanel(SlingServerTreeManager treeManager) {
    ActionManager actionManager = ActionManager.getInstance();
    DefaultActionGroup group = new DefaultActionGroup();
    group.add(actionManager.getAction("AEM.Toolbar"));
    treeManager.adjustToolbar(group);/*w  w  w. ja v a 2  s  .c om*/

    final ActionToolbar actionToolbar = ActionManager.getInstance()
            .createActionToolbar(ActionPlaces.ANT_EXPLORER_TOOLBAR, group, true);

    final JPanel buttonsPanel = new JPanel(new BorderLayout());
    buttonsPanel.add(actionToolbar.getComponent(), BorderLayout.CENTER);
    return buttonsPanel;
}

From source file:com.intellij.lang.ant.config.explorer.AntExplorer.java

License:Apache License

private JPanel createToolbarPanel() {
    final DefaultActionGroup group = new DefaultActionGroup();
    group.add(new AddAction());
    group.add(new RemoveAction());
    group.add(new RunAction());
    group.add(myAntBuildFilePropertiesAction);
    group.addSeparator();//from  w ww.  j  av a2s.  c o  m
    group.add(new ShowAllTargetsAction());
    group.add(new ShowModuleGrouping());
    AnAction action = CommonActionsManager.getInstance().createExpandAllAction(myTreeExpander, this);
    action.getTemplatePresentation()
            .setDescription(AntBundle.message("ant.explorer.expand.all.nodes.action.description"));
    group.add(action);
    action = CommonActionsManager.getInstance().createCollapseAllAction(myTreeExpander, this);
    action.getTemplatePresentation()
            .setDescription(AntBundle.message("ant.explorer.collapse.all.nodes.action.description"));
    group.add(action);

    final ActionToolbar actionToolBar = ActionManager.getInstance()
            .createActionToolbar(ActionPlaces.ANT_EXPLORER_TOOLBAR, group, true);
    final JPanel buttonsPanel = new JPanel(new BorderLayout());
    buttonsPanel.add(actionToolBar.getComponent(), BorderLayout.CENTER);
    return buttonsPanel;
}

From source file:org.napile.idea.thermit.config.explorer.AntExplorer.java

License:Apache License

private JPanel createToolbarPanel() {
    final DefaultActionGroup group = new DefaultActionGroup();
    group.add(new AddAction());
    group.add(new RemoveAction());
    group.add(new RunAction());
    group.add(new ShowAllTargetsAction());
    AnAction action = CommonActionsManager.getInstance().createExpandAllAction(myTreeExpander, this);
    action.getTemplatePresentation()//from  w  w w .j  a  v  a  2s  .c om
            .setDescription(ThermitBundle.message("ant.explorer.expand.all.nodes.action.description"));
    group.add(action);
    action = CommonActionsManager.getInstance().createCollapseAllAction(myTreeExpander, this);
    action.getTemplatePresentation()
            .setDescription(ThermitBundle.message("ant.explorer.collapse.all.nodes.action.description"));
    group.add(action);
    group.add(myAntBuildFilePropertiesAction);
    group.add(new ContextHelpAction(HelpID.ANT));

    final ActionToolbar actionToolBar = ActionManager.getInstance()
            .createActionToolbar(ActionPlaces.ANT_EXPLORER_TOOLBAR, group, true);
    final JPanel buttonsPanel = new JPanel(new BorderLayout());
    buttonsPanel.add(actionToolBar.getComponent(), BorderLayout.CENTER);
    return buttonsPanel;
}