void (@NotNull Project project, @NotNull ToolWindowEx toolWindow, @NotNull AutoScrollToSourceHandler toSourceHandler) { ServiceViewAutoScrollFromSourceHandler fromSourceHandler = new ServiceViewAutoScrollFromSourceHandler(project, toolWindow); fromSourceHandler.install(); DefaultActionGroup additionalGearActions = new DefaultActionGroup(toSourceHandler.createToggleAction(), fromSourceHandler.createToggleAction()); List<AnAction> additionalProviderActions = ServiceViewActionProvider.getInstance().getAdditionalGearActions(); for (AnAction action : additionalProviderActions) { additionalGearActions.add(action); } toolWindow.setAdditionalGearActions(additionalGearActions); toolWindow.setTitleActions(new ScrollFromEditorAction(fromSourceHandler)); }