@Override
    public void toolWindowShown(@NotNull ToolWindow toolWindow) {
      if (!ToolWindowId.PROJECT_VIEW.equals(toolWindow.getId())) {
        return;
      }

      Project project = toolWindow.getProject();
      ProjectView projectView = ProjectView.getInstance(project);
      AbstractProjectViewPane pane = projectView.getCurrentProjectViewPane();
      if (pane == null) {
        return;
      }

      Module[] modules = ModuleManager.getInstance(project).getModules();
      if (modules.length != 1 || !GeneralModuleType.TYPE_ID.equals(modules[0].getModuleTypeName())) {
        JTree tree = pane.getTree();
        if (tree != null && projectView instanceof ProjectViewImpl impl && impl.firstShow) {
          impl.firstShow = false;
          TreeUtil.promiseSelectFirst(tree).onSuccess(tree::expandPath);
        }
      }

      if (projectView.isAutoscrollFromSource(pane.getId())) {
        SelectInProjectViewImplKt.getLOG().debug("Invoking scroll from source because the project view is shown");

        if (projectView instanceof ProjectViewImpl impl) {
          impl.autoScrollFromSourceHandler.scrollFromSource();
        }
      }
    }
@Override
    public void toolWindowShown(@NotNull ToolWindow toolWindow)