diff options
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts')
6 files changed, 138 insertions, 138 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 ad5227117..61c2e9a7c 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 @@ -4,10 +4,10 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation - * Patrick Chuong (Texas Instruments) - Allow multiple debug views and + * Patrick Chuong (Texas Instruments) - Allow multiple debug views and * multiple debug context providers (Bug 327263) *******************************************************************************/ package org.eclipse.debug.internal.ui.contexts; @@ -32,11 +32,11 @@ import org.eclipse.ui.services.IEvaluationService; * @since 3.2 */ public class DebugContextManager implements IDebugContextManager { - + private static DebugContextManager fgDefault; private Map<IWorkbenchWindow, DebugWindowContextService> fServices = new HashMap<IWorkbenchWindow, DebugWindowContextService>(); private ListenerList<IDebugContextListener> fGlobalListeners = new ListenerList<>(); - + /** * A debug context service that does nothing (used for windows that have been closed) */ @@ -81,12 +81,12 @@ public class DebugContextManager implements IDebugContextManager { } @Override public void addDebugContextListener(IDebugContextListener listener, String partId, String partSecondaryId) { - + } @Override public void removeDebugContextListener(IDebugContextListener listener, String partId, String partSecondaryId) { } - + @Override public ISelection getActiveContext(String partId, String partSecondaryId) { return null; @@ -99,7 +99,7 @@ public class DebugContextManager implements IDebugContextManager { public void removePostDebugContextListener(IDebugContextListener listener, String partId, String partSecondaryId) { } }; - + private class WindowListener implements IWindowListener { /* (non-Javadoc) @@ -113,7 +113,7 @@ public class DebugContextManager implements IDebugContextManager { * @see org.eclipse.ui.IWindowListener#windowDeactivated(org.eclipse.ui.IWorkbenchWindow) */ @Override - public void windowDeactivated(IWorkbenchWindow window) { + public void windowDeactivated(IWorkbenchWindow window) { } /* (non-Javadoc) @@ -134,24 +134,24 @@ public class DebugContextManager implements IDebugContextManager { @Override public void windowOpened(IWorkbenchWindow window) { } - + } - + private DebugContextManager() { PlatformUI.getWorkbench().addWindowListener(new WindowListener()); } - + public static IDebugContextManager getDefault() { if (fgDefault == null) { fgDefault = new DebugContextManager(); // create the model context bindigg manager at the same time DebugModelContextBindingManager.getDefault(); // create view manager - ViewContextManager.getDefault(); + ViewContextManager.getDefault(); } return fgDefault; } - + protected IDebugContextService createService(IWorkbenchWindow window) { DebugWindowContextService service = fServices.get(window); if (service == null) { @@ -170,10 +170,10 @@ public class DebugContextManager implements IDebugContextManager { } return service; } - + protected IDebugContextService getService(IWorkbenchWindow window) { return fServices.get(window); - } + } /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.contexts.IDebugContextManager#addDebugContextListener(org.eclipse.debug.internal.ui.contexts.IDebugContextListener) @@ -200,10 +200,10 @@ public class DebugContextManager implements IDebugContextManager { service.removeDebugContextListener(listener); } } - + /** * Returns the existing context services. - * + * * @return existing context services */ private DebugWindowContextService[] getServices() { @@ -218,5 +218,5 @@ public class DebugContextManager implements IDebugContextManager { public IDebugContextService getContextService(IWorkbenchWindow window) { return createService(window); } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextSourceProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextSourceProvider.java index ec5b353bf..57f07a8e7 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextSourceProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextSourceProvider.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * Wind River Systems - initial API and implementation * IBM Corporation - bug fixing @@ -27,7 +27,7 @@ import org.eclipse.ui.services.IEvaluationService; /** * A source provider for the active debug context variable. - * + * * @since 3.5 */ public class DebugContextSourceProvider extends AbstractSourceProvider implements IDebugContextListener { @@ -36,14 +36,14 @@ public class DebugContextSourceProvider extends AbstractSourceProvider implement * The names of the sources supported by this source provider. */ private static final String[] PROVIDED_SOURCE_NAMES = new String[] { IDebugUIConstants.DEBUG_CONTEXT_SOURCE_NAME }; - + private final IDebugContextService fDebugContextService; - + private final IEvaluationService fEvaluationService; - + /** - * Creates the source provider. It registers it as a listener to the - * given debug context service, and as a provider with the given + * Creates the source provider. It registers it as a listener to the + * given debug context service, and as a provider with the given * evaluation service. */ public DebugContextSourceProvider(IDebugContextService debugContextService, IEvaluationService evaluationService) { @@ -69,7 +69,7 @@ public class DebugContextSourceProvider extends AbstractSourceProvider implement fireSourceChanged(ISources.ACTIVE_CURRENT_SELECTION, values); } } - + @Override public void dispose() { fDebugContextService.removeDebugContextListener(this); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java index f417fa4b0..264bad35e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java @@ -8,7 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation * Pawel Piech - Bug 154598: DebugModelContextBindingManager does not use IAdaptable.getAdapter() to retrieve IDebugModelProvider adapter - * Pawel Piech - Bug 298648: [View Management] Race conditions and other issues make view management unreliable. + * Pawel Piech - Bug 298648: [View Management] Race conditions and other issues make view management unreliable. *******************************************************************************/ package org.eclipse.debug.internal.ui.contexts; @@ -63,64 +63,64 @@ import org.eclipse.ui.progress.UIJob; * @since 3.2 */ public class DebugModelContextBindingManager implements IDebugContextListener, ILaunchesListener2, IActivityManagerListener { - + /** * Map of debug model identifier to associated contexts as defined * by <code>debugModelContextBindings</code> extensions. */ private Map<String, List<String>> fModelToContextIds = new HashMap<String, List<String>>(); - + /** * Map of launch objects to enabled model ids */ private Map<ILaunch, Set<String>> fLaunchToModelIds = new HashMap<ILaunch, Set<String>>(); - + /** * Map of launch objects to context activations */ private Map<ILaunch, List<IContextActivation>> fLanuchToContextActivations = new HashMap<ILaunch, List<IContextActivation>>(); - + /** - * A list of activity pattern bindings for debug models. + * A list of activity pattern bindings for debug models. */ private List<IActivityPatternBinding> fModelPatternBindings = new ArrayList<IActivityPatternBinding>(); - + /** * Map of debug model ids to associated activity ids. */ private Map<String, Set<String>> fModelToActivities = new HashMap<String, Set<String>>(); - + /** * A set of debug model ids for which activities have been enabled. * Cleared when enabled activities change. */ private Set<String> fModelsEnabledForActivities = new HashSet<String>(); - + // extension point public static final String ID_DEBUG_MODEL_CONTEXT_BINDINGS= "debugModelContextBindings"; //$NON-NLS-1$ - + // extension point attributes public static final String ATTR_CONTEXT_ID= "contextId"; //$NON-NLS-1$ public static final String ATTR_DEBUG_MODEL_ID= "debugModelId"; //$NON-NLS-1$ - + // base debug context public static final String DEBUG_CONTEXT= "org.eclipse.debug.ui.debugging"; //$NON-NLS-1$ - + // suffix for debug activities triggered by debug model context binding activation private static final String DEBUG_MODEL_ACTIVITY_SUFFIX = "/debugModel"; //$NON-NLS-1$ - + // singleton manager private static DebugModelContextBindingManager fgManager; - + private static IContextService fgContextService = PlatformUI.getWorkbench().getAdapter(IContextService.class); - + public static DebugModelContextBindingManager getDefault() { if (fgManager == null) { fgManager = new DebugModelContextBindingManager(); } return fgManager; } - + private DebugModelContextBindingManager() { loadDebugModelContextBindings(); loadDebugModelActivityExtensions(); @@ -129,7 +129,7 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I IWorkbenchActivitySupport activitySupport = PlatformUI.getWorkbench().getActivitySupport(); activitySupport.getActivityManager().addActivityManagerListener(this); } - + /** * Loads the extensions which map debug model identifiers * to context ids. @@ -152,8 +152,8 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I } } } - } - + } + /** * Loads the extensions which map debug model patterns * to activity ids. This information is used to activate the @@ -174,7 +174,7 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I } } } - } + } @Override public void debugContextChanged(DebugContextEvent event) { @@ -184,16 +184,16 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I IStructuredSelection ss = (IStructuredSelection) selection; Iterator<?> iterator = ss.iterator(); while (iterator.hasNext()) { - activated(iterator.next()); + activated(iterator.next()); } } } } - + /** * The specified object has been activated. Activate contexts and activities as * required for the object. - * + * * @param object object that has been activated */ private void activated(Object object) { @@ -226,11 +226,11 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I enableActivitiesFor(modelIds); } - + /** * Activates the given model identifier for the specified launch. This activates * associated contexts and all parent contexts for the model. - * + * * @param modelId model to be enabled * @param launch the launch the model is being enabled for */ @@ -239,7 +239,7 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I synchronized (this) { contextIds = fModelToContextIds.get(modelId); if (contextIds == null) { - // if there are no contexts for a model, the base debug context should + // if there are no contexts for a model, the base debug context should // be activated (i.e. a debug model with no org.eclipse.ui.contexts and // associated org.eclipse.debug.ui.modelContextBindings) contextIds = new ArrayList<String>(); @@ -251,10 +251,10 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I activateContext(id, launch); } } - + /** * Activates the given context and all its parent contexts. - * + * * @param contextId * @param launch */ @@ -275,10 +275,10 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I } } } - + /** * Notes the activation for a context and launch so we can de-activate later. - * + * * @param launch * @param activation */ @@ -294,8 +294,8 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I /** * Returns the debug model identifiers associated with the given object or <code>null</code> * if none. - * - * @param object + * + * @param object * @return debug model identifiers associated with the given object or <code>null</code> */ private String[] getDebugModelIds(Object object) { @@ -312,12 +312,12 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I return new String[] { ((IStackFrame) object).getModelIdentifier() }; } return null; - } - + } + /** * Returns the ILaunch associated with the given object or * <code>null</code> if none. - * + * * @param object object for which launch is required * @return the ILaunch associated with the given object or <code>null</code> */ @@ -359,7 +359,7 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I job.setSystem(true); job.schedule(); } - + } // TODO: Terminated notification } @@ -382,11 +382,11 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I */ @Override public void launchesChanged(ILaunch[] launches) { - } - + } + /** * Returns the workbench contexts associated with a debug context - * + * * @param target debug context * @return associated workbench contexts */ @@ -409,12 +409,12 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I } } return workbenchContexts; - } - + } + /** - * Enables activities in the workbench associated with the given debug + * Enables activities in the workbench associated with the given debug * model ids that have been activated. - * + * * @param debug model ids for which to enable activities */ private void enableActivitiesFor(String[] modelIds) { 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 882fd3638..6fea942e4 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 @@ -4,11 +4,11 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation * Wind River - Pawel Piech - added an evaluation context source provider (bug 229219) - * Patrick Chuong (Texas Instruments) and Pawel Piech (Wind River) - + * Patrick Chuong (Texas Instruments) and Pawel Piech (Wind River) - * Allow multiple debug views and multiple debug context providers (Bug 327263) *******************************************************************************/ package org.eclipse.debug.internal.ui.contexts; @@ -40,24 +40,24 @@ import org.eclipse.ui.services.IEvaluationService; /** * Context service for a specific window. - * + * * @since 3.2 */ public class DebugWindowContextService implements IDebugContextService, IPartListener2, IDebugContextListener { - + private Map<String, ListenerList<IDebugContextListener>> fListenersByPartId = new HashMap<>(); private Map<String, IDebugContextProvider> fProvidersByPartId = new HashMap<String, IDebugContextProvider>(); private Map<String, ListenerList<IDebugContextListener>> fPostListenersByPartId = new HashMap<>(); - + private IWorkbenchWindow fWindow; private List<IDebugContextProvider> fProviders = new ArrayList<IDebugContextProvider>(); - + private DebugContextSourceProvider fSourceProvider; public DebugWindowContextService(IWorkbenchWindow window, final IEvaluationService evaluationService) { fWindow = window; fWindow.getPartService().addPartListener(this); - + // need to register source provider on the UI thread (bug 438396) window.getShell().getDisplay().asyncExec(new Runnable() { @Override @@ -68,7 +68,7 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis } }); } - + public void dispose() { if (fSourceProvider != null) { fSourceProvider.dispose(); @@ -76,14 +76,14 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis fWindow.getPartService().removePartListener(this); fWindow = null; } - + @Override public synchronized void addDebugContextProvider(IDebugContextProvider provider) { if (fWindow == null) { return; // disposed } - + IWorkbenchPart part = provider.getPart(); fProvidersByPartId.put( getCombinedPartId(part), provider ); @@ -92,17 +92,17 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis if (provider instanceof IDebugContextProvider2) { canSetActive = ((IDebugContextProvider2) provider).isWindowContextProvider(); } - // Make the provider active if matches the active part. Otherwise, it - // may still become the active provider if fProviders.isEmpty(). + // Make the provider active if matches the active part. Otherwise, it + // may still become the active provider if fProviders.isEmpty(). if (canSetActive) { IWorkbenchPart activePart = null; IWorkbenchPage activePage = fWindow.getActivePage(); if (activePage != null) { activePart = activePage.getActivePart(); - } + } canSetActive = (activePart == null && part == null) || (activePart != null && activePart.equals(part)); } - + if (canSetActive) { fProviders.add(0, provider); } else { @@ -111,7 +111,7 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis notify(provider); provider.addDebugContextListener(this); } - + @Override public synchronized void removeDebugContextProvider(IDebugContextProvider provider) { int index = fProviders.indexOf(provider); @@ -128,13 +128,13 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis } } else { // Notify listeners of the removed provider with the active window context. - notifyPart(provider.getPart(), + notifyPart(provider.getPart(), new DebugContextEvent(activeProvider, getActiveContext(), DebugContextEvent.ACTIVATED)); } } provider.removeDebugContextListener(this); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.contexts.IDebugContextService#addDebugContextListener(org.eclipse.debug.ui.contexts.IDebugContextListener) */ @@ -142,7 +142,7 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis public void addDebugContextListener(IDebugContextListener listener) { addDebugContextListener(listener, null); } - + @Override public void addPostDebugContextListener(IDebugContextListener listener, String partId) { ListenerList<IDebugContextListener> list = fPostListenersByPartId.get(partId); @@ -150,14 +150,14 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis list = new ListenerList<>(); fPostListenersByPartId.put(partId, list); } - list.add(listener); + list.add(listener); } @Override public void addPostDebugContextListener(IDebugContextListener listener) { addPostDebugContextListener(listener, null); } - + @Override public void removePostDebugContextListener(IDebugContextListener listener, String partId) { ListenerList<IDebugContextListener> list = fPostListenersByPartId.get(partId); @@ -178,10 +178,10 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis public void removeDebugContextListener(IDebugContextListener listener) { removeDebugContextListener(listener, null); } - + /** * Notifies listeners of the context in the specified provider. - * + * * @param provdier context provider */ protected void notify(IDebugContextProvider provdier) { @@ -191,22 +191,22 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis } notify(new DebugContextEvent(provdier, activeContext, DebugContextEvent.ACTIVATED)); } - + protected void notify(DebugContextEvent event) { // Allow handling for case where getActiveProvider() == null. - // This can happen upon removeContextProvider() called on last available + // This can happen upon removeContextProvider() called on last available // provider (bug 360637). IDebugContextProvider provider = getActiveProvider(); IWorkbenchPart part = event.getDebugContextProvider().getPart(); - + // Once for listeners - if (provider == null || provider == event.getDebugContextProvider()) { + if (provider == null || provider == event.getDebugContextProvider()) { notify(event, getListeners(null)); - } + } if (part != null) { notify(event, getListeners(part)); } - + // Again for post-listeners if (provider == null || provider == event.getDebugContextProvider()) { notify(event, getPostListeners(null)); @@ -237,14 +237,14 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis }); } } - + protected ListenerList<IDebugContextListener> getListeners(IWorkbenchPart part) { - String id = null; - if (part != null) { - id = getCombinedPartId(part); + String id = null; + if (part != null) { + id = getCombinedPartId(part); ListenerList<IDebugContextListener> listenerList = fListenersByPartId.get(id); return listenerList != null ? listenerList : new ListenerList<IDebugContextListener>(); - } else { + } else { ListenerList<IDebugContextListener> listenerList = fListenersByPartId.get(null); ListenerList<IDebugContextListener> retVal = new ListenerList<>(); for (IDebugContextListener iDebugContextListener : listenerList) { @@ -252,21 +252,21 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis } outer: for (Iterator<String> itr = fListenersByPartId.keySet().iterator(); itr.hasNext();) { - String listenerPartId = itr.next(); - for (int i = 0; i < fProviders.size(); i++) { + String listenerPartId = itr.next(); + for (int i = 0; i < fProviders.size(); i++) { String providerPartId = getCombinedPartId(fProviders.get(i).getPart()); - if ((listenerPartId == null && providerPartId == null) || - (listenerPartId != null && listenerPartId.equals(providerPartId))) - { - continue outer; - } + if ((listenerPartId == null && providerPartId == null) || + (listenerPartId != null && listenerPartId.equals(providerPartId))) + { + continue outer; + } } for (IDebugContextListener iDebugContextListener : fListenersByPartId.get(listenerPartId)) { retVal.add(iDebugContextListener); // no effect if listener already present } } return retVal; - } + } } protected ListenerList<IDebugContextListener> getPostListeners(IWorkbenchPart part) { @@ -345,10 +345,10 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis } return null; } - + /** * Returns the active provider or <code>null</code> - * + * * @return active provider or <code>null</code> */ private IDebugContextProvider getActiveProvider() { @@ -369,7 +369,7 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis if (provider instanceof IDebugContextProvider2) { canSetActive = ((IDebugContextProvider2) provider).isWindowContextProvider(); } - + if (canSetActive) { int index = fProviders.indexOf(provider); if (index > 0) { @@ -379,14 +379,14 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis } } } - + } /* (non-Javadoc) * @see org.eclipse.ui.IPartListener2#partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference) */ @Override - public void partBroughtToTop(IWorkbenchPartReference partRef) { + public void partBroughtToTop(IWorkbenchPartReference partRef) { } /* (non-Javadoc) @@ -407,7 +407,7 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis * @see org.eclipse.ui.IPartListener2#partOpened(org.eclipse.ui.IWorkbenchPartReference) */ @Override - public void partOpened(IWorkbenchPartReference partRef) { + public void partOpened(IWorkbenchPartReference partRef) { } /* (non-Javadoc) @@ -435,26 +435,26 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis * @see org.eclipse.debug.internal.ui.contexts.provisional.IDebugContextEventListener#contextEvent(org.eclipse.debug.internal.ui.contexts.provisional.DebugContextEvent) */ @Override - public void debugContextChanged(DebugContextEvent event) { + public void debugContextChanged(DebugContextEvent event) { notify(event); } - + private String getCombinedPartId(IWorkbenchPart part) { if (part == null) { return null; - } else if (part.getSite() instanceof IViewSite) { + } else if (part.getSite() instanceof IViewSite) { IViewSite site = (IViewSite)part.getSite(); return getCombinedPartId(site.getId(), site.getSecondaryId()); - - } else { - return part.getSite().getId(); - } - } + + } else { + return part.getSite().getId(); + } + } private String getCombinedPartId(String id, String secondaryId) { return id + (secondaryId != null ? ":" + secondaryId : ""); //$NON-NLS-1$//$NON-NLS-2$ } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.contexts.IDebugContextService2#addDebugContextListener(org.eclipse.debug.ui.contexts.IDebugContextListener, java.lang.String, java.lang.String) */ @@ -491,7 +491,7 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis * @see org.eclipse.debug.ui.contexts.IDebugContextService2#getActiveContext(java.lang.String, java.lang.String) */ @Override - public ISelection getActiveContext(String partId, String partSecondaryId) { + public ISelection getActiveContext(String partId, String partSecondaryId) { return getActiveContext(getCombinedPartId(partId, partSecondaryId)); - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/LaunchSuspendTrigger.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/LaunchSuspendTrigger.java index 26a08c53d..6d92f33c4 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/LaunchSuspendTrigger.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/LaunchSuspendTrigger.java @@ -34,17 +34,17 @@ public class LaunchSuspendTrigger implements ISuspendTrigger, IDebugEventSetList private ListenerList<ISuspendTriggerListener> fListeners = new ListenerList<>(); private SuspendTriggerAdapterFactory fFactory = null; private ILaunch fLaunch = null; - + public LaunchSuspendTrigger(ILaunch launch, SuspendTriggerAdapterFactory factory) { fFactory = factory; fLaunch = launch; DebugPlugin.getDefault().addDebugEventListener(this); } - + public ILaunch getLaunch() { return fLaunch; } - + protected void dispose() { DebugPlugin.getDefault().removeDebugEventListener(this); fListeners = null; @@ -65,7 +65,7 @@ public class LaunchSuspendTrigger implements ISuspendTrigger, IDebugEventSetList * @see org.eclipse.debug.ui.contexts.ISuspendTrigger#removeSuspendTriggerListener(org.eclipse.debug.ui.contexts.ISuspendTriggerListener) */ @Override - public void removeSuspendTriggerListener(ISuspendTriggerListener listener) { + public void removeSuspendTriggerListener(ISuspendTriggerListener listener) { if (fListeners != null) { fListeners.remove(listener); } @@ -91,7 +91,7 @@ public class LaunchSuspendTrigger implements ISuspendTrigger, IDebugEventSetList ILaunch launch = adaptable.getAdapter(ILaunch.class); if (fLaunch.equals(launch)) { // only notify for this launch - notifySuspend(event); + notifySuspend(event); } } @@ -125,18 +125,18 @@ public class LaunchSuspendTrigger implements ISuspendTrigger, IDebugEventSetList public void run() throws Exception { listener.suspended(launch, temp); } - + @Override public void handleException(Throwable exception) { DebugUIPlugin.log(exception); } - - }); + + }); } } } - + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/SuspendTriggerAdapterFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/SuspendTriggerAdapterFactory.java index 22440d2e7..d7dde2afc 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/SuspendTriggerAdapterFactory.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/SuspendTriggerAdapterFactory.java @@ -23,7 +23,7 @@ import org.eclipse.debug.ui.contexts.ISuspendTrigger; * @since 3.2 */ public class SuspendTriggerAdapterFactory implements IAdapterFactory { - + private Map<Object, LaunchSuspendTrigger> fSuspendTriggers = new HashMap<Object, LaunchSuspendTrigger>(); /* (non-Javadoc) @@ -52,7 +52,7 @@ public class SuspendTriggerAdapterFactory implements IAdapterFactory { public Class<?>[] getAdapterList() { return new Class[]{ISuspendTrigger.class}; } - + public synchronized void dispose(LaunchSuspendTrigger trigger) { fSuspendTriggers.remove(trigger.getLaunch()); } |