mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-210339 AE at com.intellij.ide.plugins.newui.PluginUpdatesService.recalculateUpdates
EA-142902 GitOrigin-RevId: 5ddc215c041d32f2aba276d5b06690d9c671b1c7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b5500da75c
commit
42b1f5ae3e
+18
-2
@@ -26,6 +26,7 @@ public class PluginUpdatesService {
|
||||
private static Collection<PluginDownloader> myCache;
|
||||
private static boolean myPrepared;
|
||||
private static boolean myPreparing;
|
||||
private static boolean myReset;
|
||||
|
||||
private Consumer<Integer> myTreeCallback;
|
||||
private Consumer<Integer> myTabCallback;
|
||||
@@ -117,13 +118,21 @@ public class PluginUpdatesService {
|
||||
|
||||
public void recalculateUpdates() {
|
||||
checkAccess();
|
||||
assert !myPreparing;
|
||||
|
||||
for (PluginUpdatesService service : SERVICES) {
|
||||
service.runAllCallbacks(0);
|
||||
}
|
||||
|
||||
calculateUpdates();
|
||||
if (myPreparing) {
|
||||
resetUpdates();
|
||||
}
|
||||
else {
|
||||
calculateUpdates();
|
||||
}
|
||||
}
|
||||
|
||||
private static void resetUpdates() {
|
||||
myReset = true;
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
@@ -178,6 +187,13 @@ public class PluginUpdatesService {
|
||||
checkAccess();
|
||||
|
||||
myPreparing = false;
|
||||
|
||||
if (myReset) {
|
||||
myReset = false;
|
||||
calculateUpdates();
|
||||
return;
|
||||
}
|
||||
|
||||
myPrepared = true;
|
||||
myCache = updates;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user