diff options
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextManager.java')
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextManager.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextManager.java index 68c35f283..ad5227117 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextManager.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2013 IBM Corporation and others. + * Copyright (c) 2005, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -35,7 +35,7 @@ public class DebugContextManager implements IDebugContextManager { private static DebugContextManager fgDefault; private Map<IWorkbenchWindow, DebugWindowContextService> fServices = new HashMap<IWorkbenchWindow, DebugWindowContextService>(); - private ListenerList fGlobalListeners = new ListenerList(); + private ListenerList<IDebugContextListener> fGlobalListeners = new ListenerList<>(); /** * A debug context service that does nothing (used for windows that have been closed) @@ -163,10 +163,8 @@ public class DebugContextManager implements IDebugContextManager { service = new DebugWindowContextService(window, evaluationService); fServices.put(window, service); // register global listeners - Object[] listeners = fGlobalListeners.getListeners(); - for (int i = 0; i < listeners.length; i++) { - IDebugContextListener listener = (IDebugContextListener) listeners[i]; - service.addDebugContextListener(listener); + for (IDebugContextListener iDebugContextListener : fGlobalListeners) { + service.addDebugContextListener(iDebugContextListener); } } } |