void () { Application app = ApplicationManager.getApplication(); if (MavenUtil.isMavenUnitTestModeEnabled() || app.isHeadlessEnvironment()) { return; } addProjectsTreeListener(new MavenProjectsTree.Listener() { @Override public void projectsUpdated(@NotNull List<Pair<MavenProject, MavenProjectChanges>> updated, @NotNull List<MavenProject> deleted) { updateTabName(MavenUtil.collectFirsts(updated), myProject); } }); }