Java Code Examples for com.intellij.openapi.actionSystem.DefaultActionGroup#addSeparator()

The following examples show how to use com.intellij.openapi.actionSystem.DefaultActionGroup#addSeparator() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BuckToolWindowImpl.java    From buck with Apache License 2.0 6 votes vote down vote up
@Override
public ActionGroup getLeftToolbarActions() {
  ActionManager actionManager = ActionManager.getInstance();

  DefaultActionGroup group = new DefaultActionGroup();

  group.add(actionManager.getAction("buck.ChooseTarget"));
  group.addSeparator();
  group.add(actionManager.getAction("buck.Build"));
  group.add(actionManager.getAction("buck.Stop"));
  group.add(actionManager.getAction("buck.Test"));
  group.add(actionManager.getAction("buck.Install"));
  group.add(actionManager.getAction("buck.Uninstall"));
  group.add(actionManager.getAction("buck.Kill"));
  group.add(actionManager.getAction("buck.ScrollToEnd"));
  group.add(actionManager.getAction("buck.Clear"));

  return group;
}
 
Example 2
Source File: ManageButton.java    From consulo with Apache License 2.0 6 votes vote down vote up
@Nonnull
@Override
public DefaultActionGroup createPopupActionGroup(JComponent component) {
  DefaultActionGroup group = new DefaultActionGroup();

  group.add(new ShareToTeamCheckBoxAction());
  group.addSeparator();

  group.add(new CopyAction());
  group.add(new RenameAction());
  group.add(new DeleteAction());
  group.add(new EditDescriptionAction(myBuilder.hasDescription()));
  group.add(new ExportAction());
  group.addSeparator();

  group.add(new ImportAction());

  return group;
}
 
Example 3
Source File: DesktopFileSystemTreeFactoryImpl.java    From consulo with Apache License 2.0 6 votes vote down vote up
@Override
@Nonnull
public DefaultActionGroup createDefaultFileSystemActions(FileSystemTree fileSystemTree) {
  DefaultActionGroup group = new DefaultActionGroup();
  final ActionManager actionManager = ActionManager.getInstance();
  group.add(actionManager.getAction("FileChooser.GotoHome"));
  group.add(actionManager.getAction("FileChooser.GotoProject"));
  group.addSeparator();
  group.add(actionManager.getAction("FileChooser.NewFolder"));
  group.add(actionManager.getAction("FileChooser.Delete"));
  group.addSeparator();
  SynchronizeAction action1 = new SynchronizeAction();
  AnAction original = actionManager.getAction(IdeActions.ACTION_SYNCHRONIZE);
  action1.copyFrom(original);
  action1.registerCustomShortcutSet(original.getShortcutSet(), fileSystemTree.getTree());
  group.add(action1);
  group.addSeparator();
  group.add(actionManager.getAction("FileChooser.ShowHiddens"));

  return group;
}
 
Example 4
Source File: BPMNEditor.java    From intellij-bpmn-editor with GNU General Public License v3.0 6 votes vote down vote up
public void initBPMNModelMenu() {
    DefaultActionGroup modelMenu = (DefaultActionGroup) ActionManager.getInstance().getAction("yaoqiang.actions.BPMNModelMenu");
    AppMenu model = new ModelMenu();
    for (int i = 0; i < model.getItemCount(); i++) {
        JMenuItem item = model.getItem(i);
        if (item == null) {
            modelMenu.addSeparator();
        } else {
            AnAction action = new AnAction(item.getText()) {
                @Override
                public void actionPerformed(AnActionEvent e) {
                    item.getAction().actionPerformed(new ActionEvent(e, 0, ""));
                }
            };
            modelMenu.add(action);
        }
    }
}
 
Example 5
Source File: ConsoleLogConsole.java    From aem-ide-tooling-4-intellij with Apache License 2.0 5 votes vote down vote up
private DefaultActionGroup createPopupActions(ActionManager actionManager, ClearLogAction action) {
    AnAction[] children = ((ActionGroup)actionManager.getAction(IdeActions.GROUP_CONSOLE_EDITOR_POPUP)).getChildren(null);
    DefaultActionGroup group = new DefaultActionGroup(children);
    group.addSeparator();
    group.add(action);
    return group;
}
 
