Example usage for com.intellij.openapi.actionSystem IdeActions ACTION_EXPAND_ALL

List of usage examples for com.intellij.openapi.actionSystem IdeActions ACTION_EXPAND_ALL

Introduction

In this page you can find the example usage for com.intellij.openapi.actionSystem IdeActions ACTION_EXPAND_ALL.

Prototype

String ACTION_EXPAND_ALL

To view the source code for com.intellij.openapi.actionSystem IdeActions ACTION_EXPAND_ALL.

Click Source Link

Usage

From source file:com.intellij.ide.actions.ExpandAllToolbarAction.java

License:Apache License

public ExpandAllToolbarAction(TreeExpander treeExpander) {
    myTreeExpander = treeExpander;
    copyFrom(ActionManager.getInstance().getAction(IdeActions.ACTION_EXPAND_ALL));
}

From source file:com.intellij.ide.hierarchy.HierarchyBrowserBase.java

License:Apache License

protected void appendActions(@NotNull DefaultActionGroup actionGroup, @Nullable String helpID) {
    actionGroup.add(myAutoScrollToSourceHandler.createToggleAction());
    actionGroup.add(ActionManager.getInstance().getAction(IdeActions.ACTION_EXPAND_ALL));
    actionGroup.add(new PinToolwindowTabAction() {
        @Override/*from www.j av a 2  s .  c  o  m*/
        public void update(AnActionEvent event) {
            super.update(event);
            // sometimes there is no content to close, e.g. in usage view preview
            event.getPresentation().setVisible(myContent != null);
        }
    });
    actionGroup.add(new CloseAction());
    if (helpID != null) {
        actionGroup.add(new ContextHelpAction(helpID));
    }
}

From source file:com.intellij.ide.util.MemberChooser.java

License:Apache License

@Override
protected JComponent createCenterPanel() {
    JPanel panel = new JPanel(new BorderLayout());

    // Toolbar/* w  ww.  ja  va2  s  . c  o  m*/

    DefaultActionGroup group = new DefaultActionGroup();

    fillToolbarActions(group);

    group.addSeparator();

    ExpandAllAction expandAllAction = new ExpandAllAction();
    expandAllAction.registerCustomShortcutSet(
            new CustomShortcutSet(
                    KeymapManager.getInstance().getActiveKeymap().getShortcuts(IdeActions.ACTION_EXPAND_ALL)),
            myTree);
    group.add(expandAllAction);

    CollapseAllAction collapseAllAction = new CollapseAllAction();
    collapseAllAction.registerCustomShortcutSet(
            new CustomShortcutSet(
                    KeymapManager.getInstance().getActiveKeymap().getShortcuts(IdeActions.ACTION_COLLAPSE_ALL)),
            myTree);
    group.add(collapseAllAction);

    panel.add(ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, group, true).getComponent(),
            BorderLayout.NORTH);

    // Tree
    expandFirst();
    defaultExpandTree();
    installSpeedSearch();

    JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTree);
    scrollPane.setPreferredSize(new Dimension(350, 450));
    panel.add(scrollPane, BorderLayout.CENTER);

    return panel;
}