diff options
author | Markus Keller | 2016-03-07 11:20:42 +0000 |
---|---|---|
committer | Markus Keller | 2016-03-07 11:20:42 +0000 |
commit | 5c1ed7eb4583e931eb5f34556d1a0023e0e6e402 (patch) | |
tree | 8e44fef86b2fe1a46227634253a73f3a8c96a689 /org.eclipse.debug.ui/ui/org/eclipse/debug | |
parent | 35bbbefa70b747bdbf88ce0dea5e2c36c9f01335 (diff) | |
download | eclipse.platform.debug-5c1ed7eb4583e931eb5f34556d1a0023e0e6e402.tar.gz eclipse.platform.debug-5c1ed7eb4583e931eb5f34556d1a0023e0e6e402.tar.xz eclipse.platform.debug-5c1ed7eb4583e931eb5f34556d1a0023e0e6e402.zip |
Bug 486157 - Adapt to ListenerList changes
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug')
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java | 21 |
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; |