IDEA-69118 Perforce: don't add new NotLoggedToPerforce notification on each Refresh pressing in Inspect PerforceConfigurationState dialog

(cherry picked from commit fb4784e2d9358a73d917fdf8680b1909fefdfaa5)
This commit is contained in:
irengrig
2011-05-04 14:32:50 +04:00
parent e0ef01bb37
commit 4b0f968ca9
@@ -81,15 +81,6 @@ public abstract class GenericNotifierImpl<T, Key> {
final Application application = ApplicationManager.getApplication();
final Runnable runnable = new Runnable() {
public void run() {
final Iterator<MyNotification<T>> iterator = notifications.iterator();
while (iterator.hasNext()) {
final MyNotification<T> notification = iterator.next();
synchronized (myLock) {
if (myState.containsKey(getKey(notification.getObj()))) {
iterator.remove();
}
}
}
for (MyNotification<T> notification : notifications) {
notification.expire();
}
@@ -106,11 +97,6 @@ public abstract class GenericNotifierImpl<T, Key> {
final Application application = ApplicationManager.getApplication();
final Runnable runnable = new Runnable() {
public void run() {
synchronized (myLock) {
if (myState.containsKey(getKey(notification.getObj()))) {
return;
}
}
notification.expire();
}
};
@@ -138,7 +124,7 @@ public abstract class GenericNotifierImpl<T, Key> {
application.invokeLater(new Runnable() {
public void run() {
synchronized (myLock) {
if (! myState.containsKey(getKey(notification.getObj()))) return;
if (notification.isExpired() || ! myState.containsKey(getKey(notification.getObj()))) return;
}
Notifications.Bus.notify(notification, NotificationDisplayType.STICKY_BALLOON, myProject);
}