Example 6
Source File: TabLabel.java    From consulo with Apache License 2.0 5 votes vote down vote up
private void handlePopup(final MouseEvent e) {
  if (e.getClickCount() != 1 || !e.isPopupTrigger()) return;

  if (e.getX() < 0 ||
      e.getX() >= e.getComponent().getWidth() ||
      e.getY() < 0 ||
      e.getY() >= e.getComponent().getHeight()) {
    return;
  }

  String place = myTabs.getPopupPlace();
  place = place != null ? place : ActionPlaces.UNKNOWN;
  myTabs.myPopupInfo = myInfo;

  final DefaultActionGroup toShow = new DefaultActionGroup();
  if (myTabs.getPopupGroup() != null) {
    toShow.addAll(myTabs.getPopupGroup());
    toShow.addSeparator();
  }

  JBTabsImpl tabs = DataManager.getInstance().getDataContext(e.getComponent(), e.getX(), e.getY()).getData(JBTabsImpl.NAVIGATION_ACTIONS_KEY);
  if (tabs == myTabs && myTabs.myAddNavigationGroup) {
    toShow.addAll(myTabs.myNavigationActions);
  }

  if (toShow.getChildrenCount() == 0) return;

  myTabs.myActivePopup = myTabs.myActionManager.createActionPopupMenu(place, toShow).getComponent();
  myTabs.myActivePopup.addPopupMenuListener(myTabs.myPopupListener);

  myTabs.myActivePopup.addPopupMenuListener(myTabs);
  myTabs.myActivePopup.show(e.getComponent(), e.getX(), e.getY());
}
 
Example 7
Source File: BuckToolWindowFactory.java    From Buck-IntelliJ-Plugin with Apache License 2.0 5 votes vote down vote up
@NotNull
public ActionGroup getLeftToolbarActions(final Project project) {
  ActionManager actionManager = ActionManager.getInstance();

  DefaultActionGroup group = new DefaultActionGroup();
  group.add(actionManager.getAction("buck.ChooseTarget"));
  group.addSeparator();
  group.add(actionManager.getAction("buck.Install"));
  group.add(actionManager.getAction("buck.Build"));
  group.add(actionManager.getAction("buck.Kill"));
  group.add(actionManager.getAction("buck.Uninstall"));
  group.add(actionManager.getAction("buck.Project"));
  return group;
}
 
Example 8
Source File: FreelineTerminal.java    From freeline with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * 创建左侧工具栏
 *
 * @param terminalRunner
 * @param terminal
 * @param toolWindow
 * @return
 */
private ActionToolbar createToolbar(@Nullable AbstractTerminalRunner terminalRunner, @NotNull JBTabbedTerminalWidget terminal, @NotNull ToolWindow toolWindow) {
    DefaultActionGroup group = new DefaultActionGroup();
    if (terminalRunner != null) {
        group.add(new RunAction(this));
        group.add(new StopAction(this));
        group.addSeparator();
        group.add(new DebugAction(this));
        group.add(new ForceAction(this));
        group.addSeparator();
        group.add(new ClearAction(this));
    }
    return ActionManager.getInstance().createActionToolbar("unknown", group, false);
}
 
Example 9
Source File: TestDebugProcess.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void registerAdditionalActions(@NotNull DefaultActionGroup leftToolbar,
                                      @NotNull DefaultActionGroup topToolbar,
                                      @NotNull DefaultActionGroup settings) {
  topToolbar.addSeparator();
  topToolbar.addAction(new FlutterPopFrameAction());
  topToolbar.addAction(new OpenDevToolsAction(connector, this::isActive));
}
 
Example 10
Source File: DiffUtil.java    From consulo with Apache License 2.0 5 votes vote down vote up
public static void addActionBlock(@Nonnull DefaultActionGroup group, @Nullable List<? extends AnAction> actions) {
  if (actions == null || actions.isEmpty()) return;
  group.addSeparator();

  AnAction[] children = group.getChildren(null);
  for (AnAction action : actions) {
    if (!ArrayUtil.contains(action, children)) {
      group.add(action);
    }
  }
}
 
Example 11
Source File: ArtifactsStructureConfigurable.java    From consulo with Apache License 2.0 5 votes vote down vote up
private AnAction createAddArtifactAction(@Nonnull final ArtifactType type) {
  final List<? extends ArtifactTemplate> templates = type.getNewArtifactTemplates(myPackagingEditorContext);
  final ArtifactTemplate emptyTemplate = new ArtifactTemplate() {
    @Override
    public String getPresentableName() {
      return "Empty";
    }

    @Override
    public NewArtifactConfiguration createArtifact() {
      final String name = "unnamed";
      return new NewArtifactConfiguration(type.createRootElement(PackagingElementFactory.getInstance(myProject), name), name, type);
    }
  };

  if (templates.isEmpty()) {
    return new AddArtifactAction(type, emptyTemplate, type.getPresentableName(), type.getIcon());
  }
  final DefaultActionGroup group = new DefaultActionGroup(type.getPresentableName(), true);
  group.getTemplatePresentation().setIcon(type.getIcon());
  group.add(new AddArtifactAction(type, emptyTemplate, emptyTemplate.getPresentableName(), null));
  group.addSeparator();
  for (ArtifactTemplate template : templates) {
    group.add(new AddArtifactAction(type, template, template.getPresentableName(), null));
  }
  return group;
}
 
Example 12
Source File: FlutterPerformanceView.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private DefaultActionGroup createToolbar(@NotNull ToolWindow toolWindow,
                                         @NotNull FlutterApp app,
                                         Disposable parentDisposable) {
  final DefaultActionGroup toolbarGroup = new DefaultActionGroup();
  toolbarGroup.add(registerAction(new PerformanceOverlayAction(app)));
  toolbarGroup.addSeparator();
  toolbarGroup.add(registerAction(new DebugPaintAction(app)));
  toolbarGroup.add(registerAction(new ShowPaintBaselinesAction(app, true)));
  toolbarGroup.addSeparator();
  toolbarGroup.add(registerAction(new TimeDilationAction(app, true)));

  return toolbarGroup;
}
 
Example 13
Source File: BazelTestDebugProcess.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void registerAdditionalActions(@NotNull DefaultActionGroup leftToolbar,
                                      @NotNull DefaultActionGroup topToolbar,
                                      @NotNull DefaultActionGroup settings) {
  topToolbar.addSeparator();
  topToolbar.addAction(new FlutterPopFrameAction());
  topToolbar.addAction(new OpenDevToolsAction(connector, this::isActive));
}
 
Example 14
Source File: DartVmServiceDebugProcess.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void registerAdditionalActions(@NotNull final DefaultActionGroup leftToolbar,
                                      @NotNull final DefaultActionGroup topToolbar,
                                      @NotNull final DefaultActionGroup settings) {
  // For Run tool window this action is added in DartCommandLineRunningState.createActions()
  topToolbar.addSeparator();
  topToolbar.addAction(new DartPopFrameAction());
}
 
Example 15
Source File: FlutterPerformanceView.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private DefaultActionGroup createToolbar(@NotNull ToolWindow toolWindow,
                                         @NotNull FlutterApp app,
                                         Disposable parentDisposable) {
  final DefaultActionGroup toolbarGroup = new DefaultActionGroup();
  toolbarGroup.add(registerAction(new PerformanceOverlayAction(app)));
  toolbarGroup.addSeparator();
  toolbarGroup.add(registerAction(new DebugPaintAction(app)));
  toolbarGroup.add(registerAction(new ShowPaintBaselinesAction(app, true)));
  toolbarGroup.addSeparator();
  toolbarGroup.add(registerAction(new TimeDilationAction(app, true)));

  return toolbarGroup;
}
 
Example 16
Source File: ToolbarPanel.java    From consulo with Apache License 2.0 4 votes vote down vote up
public ToolbarPanel(final TestConsoleProperties properties,
                    final JComponent parent) {
  super(new BorderLayout());
  final DefaultActionGroup actionGroup = new DefaultActionGroup(null, false);
  actionGroup.addAction(new DumbAwareToggleInvertedBooleanProperty(ExecutionBundle.message("junit.run.hide.passed.action.name"), ExecutionBundle.message("junit.run.hide.passed.action.description"),
                                                                   AllIcons.RunConfigurations.TestPassed,
                                                                   properties, TestConsoleProperties.HIDE_PASSED_TESTS));
  actionGroup.add(new DumbAwareToggleInvertedBooleanProperty("Show Ignored", "Show Ignored", AllIcons.RunConfigurations.TestIgnored,
                                                             properties, TestConsoleProperties.HIDE_IGNORED_TEST));
  actionGroup.addSeparator();



  actionGroup.addAction(new DumbAwareToggleBooleanProperty(ExecutionBundle.message("junit.runing.info.sort.alphabetically.action.name"),
                                                           ExecutionBundle.message("junit.runing.info.sort.alphabetically.action.description"),
                                                           AllIcons.ObjectBrowser.Sorted,
                                                           properties, TestConsoleProperties.SORT_ALPHABETICALLY));
  final ToggleModelAction sortByStatistics = new SortByDurationAction(properties);
  myActions.add(sortByStatistics);
  actionGroup.addAction(sortByStatistics);
  actionGroup.addSeparator();

  AnAction action = CommonActionsManager.getInstance().createExpandAllAction(myTreeExpander, parent);
  action.getTemplatePresentation().setDescription(ExecutionBundle.message("junit.runing.info.expand.test.action.name"));
  actionGroup.add(action);

  action = CommonActionsManager.getInstance().createCollapseAllAction(myTreeExpander, parent);
  action.getTemplatePresentation().setDescription(ExecutionBundle.message("junit.runing.info.collapse.test.action.name"));
  actionGroup.add(action);

  actionGroup.addSeparator();
  final CommonActionsManager actionsManager = CommonActionsManager.getInstance();
  myOccurenceNavigator = new FailedTestsNavigator();
  actionGroup.add(actionsManager.createPrevOccurenceAction(myOccurenceNavigator));
  actionGroup.add(actionsManager.createNextOccurenceAction(myOccurenceNavigator));

  for (ToggleModelActionProvider actionProvider : ToggleModelActionProvider.EP_NAME.getExtensionList()) {
    final ToggleModelAction toggleModelAction = actionProvider.createToggleModelAction(properties);
    myActions.add(toggleModelAction);
    actionGroup.add(toggleModelAction);
  }

  final RunProfile configuration = properties.getConfiguration();
  if (configuration instanceof RunConfiguration) {
    myExportAction = ExportTestResultsAction.create(properties.getExecutor().getToolWindowId(), (RunConfiguration)configuration);
    actionGroup.addAction(myExportAction);
  }

  final AnAction importAction = properties.createImportAction();
  if (importAction != null) {
    actionGroup.addAction(importAction);
  }

  final DefaultActionGroup secondaryGroup = new DefaultActionGroup();
  secondaryGroup.setPopup(true);
  secondaryGroup.getTemplatePresentation().setIcon(AllIcons.General.SecondaryGroup);
  secondaryGroup.add(new DumbAwareToggleBooleanProperty(ExecutionBundle.message("junit.runing.info.track.test.action.name"),
                                                        ExecutionBundle.message("junit.runing.info.track.test.action.description"),
                                                        null, properties, TestConsoleProperties.TRACK_RUNNING_TEST));
  if (Registry.is("tests.view.old.statistics.panel")) {
    secondaryGroup.add(new ShowStatisticsAction(properties));
  }
  secondaryGroup.add(new DumbAwareToggleBooleanProperty("Show Inline Statistics", "Toggle the visibility of the test duration in the tree",
                                                        null, properties, TestConsoleProperties.SHOW_INLINE_STATISTICS));

  secondaryGroup.addSeparator();
  secondaryGroup.add(new DumbAwareToggleBooleanProperty(ExecutionBundle.message("junit.runing.info.scroll.to.stacktrace.action.name"),
                                                        ExecutionBundle.message("junit.runing.info.scroll.to.stacktrace.action.description"),
                                                        null, properties, TestConsoleProperties.SCROLL_TO_STACK_TRACE));
  secondaryGroup.add(new ToggleBooleanProperty(ExecutionBundle.message("junit.runing.info.open.source.at.exception.action.name"),
                                               ExecutionBundle.message("junit.runing.info.open.source.at.exception.action.description"),
                                               null, properties, TestConsoleProperties.OPEN_FAILURE_LINE));
  myScrollToSource = new ScrollToTestSourceAction(properties);
  secondaryGroup.add(myScrollToSource);

  secondaryGroup.add(new AdjustAutotestDelayActionGroup(parent));
  secondaryGroup.addSeparator();
  secondaryGroup.add(new DumbAwareToggleBooleanProperty(ExecutionBundle.message("junit.runing.info.select.first.failed.action.name"),
                                                        null, null, properties, TestConsoleProperties.SELECT_FIRST_DEFECT));
  properties.appendAdditionalActions(secondaryGroup, parent, properties);
  actionGroup.add(secondaryGroup);

  add(ActionManager.getInstance().
          createActionToolbar(ActionPlaces.TESTTREE_VIEW_TOOLBAR, actionGroup, true).
          getComponent(), BorderLayout.CENTER);
}
 
Example 17
Source File: MongoPanel.java    From nosql4idea with Apache License 2.0 4 votes vote down vote up
void installResultPanelActions() {
    DefaultActionGroup actionResultGroup = new DefaultActionGroup("MongoResultGroup", true);
    if (ApplicationManager.getApplication() != null) {
        actionResultGroup.add(new ExecuteQuery<MongoPanel>(this));
        actionResultGroup.add(new OpenFindAction(this));
        actionResultGroup.add(new EnableAggregateAction(queryPanel));
        actionResultGroup.addSeparator();
        actionResultGroup.add(new AddMongoDocumentAction(resultPanel));
        actionResultGroup.add(new EditMongoDocumentAction(resultPanel));
        actionResultGroup.add(new CopyResultAction(resultPanel));
    }
    final TreeExpander treeExpander = new TreeExpander() {
        @Override
        public void expandAll() {
            resultPanel.expandAll();
        }

        @Override
        public boolean canExpand() {
            return true;
        }

        @Override
        public void collapseAll() {
            resultPanel.collapseAll();
        }

        @Override
        public boolean canCollapse() {
            return true;
        }
    };

    CommonActionsManager actionsManager = CommonActionsManager.getInstance();

    final AnAction expandAllAction = actionsManager.createExpandAllAction(treeExpander, resultPanel);
    final AnAction collapseAllAction = actionsManager.createCollapseAllAction(treeExpander, resultPanel);

    Disposer.register(this, new Disposable() {
        @Override
        public void dispose() {
            collapseAllAction.unregisterCustomShortcutSet(resultPanel);
            expandAllAction.unregisterCustomShortcutSet(resultPanel);
        }
    });

    actionResultGroup.addSeparator();
    actionResultGroup.add(expandAllAction);
    actionResultGroup.add(collapseAllAction);
    actionResultGroup.add(new CloseFindEditorAction(this));

    ActionToolbar actionToolBar = ActionManager.getInstance().createActionToolbar("MongoResultGroupActions", actionResultGroup, true);
    actionToolBar.setLayoutPolicy(ActionToolbar.AUTO_LAYOUT_POLICY);
    JComponent actionToolBarComponent = actionToolBar.getComponent();
    actionToolBarComponent.setBorder(null);
    actionToolBarComponent.setOpaque(false);

    toolBar.add(actionToolBarComponent, BorderLayout.CENTER);
}
 
Example 18
Source File: RedisPanel.java    From nosql4idea with Apache License 2.0 4 votes vote down vote up
protected void addCommonsActions() {
    final TreeExpander treeExpander = new TreeExpander() {
        @Override
        public void expandAll() {
            RedisPanel.this.expandAll();
        }

        @Override
        public boolean canExpand() {
            return true;
        }

        @Override
        public void collapseAll() {
            RedisPanel.this.collapseAll();
        }

        @Override
        public boolean canCollapse() {
            return true;
        }
    };

    CommonActionsManager actionsManager = CommonActionsManager.getInstance();

    final AnAction expandAllAction = actionsManager.createExpandAllAction(treeExpander, resultPanel);
    final AnAction collapseAllAction = actionsManager.createCollapseAllAction(treeExpander, resultPanel);

    Disposer.register(this, new Disposable() {
        @Override
        public void dispose() {
            collapseAllAction.unregisterCustomShortcutSet(resultPanel);
            expandAllAction.unregisterCustomShortcutSet(resultPanel);
        }
    });

    DefaultActionGroup actionResultGroup = new DefaultActionGroup("RedisResultGroup", true);
    actionResultGroup.add(new ExecuteQuery<>(this));
    actionResultGroup.addSeparator();
    actionResultGroup.add(new EnableGroupingAction(this));
    actionResultGroup.add(new SetSeparatorAction(this));
    actionResultGroup.addSeparator();
    actionResultGroup.add(expandAllAction);
    actionResultGroup.add(collapseAllAction);

    ActionToolbar actionToolBar = ActionManager.getInstance().createActionToolbar("MongoResultGroupActions", actionResultGroup, true);
    actionToolBar.setLayoutPolicy(ActionToolbar.AUTO_LAYOUT_POLICY);
    JComponent actionToolBarComponent = actionToolBar.getComponent();
    actionToolBarComponent.setBorder(null);
    actionToolBarComponent.setOpaque(false);

    toolBarPanel.add(actionToolBarComponent, BorderLayout.CENTER);
}
 
