private void listenForProjectsChanges() {
    MavenProjectsManager.getInstance(myProject).addProjectsTreeListener(new MyProjectsListener(), this);

    MavenShortcutsManager.getInstance(myProject).addListener(() -> scheduleStructureRequest(() -> myStructure.updateGoals()), this);

    MavenTasksManager.getInstance(myProject).addListener(new MavenTasksManager.Listener() {
      @Override
      public void compileTasksChanged() {
        scheduleStructureRequest(() -> myStructure.updateGoals());
      }
    }, this);

    MavenRunner.getInstance(myProject).getSettings().addListener(new MavenRunnerSettings.Listener() {
      @Override
      public void skipTestsChanged() {
        scheduleStructureRequest(() -> myStructure.updateGoals());
      }
    }, this);

    myProject.getMessageBus().connect().subscribe(RunManagerListener.TOPIC, new RunManagerListener() {
      private void changed() {
        scheduleStructureRequest(() -> myStructure.updateRunConfigurations());
      }

      @Override
      public void runConfigurationAdded(@NotNull RunnerAndConfigurationSettings settings) {
        changed();
      }

      @Override
      public void runConfigurationRemoved(@NotNull RunnerAndConfigurationSettings settings) {
        changed();
      }

      @Override
      public void runConfigurationChanged(@NotNull RunnerAndConfigurationSettings settings) {
        changed();
      }

      @Override
      public void beforeRunTasksChanged() {
        scheduleStructureRequest(() -> myStructure.updateGoals());
      }
    });

    ApplicationManager.getApplication().getMessageBus().connect(this).subscribe(
      MavenSystemIndicesManager.TOPIC, new IndexChangeProgressListener() {
        @Override
        public void indexStatusChanged(@NotNull MavenIndexUpdateState state) {
          doScheduleStructureRequest(() -> {
            myStructure.updateRepositoryStatus(state);
          });
        }
      });

    ProjectRootManagerEx.getInstanceEx(myProject).addProjectJdkListener(() -> {
      MavenWslUtil.checkWslJdkAndShowNotification(myProject);
      MavenWslUtil.restartMavenConnectorsIfJdkIncorrect(myProject);
    });

    StartupManager.getInstance(myProject).runAfterOpened(() -> {
      DumbService.getInstance(myProject).runWhenSmart(() -> {
        MavenWslUtil.checkWslJdkAndShowNotification(myProject);
      });
    });
  }
private void listenForProjectsChanges()