mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
CME
This commit is contained in:
@@ -30,10 +30,10 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
|
||||
public class MergingUpdateQueue implements Runnable, Disposable, Activatable {
|
||||
|
||||
public static final JComponent ANY_COMPONENT = new JComponent() {
|
||||
};
|
||||
|
||||
@@ -124,7 +124,8 @@ public class MergingUpdateQueue implements Runnable, Disposable, Activatable {
|
||||
|
||||
public void cancelAllUpdates() {
|
||||
synchronized (myScheduledUpdates) {
|
||||
for (Update each : myScheduledUpdates.keySet()) {
|
||||
Update[] updates = myScheduledUpdates.keySet().toArray(new Update[myScheduledUpdates.size()]);
|
||||
for (Update each : updates) {
|
||||
try {
|
||||
each.setRejected();
|
||||
}
|
||||
@@ -400,7 +401,9 @@ public class MergingUpdateQueue implements Runnable, Disposable, Activatable {
|
||||
|
||||
@SuppressWarnings({"HardCodedStringLiteral"})
|
||||
public String toString() {
|
||||
return myName + " active=" + myActive + " scheduled=" + myScheduledUpdates.size();
|
||||
synchronized (myScheduledUpdates) {
|
||||
return myName + " active=" + myActive + " scheduled=" + myScheduledUpdates.size();
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user