public synchronized void setupImpl(@NotNull ToolWindow toolWindow, final boolean loadPaneExtensions) {
    ThreadingAssertions.assertEventDispatchThread();
    if (isInitialized) return;

    var loadStatisticsReporter = new ProjectViewInitReporter();
    project.getMessageBus().connect(loadStatisticsReporter).subscribe(ProjectViewListener.TOPIC, loadStatisticsReporter);
    project.getService(ProjectViewInitNotifier.class).initStarted();

    actionGroup = new DefaultActionGroup();

    autoScrollFromSourceHandler.install();

    contentManager = toolWindow.getContentManager();
    if (!ApplicationManager.getApplication().isUnitTestMode()) {
      toolWindow.setDefaultContentUiType(ToolWindowContentUiType.COMBO);
      toolWindow.setAdditionalGearActions(actionGroup);
      toolWindow.getComponent().putClientProperty(ToolWindowContentUi.HIDE_ID_LABEL, "true");
    }

    GuiUtils.replaceJSplitPaneWithIDEASplitter(panel);
    SwingUtilities.invokeLater(() -> splitterProportions.restoreSplitterProportions(panel));

    if (loadPaneExtensions) {
      ensurePanesLoaded();
    }
    isInitialized = true;
    doAddUninitializedPanes();

    getContentManager().addContentManagerListener(new ContentManagerListener() {
      @Override
      public void selectionChanged(@NotNull ContentManagerEvent event) {
        if (event.getOperation() == ContentManagerEvent.ContentOperation.add) {
          viewSelectionChanged();
        }
      }
    });
    viewSelectionChanged();
    setupToolwindowActions(toolWindow);

    Object multicaster = EditorFactory.getInstance().getEventMulticaster();
    if (multicaster instanceof EditorEventMulticasterEx ex) {
      ex.addFocusChangeListener(new FocusChangeListener() {
        @Override
        public void focusLost(@NotNull Editor editor, @NotNull FocusEvent event) {
          autoScrollFromSourceHandler.cancelAllRequests();
          myAutoScrollOnFocusEditor.set(true);
        }

        @Override
        public void focusGained(@NotNull Editor editor, @NotNull FocusEvent event) {
          if (!Registry.is("ide.autoscroll.from.source.on.focus.gained")) return;
          if (!myAutoScrollOnFocusEditor.getAndSet(true)) return;
          if (isAutoscrollFromSource(getCurrentViewId())) {
            autoScrollFromSourceHandler.addRequest(() -> {
              // ensure that it is still enabled after a while
              if (isAutoscrollFromSource(getCurrentViewId())) {
                if (findFileEditor(editor) != null) {
                  SelectInProjectViewImplKt.getLOG().debug("Invoking scroll from source because the editor has gained focus");
                  autoScrollFromSourceHandler.scrollFromSource();
                }
              }
            });
          }
        }
      }, project);
    }
  }
public synchronized void setupImpl(@NotNull ToolWindow toolWindow, final boolean loadPaneExtensions)