public void setupToolWindow(ToolWindowEx window) { final CollapseAllAction collapseAction = new CollapseAllAction(myTree); collapseAction.getTemplatePresentation().setIcon(AllIcons.General.CollapseAll); collapseAction.getTemplatePresentation().setHoveredIcon(AllIcons.General.CollapseAllHover); window.setTitleActions(collapseAction); final DefaultActionGroup group = new DefaultActionGroup(); group.add(new FavoritesFlattenPackagesAction(myProject, myBuilder)); group.add(new FavoritesCompactEmptyMiddlePackagesAction(myProject, myBuilder)); group.addAction(new FavoritesAbbreviatePackageNamesAction(myProject, myBuilder)); group.add(new FavoritesShowMembersAction(myProject, myBuilder)); final FavoritesAutoscrollFromSourceHandler handler = new FavoritesAutoscrollFromSourceHandler(myProject, myBuilder); handler.install(); group.add(handler.createToggleAction()); group.add(new FavoritesAutoScrollToSourceAction(myProject, myAutoScrollToSourceHandler, myBuilder)); window.setAdditionalGearActions(group); }
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); }
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; }
public void setupToolWindow(ToolWindowEx window) { final CollapseAllAction collapseAction = new CollapseAllAction(myTree); collapseAction.getTemplatePresentation().setIcon(AllIcons.General.CollapseAll); collapseAction.getTemplatePresentation().setHoveredIcon(AllIcons.General.CollapseAllHover); window.setTitleActions(collapseAction); final DefaultActionGroup group = new DefaultActionGroup(); final ProjectViewDirectoryHelper helper = ProjectViewDirectoryHelper.getInstance(myProject); if (helper.supportsFlattenPackages()) { group.add(new FavoritesFlattenPackagesAction(myProject, myBuilder)); } if (helper.supportsHideEmptyMiddlePackages()) { group.add(new FavoritesCompactEmptyMiddlePackagesAction(myProject, myBuilder)); } if (helper.supportsFlattenPackages()) { group.addAction(new FavoritesAbbreviatePackageNamesAction(myProject, myBuilder)); } if (!PlatformUtils.isCidr()) { group.add(new FavoritesShowMembersAction(myProject, myBuilder)); } final FavoritesAutoscrollFromSourceHandler handler = new FavoritesAutoscrollFromSourceHandler(myProject, myBuilder); handler.install(); group.add(handler.createToggleAction()); group.add(new FavoritesAutoScrollToSourceAction(myProject, myAutoScrollToSourceHandler, myBuilder)); window.setAdditionalGearActions(group); }
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; }
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; }
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); }
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; }
public void setupToolWindow(ToolWindowEx window) { final CollapseAllAction collapseAction = new CollapseAllAction(myTree); collapseAction.getTemplatePresentation().setIcon(AllIcons.General.CollapseAll); collapseAction.getTemplatePresentation().setHoveredIcon(AllIcons.General.CollapseAllHover); window.setTitleActions(collapseAction); final DefaultActionGroup group = new DefaultActionGroup(); final ProjectViewDirectoryHelper helper = ProjectViewDirectoryHelper.getInstance(myProject); if (helper.supportsFlattenPackages()) { group.add(new FavoritesFlattenPackagesAction(myProject, myBuilder)); } if (helper.supportsHideEmptyMiddlePackages()) { group.add(new FavoritesCompactEmptyMiddlePackagesAction(myProject, myBuilder)); } if (helper.supportsFlattenPackages()) { group.addAction(new FavoritesAbbreviatePackageNamesAction(myProject, myBuilder)); } if (!PlatformUtils.isAppCode()) { group.add(new FavoritesShowMembersAction(myProject, myBuilder)); } final FavoritesAutoscrollFromSourceHandler handler = new FavoritesAutoscrollFromSourceHandler(myProject, myBuilder); handler.install(); group.add(handler.createToggleAction()); group.add(new FavoritesAutoScrollToSourceAction(myProject, myAutoScrollToSourceHandler, myBuilder)); window.setAdditionalGearActions(group); }
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); }
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; }