mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 18:55:38 +02:00
Cosmetics
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
parent
4ab317096d
commit
519e1c91ab
1 changed files with 9 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2015 Wind River Systems and others.
|
* Copyright (c) 2006, 2016 Wind River Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -42,15 +42,13 @@ import org.eclipse.debug.ui.contexts.ISuspendTrigger;
|
||||||
* IDMContext.getAdapter() methods.
|
* IDMContext.getAdapter() methods.
|
||||||
*/
|
*/
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
public class GdbAdapterFactory
|
public class GdbAdapterFactory implements IAdapterFactory, ILaunchesListener2 {
|
||||||
implements IAdapterFactory, ILaunchesListener2
|
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Active adapter sets. They are accessed using the launch instance
|
* Active adapter sets. They are accessed using the launch instance
|
||||||
* which owns the debug services session.
|
* which owns the debug services session.
|
||||||
*/
|
*/
|
||||||
private static Map<GdbLaunch, GdbSessionAdapters> fgLaunchAdapterSets =
|
private static Map<GdbLaunch, GdbSessionAdapters> fgLaunchAdapterSets =
|
||||||
Collections.synchronizedMap(new HashMap<GdbLaunch, GdbSessionAdapters>());
|
Collections.synchronizedMap(new HashMap<>());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map of launches for which adapter sets have already been disposed.
|
* Map of launches for which adapter sets have already been disposed.
|
||||||
|
@ -67,12 +65,12 @@ public class GdbAdapterFactory
|
||||||
private static Map<ILaunch, GdbSessionAdapters> fgDisposedLaunchAdapterSets = new WeakHashMap<>();
|
private static Map<ILaunch, GdbSessionAdapters> fgDisposedLaunchAdapterSets = new WeakHashMap<>();
|
||||||
|
|
||||||
static void disposeAdapterSet(ILaunch launch) {
|
static void disposeAdapterSet(ILaunch launch) {
|
||||||
synchronized(fgLaunchAdapterSets) {
|
synchronized(fgLaunchAdapterSets) {
|
||||||
if ( fgLaunchAdapterSets.containsKey(launch) ) {
|
if (fgLaunchAdapterSets.containsKey(launch)) {
|
||||||
fgLaunchAdapterSets.remove(launch).dispose();
|
fgLaunchAdapterSets.remove(launch).dispose();
|
||||||
fgDisposedLaunchAdapterSets.put(launch, null);
|
fgDisposedLaunchAdapterSets.put(launch, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public GdbAdapterFactory() {
|
public GdbAdapterFactory() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue