ActionGroup () { final DefaultActionGroup actionGroup = new DefaultActionGroup(); if (myViewExtension.supportFlattenPackages()) { actionGroup.add(new FlattenPackagesAction()); } installAutoScrollToSource(actionGroup); installAutoScrollFromSource(actionGroup); actionGroup.add(ActionManager.getInstance().getAction("GenerateCoverageReport")); List<AnAction> extraActions = myViewExtension.createExtraToolbarActions(); extraActions.forEach(actionGroup::add); boolean hasFilters = false; final DefaultActionGroup filtersActionGroup = new DefaultActionGroup(); if (ProjectLevelVcsManager.getInstance(myProject).hasActiveVcss()) { filtersActionGroup.add(new ShowOnlyModifiedAction()); hasFilters = true; myHasVCSFilter = true; } else { myStateBean.setShowOnlyModified(false); } if (myViewExtension.supportFlattenPackages()) { filtersActionGroup.add(new HideFullyCoveredAction()); hasFilters = true; myHasFullyCoveredFilter = true; } else { myStateBean.setHideFullyCovered(false); } if (hasFilters) { filtersActionGroup.setPopup(true); filtersActionGroup.getTemplatePresentation().setIcon(FILTER_ICON); filtersActionGroup.getTemplatePresentation().setText(CoverageBundle.messagePointer("coverage.view.filters.group")); actionGroup.add(filtersActionGroup); } return actionGroup; }