Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2010-10-08 18:15:45 +0000
committerPawel Piech2010-10-08 18:15:45 +0000
commit8c69e98515bf7cebcbea5d55eabc84a8266d24ed (patch)
tree9f35ccd04b735e5dbdba4f1307e7d7ba8e87cb5c /dsf/org.eclipse.cdt.dsf
parent7c8d11496ed98164527ddd9bba0d98e071323680 (diff)
downloadorg.eclipse.cdt-8c69e98515bf7cebcbea5d55eabc84a8266d24ed.tar.gz
org.eclipse.cdt-8c69e98515bf7cebcbea5d55eabc84a8266d24ed.tar.xz
org.eclipse.cdt-8c69e98515bf7cebcbea5d55eabc84a8266d24ed.zip
Bug 293109 - [debug view][view model] Terminate and Relaunch action not working.
Diffstat (limited to 'dsf/org.eclipse.cdt.dsf')
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/datamodel/AbstractDMContext.java22
1 files changed, 12 insertions, 10 deletions
diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/datamodel/AbstractDMContext.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/datamodel/AbstractDMContext.java
index af6f32798cb..86005e31502 100644
--- a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/datamodel/AbstractDMContext.java
+++ b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/datamodel/AbstractDMContext.java
@@ -35,15 +35,16 @@ import org.eclipse.core.runtime.PlatformObject;
abstract public class AbstractDMContext extends PlatformObject
implements IDMContext
{
- private final String fSessionId;
+ private final DsfSession fSession;
private final IDMContext[] fParents;
/**
* Main constructor provides all data needed to implement the <code>IDMContext</code>
* interface.
+ * @since 2.2
*/
- public AbstractDMContext(String sessionId, IDMContext[] parents) {
- fSessionId = sessionId;
+ public AbstractDMContext(DsfSession session, IDMContext[] parents) {
+ fSession = session;
fParents = parents;
for (IDMContext parent : parents) {
assert(parent != null);
@@ -52,7 +53,12 @@ abstract public class AbstractDMContext extends PlatformObject
/** Convenience constructor */
public AbstractDMContext(IDsfService service, IDMContext[] parents) {
- this(service.getSession().getId(), parents);
+ this(service.getSession(), parents);
+ }
+
+ /** Backward compatiblity constructor */
+ public AbstractDMContext(String fSessionId, IDMContext[] parents) {
+ this(DsfSession.getSession(fSessionId), parents);
}
/**
@@ -110,7 +116,7 @@ abstract public class AbstractDMContext extends PlatformObject
return retVal.toString();
}
- public String getSessionId() { return fSessionId; }
+ public String getSessionId() { return fSession.getId(); }
public IDMContext[] getParents() { return fParents; }
/**
@@ -131,11 +137,7 @@ abstract public class AbstractDMContext extends PlatformObject
@Override
@SuppressWarnings("rawtypes")
public Object getAdapter(Class adapterType) {
- Object retVal = null;
- DsfSession session = DsfSession.getSession(fSessionId);
- if (session != null) {
- retVal = session.getModelAdapter(adapterType);
- }
+ Object retVal = fSession.getModelAdapter(adapterType);
if (retVal == null) {
retVal = super.getAdapter(adapterType);
}

Back to the top