Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2016-03-07 06:20:42 -0500
committerMarkus Keller2016-03-07 06:20:42 -0500
commit5c1ed7eb4583e931eb5f34556d1a0023e0e6e402 (patch)
tree8e44fef86b2fe1a46227634253a73f3a8c96a689
parent35bbbefa70b747bdbf88ce0dea5e2c36c9f01335 (diff)
downloadeclipse.platform.debug-5c1ed7eb4583e931eb5f34556d1a0023e0e6e402.tar.gz
eclipse.platform.debug-5c1ed7eb4583e931eb5f34556d1a0023e0e6e402.tar.xz
eclipse.platform.debug-5c1ed7eb4583e931eb5f34556d1a0023e0e6e402.zip
Bug 486157 - Adapt to ListenerList changes
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java21
1 files changed, 5 insertions, 16 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java
index bc84e46db..882fd3638 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java
@@ -224,8 +224,7 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis
}
protected void notify(final DebugContextEvent event, ListenerList<IDebugContextListener> listeners) {
- for (IDebugContextListener iDebugContextListener : listeners) {
- final IDebugContextListener listener = iDebugContextListener;
+ for (final IDebugContextListener listener : listeners) {
SafeRunner.run(new ISafeRunnable() {
@Override
public void run() throws Exception {
@@ -262,13 +261,8 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis
continue outer;
}
}
- inner: for (IDebugContextListener iDebugContextListener : fListenersByPartId.get(listenerPartId)) {
- for (IDebugContextListener addedListener : retVal) {
- if (iDebugContextListener.equals(addedListener)){
- continue inner;
- }
- }
- retVal.add(iDebugContextListener);
+ for (IDebugContextListener iDebugContextListener : fListenersByPartId.get(listenerPartId)) {
+ retVal.add(iDebugContextListener); // no effect if listener already present
}
}
return retVal;
@@ -292,13 +286,8 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis
continue outer;
}
}
- inner: for (IDebugContextListener iDebugContextListener : fPostListenersByPartId.get(listenerPartId)) {
- for (IDebugContextListener addedListener : retVal) {
- if (iDebugContextListener.equals(addedListener)) {
- continue inner;
- }
- }
- retVal.add(iDebugContextListener);
+ for (IDebugContextListener iDebugContextListener : fPostListenersByPartId.get(listenerPartId)) {
+ retVal.add(iDebugContextListener); // no effect if listener already present
}
}
return retVal;

Back to the top