Java 类com.intellij.ui.treeStructure.actions.ExpandAllAction 实例源码

项目:intellij-ce-playground    文件:CommittedChangesTreeBrowser.java   
public ActionToolbar createGroupFilterToolbar(final Project project, final ActionGroup leadGroup, @Nullable final ActionGroup tailGroup,
                                              final List<AnAction> extra) {
  DefaultActionGroup toolbarGroup = new DefaultActionGroup();
  toolbarGroup.add(leadGroup);
  toolbarGroup.addSeparator();
  toolbarGroup.add(new SelectFilteringAction(project, this));
  toolbarGroup.add(new SelectGroupingAction(project, this));
  final ExpandAllAction expandAllAction = new ExpandAllAction(myChangesTree);
  final CollapseAllAction collapseAllAction = new CollapseAllAction(myChangesTree);
  expandAllAction.registerCustomShortcutSet(
    new CustomShortcutSet(KeymapManager.getInstance().getActiveKeymap().getShortcuts(IdeActions.ACTION_EXPAND_ALL)),
    myChangesTree);
  collapseAllAction.registerCustomShortcutSet(
    new CustomShortcutSet(KeymapManager.getInstance().getActiveKeymap().getShortcuts(IdeActions.ACTION_COLLAPSE_ALL)),
    myChangesTree);
  toolbarGroup.add(expandAllAction);
  toolbarGroup.add(collapseAllAction);
  toolbarGroup.add(ActionManager.getInstance().getAction(VcsActions.ACTION_COPY_REVISION_NUMBER));
  toolbarGroup.add(new ContextHelpAction(myHelpId));
  if (tailGroup != null) {
    toolbarGroup.add(tailGroup);
  }
  for (AnAction anAction : extra) {
    toolbarGroup.add(anAction);
  }
  return ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, toolbarGroup, true);
}
项目:intellij-ce-playground    文件:StructureViewComponent.java   
protected ActionGroup createActionGroup() {
  DefaultActionGroup result = new DefaultActionGroup();
  Sorter[] sorters = myTreeModel.getSorters();
  for (final Sorter sorter : sorters) {
    if (sorter.isVisible()) {
      result.add(new TreeActionWrapper(sorter, this));
    }
  }
  if (sorters.length > 0) {
    result.addSeparator();
  }

  addGroupByActions(result);

  Filter[] filters = myTreeModel.getFilters();
  for (Filter filter : filters) {
    result.add(new TreeActionWrapper(filter, this));
  }
  if (myTreeModel instanceof ProvidingTreeModel) {
    final Collection<NodeProvider> providers = ((ProvidingTreeModel)myTreeModel).getNodeProviders();
    for (NodeProvider provider : providers) {
      result.add(new TreeActionWrapper(provider, this));
    }
  }

  result.add(new ExpandAllAction(getTree()));
  result.add(new CollapseAllAction(getTree()));

  if (showScrollToFromSourceActions()) {
    result.addSeparator();

    result.add(myAutoScrollToSourceHandler.createToggleAction());
    result.add(myAutoScrollFromSourceHandler.createToggleAction());
  }
  return result;
}
项目:intellij-ce-playground    文件:DomModelTreeView.java   
protected ActionGroup getPopupActions() {
  DefaultActionGroup group = new DefaultActionGroup();

  group.add(ActionManager.getInstance().getAction("DomElementsTreeView.TreePopup"));
  group.addSeparator();

  group.add(new ExpandAllAction(myTree));
  group.add(new CollapseAllAction(myTree));

  return group;
}
项目:intellij-ce-playground    文件:CapturesToolWindow.java   
private ActionGroup getPopupActions() {
  DefaultActionGroup group = new DefaultActionGroup();

  group.add(new ExpandAllAction(myTree));
  group.add(new CollapseAllAction(myTree));
  group.addSeparator();
  group.add(new RevealFileAction());
  group.add(new DeleteAction());
  group.addSeparator();
  group.add(new RunHprofConvAndSaveAsAction());

  return group;
}
项目:tools-idea    文件:CommittedChangesTreeBrowser.java   
public ActionToolbar createGroupFilterToolbar(final Project project, final ActionGroup leadGroup, @Nullable final ActionGroup tailGroup,
                                              final List<AnAction> extra) {
  DefaultActionGroup toolbarGroup = new DefaultActionGroup();
  toolbarGroup.add(leadGroup);
  toolbarGroup.addSeparator();
  toolbarGroup.add(new SelectFilteringAction(project, this));
  toolbarGroup.add(new SelectGroupingAction(this));
  final ExpandAllAction expandAllAction = new ExpandAllAction(myChangesTree);
  final CollapseAllAction collapseAllAction = new CollapseAllAction(myChangesTree);
  expandAllAction.registerCustomShortcutSet(
    new CustomShortcutSet(KeymapManager.getInstance().getActiveKeymap().getShortcuts(IdeActions.ACTION_EXPAND_ALL)),
    myChangesTree);
  collapseAllAction.registerCustomShortcutSet(
    new CustomShortcutSet(KeymapManager.getInstance().getActiveKeymap().getShortcuts(IdeActions.ACTION_COLLAPSE_ALL)),
    myChangesTree);
  toolbarGroup.add(expandAllAction);
  toolbarGroup.add(collapseAllAction);
  toolbarGroup.add(ActionManager.getInstance().getAction(IdeActions.ACTION_COPY));
  toolbarGroup.add(new ContextHelpAction(myHelpId));
  if (tailGroup != null) {
    toolbarGroup.add(tailGroup);
  }
  for (AnAction anAction : extra) {
    toolbarGroup.add(anAction);
  }
  return ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, toolbarGroup, true);
}
项目:tools-idea    文件:StructureViewComponent.java   
protected DefaultActionGroup createActionGroup(boolean togglesOnly) {
  DefaultActionGroup result = new DefaultActionGroup();
  Sorter[] sorters = myTreeModel.getSorters();
  for (final Sorter sorter : sorters) {
    if (sorter.isVisible()) {
      result.add(new TreeActionWrapper(sorter, this));
    }
  }
  if (sorters.length > 0) {
    result.addSeparator();
  }

  addGroupByActions(result);

  Filter[] filters = myTreeModel.getFilters();
  for (Filter filter : filters) {
    result.add(new TreeActionWrapper(filter, this));
  }
  if (myTreeModel instanceof ProvidingTreeModel) {
    final Collection<NodeProvider> providers = ((ProvidingTreeModel)myTreeModel).getNodeProviders();
    for (NodeProvider provider : providers) {
      result.add(new TreeActionWrapper(provider, this));
    }
  }

  if (!togglesOnly) {
    result.add(new ExpandAllAction(getTree()));
    result.add(new CollapseAllAction(getTree()));
  }

  if (showScrollToFromSourceActions()) {
    result.addSeparator();

    result.add(myAutoScrollToSourceHandler.createToggleAction());
    result.add(myAutoScrollFromSourceHandler.createToggleAction());
  }
  return result;
}
项目:tools-idea    文件:DomModelTreeView.java   
protected ActionGroup getPopupActions() {
  DefaultActionGroup group = new DefaultActionGroup();

  group.add(ActionManager.getInstance().getAction("DomElementsTreeView.TreePopup"));
  group.addSeparator();

  group.add(new ExpandAllAction(myTree));
  group.add(new CollapseAllAction(myTree));

  return group;
}
项目:consulo    文件:CommittedChangesTreeBrowser.java   
public ActionToolbar createGroupFilterToolbar(final Project project,
                                              final ActionGroup leadGroup,
                                              @Nullable final ActionGroup tailGroup,
                                              final List<AnAction> extra) {
  DefaultActionGroup toolbarGroup = new DefaultActionGroup();
  toolbarGroup.add(leadGroup);
  toolbarGroup.addSeparator();
  toolbarGroup.add(new SelectFilteringAction(project, this));
  toolbarGroup.add(new SelectGroupingAction(project, this));
  final ExpandAllAction expandAllAction = new ExpandAllAction(myChangesTree);
  final CollapseAllAction collapseAllAction = new CollapseAllAction(myChangesTree);
  expandAllAction.registerCustomShortcutSet(new CustomShortcutSet(KeymapManager.getInstance().getActiveKeymap().getShortcuts(IdeActions.ACTION_EXPAND_ALL)),
                                            myChangesTree);
  collapseAllAction
          .registerCustomShortcutSet(new CustomShortcutSet(KeymapManager.getInstance().getActiveKeymap().getShortcuts(IdeActions.ACTION_COLLAPSE_ALL)),
                                     myChangesTree);
  toolbarGroup.add(expandAllAction);
  toolbarGroup.add(collapseAllAction);
  toolbarGroup.add(ActionManager.getInstance().getAction(IdeActions.ACTION_COPY));
  toolbarGroup.add(new ContextHelpAction(myHelpId));
  if (tailGroup != null) {
    toolbarGroup.add(tailGroup);
  }
  for (AnAction anAction : extra) {
    toolbarGroup.add(anAction);
  }
  return ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, toolbarGroup, true);
}
项目:consulo    文件:StructureViewComponent.java   
protected DefaultActionGroup createActionGroup() {
  DefaultActionGroup result = new DefaultActionGroup();
  if (addCustomActions(result)) {
    result.addSeparator();
  }

  Sorter[] sorters = myTreeModel.getSorters();
  for (final Sorter sorter : sorters) {
    if (sorter.isVisible()) {
      result.add(new TreeActionWrapper(sorter, this));
    }
  }
  if (sorters.length > 0) {
    result.addSeparator();
  }

  addGroupByActions(result);

  Filter[] filters = myTreeModel.getFilters();
  for (Filter filter : filters) {
    result.add(new TreeActionWrapper(filter, this));
  }
  if (myTreeModel instanceof ProvidingTreeModel) {
    final Collection<NodeProvider> providers = ((ProvidingTreeModel)myTreeModel).getNodeProviders();
    for (NodeProvider provider : providers) {
      result.add(new TreeActionWrapper(provider, this));
    }
  }

  result.add(new ExpandAllAction(getTree()));
  result.add(new CollapseAllAction(getTree()));

  if (showScrollToFromSourceActions()) {
    result.addSeparator();

    result.add(myAutoScrollToSourceHandler.createToggleAction());
    result.add(myAutoScrollFromSourceHandler.createToggleAction());
  }
  return result;
}
项目:consulo-xml    文件:DomModelTreeView.java   
protected ActionGroup getPopupActions() {
  DefaultActionGroup group = new DefaultActionGroup();

  group.add(ActionManager.getInstance().getAction("DomElementsTreeView.TreePopup"));
  group.addSeparator();

  group.add(new ExpandAllAction(myTree));
  group.add(new CollapseAllAction(myTree));

  return group;
}