mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
GitOrigin-RevId: f14655b143b97dd842ad64612a346c8207d2a920
This commit is contained in:
committed by
intellij-monorepo-bot
parent
75165a196e
commit
33fef5d89e
+4
-3
@@ -154,8 +154,9 @@ public final class MavenProjectsNavigator extends MavenSimpleProjectComponent im
|
||||
|
||||
@Override
|
||||
public void initializeComponent() {
|
||||
if (!isNormalProject()) return;
|
||||
doInit();
|
||||
if (isNormalProject()) {
|
||||
doInit();
|
||||
}
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
@@ -288,7 +289,7 @@ public final class MavenProjectsNavigator extends MavenSimpleProjectComponent im
|
||||
|
||||
ContentManager contentManager = toolWindow.getContentManager();
|
||||
Disposer.register(this, () -> {
|
||||
// fire content removed events, so subscribers could cleanup caches
|
||||
// fire content removed events, so subscribers could clean up caches
|
||||
contentManager.removeAllContents(true);
|
||||
Disposer.dispose(contentManager);
|
||||
if (!myProject.isDisposed()) {
|
||||
|
||||
+1
-3
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.idea.maven.project;
|
||||
|
||||
import com.intellij.build.BuildProgressListener;
|
||||
@@ -30,7 +30,6 @@ import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.ModificationTracker;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.VirtualFileManager;
|
||||
import com.intellij.psi.util.CachedValueProvider;
|
||||
@@ -260,7 +259,6 @@ public final class MavenProjectsManager extends MavenSimpleProjectComponent
|
||||
registerSyncConsoleListener();
|
||||
updateTabTitles();
|
||||
|
||||
|
||||
MavenUtil.runWhenInitialized(myProject, (DumbAwareRunnable)() -> {
|
||||
if (!ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
fireActivated();
|
||||
|
||||
@@ -127,12 +127,12 @@ public class MavenUtil {
|
||||
public static final String CLIENT_EXPLODED_ARTIFACT_SUFFIX = CLIENT_ARTIFACT_SUFFIX + " exploded";
|
||||
protected static final String PROP_FORCED_M2_HOME = "idea.force.m2.home";
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static final Pair<Pattern, String>[] SUPER_POM_PATHS = new Pair[]{
|
||||
Pair.create(Pattern.compile("maven-\\d+\\.\\d+\\.\\d+-uber\\.jar"), "org/apache/maven/project/" + MavenConstants.SUPER_POM_XML),
|
||||
Pair.create(Pattern.compile("maven-model-builder-\\d+\\.\\d+\\.\\d+\\.jar"), "org/apache/maven/model/" + MavenConstants.SUPER_POM_XML)
|
||||
};
|
||||
|
||||
public static final String MAVEN_NEW_PROJECT_MODEL_KEY = "maven.new.project.model";
|
||||
|
||||
private static volatile Map<String, String> ourPropertiesFromMvnOpts;
|
||||
@@ -213,9 +213,9 @@ public class MavenUtil {
|
||||
|
||||
@TestOnly
|
||||
public static List<Runnable> getUncompletedRunnables() {
|
||||
List<Runnable> result = new ArrayList<>();
|
||||
List<Runnable> result;
|
||||
synchronized (runnables) {
|
||||
result.addAll(runnables);
|
||||
result = new ArrayList<>(runnables);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -281,22 +281,21 @@ public class MavenUtil {
|
||||
}
|
||||
|
||||
public static void runWhenInitialized(@NotNull Project project, @NotNull Runnable runnable) {
|
||||
|
||||
if (project.isDisposed()) return;
|
||||
if (project.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isNoBackgroundMode()) {
|
||||
startTestRunnable(runnable);
|
||||
runAndFinishTestRunnable(runnable);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!project.isInitialized()) {
|
||||
else if (project.isInitialized()) {
|
||||
runDumbAware(project, runnable);
|
||||
}
|
||||
else {
|
||||
startTestRunnable(runnable);
|
||||
StartupManager.getInstance(project).runAfterOpened(() -> runAndFinishTestRunnable(runnable));
|
||||
return;
|
||||
}
|
||||
|
||||
runDumbAware(project, runnable);
|
||||
}
|
||||
|
||||
public static boolean isNoBackgroundMode() {
|
||||
|
||||
Reference in New Issue
Block a user