Example 19
Source File: CouchbasePanel.java    From nosql4idea with Apache License 2.0 4 votes vote down vote up
protected void addCommonsActions() {
    final TreeExpander treeExpander = new TreeExpander() {
        @Override
        public void expandAll() {
            CouchbasePanel.this.expandAll();
        }

        @Override
        public boolean canExpand() {
            return true;
        }

        @Override
        public void collapseAll() {
            CouchbasePanel.this.collapseAll();
        }

        @Override
        public boolean canCollapse() {
            return true;
        }
    };

    CommonActionsManager actionsManager = CommonActionsManager.getInstance();

    final AnAction expandAllAction = actionsManager.createExpandAllAction(treeExpander, resultPanel);
    final AnAction collapseAllAction = actionsManager.createCollapseAllAction(treeExpander, resultPanel);

    Disposer.register(this, new Disposable() {
        @Override
        public void dispose() {
            collapseAllAction.unregisterCustomShortcutSet(resultPanel);
            expandAllAction.unregisterCustomShortcutSet(resultPanel);
        }
    });

    DefaultActionGroup actionResultGroup = new DefaultActionGroup("CouchbaseResultGroup", true);
    actionResultGroup.add(new ExecuteQuery<>(this));
    actionResultGroup.addSeparator();
    actionResultGroup.add(expandAllAction);
    actionResultGroup.add(collapseAllAction);

    ActionToolbar actionToolBar = ActionManager.getInstance().createActionToolbar("CouchbaseResultGroupActions", actionResultGroup, true);
    actionToolBar.setLayoutPolicy(ActionToolbar.AUTO_LAYOUT_POLICY);
    JComponent actionToolBarComponent = actionToolBar.getComponent();
    actionToolBarComponent.setBorder(null);
    actionToolBarComponent.setOpaque(false);

    toolBarPanel.add(actionToolBarComponent, BorderLayout.CENTER);
}
 
Example 20
Source File: SymfonyProfilerWidget.java    From idea-php-symfony2-plugin with MIT License 4 votes vote down vote up
public DefaultActionGroup getActions(){
    DefaultActionGroup actionGroup = new DefaultActionGroup(null, false);

    ProfilerIndexInterface index = ProfilerFactoryUtil.createIndex(getProject());
    if(index == null) {
        return actionGroup;
    }

    List<ProfilerRequestInterface> requests = index.getRequests();

    Collection<AnAction> templateActions = new ArrayList<>();
    Map<String, Integer> templateActionsMap = new HashMap<>();

    Collection<AnAction> routeActions = new ArrayList<>();
    Map<String, Integer> routeActionsMap = new HashMap<>();

    Collection<AnAction> controllerActions = new ArrayList<>();
    Map<String, Integer> controllerActionsMap = new HashMap<>();

    Collection<AnAction> urlActions = new ArrayList<>();
    Collection<AnAction> mailActions = new ArrayList<>();

    for(ProfilerRequestInterface profilerRequest : requests) {
        urlActions.add(new SymfonyProfilerWidgetActions.UrlAction(index, profilerRequest));

        DefaultDataCollectorInterface collector = profilerRequest.getCollector(DefaultDataCollectorInterface.class);
        if(collector != null) {
            attachProfileItem(templateActions, templateActionsMap, collector.getTemplate(), ProfilerTarget.TEMPLATE);
            attachProfileItem(routeActions, routeActionsMap, collector.getRoute(), ProfilerTarget.ROUTE);
            attachProfileItem(controllerActions, controllerActionsMap, collector.getController(), ProfilerTarget.CONTROLLER);
        }

        // @TODO: use collector
        //String content = profilerRequest.getContent();
        //if(content != null && content.contains("Swift_Mime_Headers_MailboxHeader")) {
        //    mailActions.add(new SymfonyProfilerWidgetActions.UrlAction(getProject(), profilerRequest, statusCode).withPanel("swiftmailer").withIcon(Symfony2Icons.MAIL));
        //}
    }

    // routes
    if(urlActions.size() > 0) {
        actionGroup.addSeparator("Debug-Url");
        actionGroup.addAll(urlActions);
    }

    // mails send by request
    if(mailActions.size() > 0) {
        actionGroup.addSeparator("E-Mail");
        actionGroup.addAll(mailActions);
    }

    // routes
    if(routeActions.size() > 0) {
        actionGroup.addSeparator("Routes");
        actionGroup.addAll(routeActions);
    }

    // controller methods
    if(controllerActions.size() > 0) {
        actionGroup.addSeparator("Controller");
        actionGroup.addAll(controllerActions);
    }

    // template should be most use case; so keep it in cursor range
    if(templateActions.size() > 0) {
        actionGroup.addSeparator("Template");
        actionGroup.addAll(templateActions);
    }

    return actionGroup;
}