VcsCommittedViewAuxiliary (@NotNull DecoratorManager manager, @Nullable RepositoryLocation location) { JTabbedPane tabbedPane = null; List<AnAction> actions = null; List<AnAction> toolbarActions = null; final List<Runnable> calledOnDispose = new ArrayList<>(); for (AbstractVcs baseVcs : myBaseVcss) { CommittedChangesProvider<?, ?> provider = baseVcs.getCommittedChangesProvider(); if (provider != null) { VcsCommittedViewAuxiliary auxiliary = provider.createActions(manager, location); if (auxiliary != null) { if (tabbedPane == null) { tabbedPane = new JBTabbedPane(); actions = new ArrayList<>(); toolbarActions = new ArrayList<>(); } actions.addAll(auxiliary.getPopupActions()); toolbarActions.addAll(auxiliary.getToolbarActions()); calledOnDispose.add(auxiliary.getCalledOnViewDispose()); } } } if (tabbedPane != null) { final JPanel panel = new JPanel(); panel.add(tabbedPane); return new VcsCommittedViewAuxiliary(actions, () -> { for (Runnable runnable : calledOnDispose) { runnable.run(); } }, toolbarActions); } return null; }