void () { MavenProjectsManager.getInstance(myProject).addManagerListener(new MavenProjectsManager.Listener() { @Override public void activated() { AppUIUtil.invokeLaterIfProjectAlive(myProject, () -> initToolWindow()); listenForProjectsChanges(); scheduleStructureUpdate(); } }); }