mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-56674 cleanup
GitOrigin-RevId: df19655fce9e97febb641faf804d76fedca746b4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
74400d20d2
commit
e2121d5da3
@@ -49,12 +49,24 @@ public final class BuildContentManagerImpl implements BuildContentManager {
|
||||
private static final String[] ourPresetOrder = {Sync, Build, Run, Debug};
|
||||
private static final Key<Map<Object, CloseListener>> CONTENT_CLOSE_LISTENERS = Key.create("CONTENT_CLOSE_LISTENERS");
|
||||
|
||||
private Project myProject;
|
||||
private final Project myProject;
|
||||
private List<Runnable> myPostponedRunnables = new ArrayList<>();
|
||||
private final Map<Content, Pair<Icon, AtomicInteger>> liveContentsMap = ContainerUtil.newConcurrentMap();
|
||||
|
||||
public BuildContentManagerImpl(@NotNull Project project) {
|
||||
init(project);
|
||||
myProject = project;
|
||||
if (project.isDefault()) {
|
||||
return;
|
||||
}
|
||||
|
||||
StartupManager.getInstance(project).runAfterOpened(() -> {
|
||||
ApplicationManager.getApplication().invokeLater(() -> {
|
||||
for (Runnable postponedRunnable : myPostponedRunnables) {
|
||||
postponedRunnable.run();
|
||||
}
|
||||
myPostponedRunnables = null;
|
||||
}, ModalityState.NON_MODAL, project.getDisposed());
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -88,22 +100,6 @@ public final class BuildContentManagerImpl implements BuildContentManager {
|
||||
return toolWindow;
|
||||
}
|
||||
|
||||
private void init(@NotNull Project project) {
|
||||
myProject = project;
|
||||
if (project.isDefault()) {
|
||||
return;
|
||||
}
|
||||
|
||||
StartupManager.getInstance(project).runAfterOpened(() -> {
|
||||
ApplicationManager.getApplication().invokeLater(() -> {
|
||||
for (Runnable postponedRunnable : myPostponedRunnables) {
|
||||
postponedRunnable.run();
|
||||
}
|
||||
myPostponedRunnables = null;
|
||||
}, ModalityState.NON_MODAL, project.getDisposed());
|
||||
});
|
||||
}
|
||||
|
||||
private void runWhenInitialized(@NotNull Runnable runnable) {
|
||||
if (myPostponedRunnables == null) {
|
||||
runnable.run();
|
||||
|
||||
Reference in New Issue
Block a user