Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2014-02-05 18:32:36 +0000
committerEugene Tarassov2014-02-05 18:32:36 +0000
commit8b96eb942fff43b7054f1fe7120edeee130b182f (patch)
treeee83cc34dd477960bdb7f6f858623b534d320453 /plugins
parent4744515d582b50453ef8d4551bc315805794fce6 (diff)
downloadorg.eclipse.tcf-8b96eb942fff43b7054f1fe7120edeee130b182f.tar.gz
org.eclipse.tcf-8b96eb942fff43b7054f1fe7120edeee130b182f.tar.xz
org.eclipse.tcf-8b96eb942fff43b7054f1fe7120edeee130b182f.zip
TCF Debugger: fixed: model selection policy is not called for launch nodes
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/plugin.xml3
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFLaunchAdapterFactory.java5
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelSelectionPolicy.java8
3 files changed, 12 insertions, 4 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/plugin.xml b/plugins/org.eclipse.tcf.debug.ui/plugin.xml
index 86c2d39e2..154f8e4d8 100644
--- a/plugins/org.eclipse.tcf.debug.ui/plugin.xml
+++ b/plugins/org.eclipse.tcf.debug.ui/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<!--
- Copyright (c) 2010, 2013 Wind River Systems, Inc. and others.
+ Copyright (c) 2010, 2014 Wind River Systems, Inc. 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
@@ -29,6 +29,7 @@
<adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider"/>
<adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider"/>
<adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory"/>
+ <adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicyFactory"/>
<adapter type="org.eclipse.ui.views.properties.IPropertySource"/>
<adapter type="org.eclipse.debug.ui.contexts.ISuspendTrigger"/>
<adapter type="org.eclipse.debug.core.model.IDebugModelProvider"/>
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFLaunchAdapterFactory.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFLaunchAdapterFactory.java
index 71dcf5c7a..e04b51b0e 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFLaunchAdapterFactory.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFLaunchAdapterFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2014 Wind River Systems, Inc. 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
@@ -15,6 +15,7 @@ import org.eclipse.debug.core.model.IDebugModelProvider;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicyFactory;
import org.eclipse.debug.ui.contexts.ISuspendTrigger;
import org.eclipse.tcf.internal.debug.model.TCFLaunch;
import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
@@ -26,6 +27,7 @@ public class TCFLaunchAdapterFactory implements IAdapterFactory {
private static final Class<?>[] adapter_list = {
IElementLabelProvider.class,
IElementContentProvider.class,
+ IModelSelectionPolicyFactory.class,
IModelProxyFactory.class,
ISuspendTrigger.class,
IPropertySource.class,
@@ -43,6 +45,7 @@ public class TCFLaunchAdapterFactory implements IAdapterFactory {
if (to.isInstance(model)) return model;
if (to == IPropertySource.class) return new TCFNodePropertySource(model.getRootNode());
if (to == IDebugModelProvider.class) return model.getAdapter(to, model.getRootNode());
+ if (to == IModelSelectionPolicyFactory.class) return model.getAdapter(to, model.getRootNode());
}
return null;
}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelSelectionPolicy.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelSelectionPolicy.java
index 8e795f2b1..1368c76ec 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelSelectionPolicy.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelSelectionPolicy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2014 Wind River Systems, Inc. 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
@@ -17,6 +17,7 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
import org.eclipse.tcf.services.IRunControl;
import org.eclipse.tcf.util.TCFDataCache;
import org.eclipse.tcf.util.TCFTask;
@@ -35,7 +36,10 @@ class TCFModelSelectionPolicy implements IModelSelectionPolicy {
Object e = ss.getFirstElement();
if (e instanceof TCFNode) {
TCFNode n = (TCFNode)e;
- return !n.isDisposed() && n.model == model;
+ return n.model == model;
+ }
+ if (e instanceof TCFLaunch) {
+ return model.getLaunch() == e;
}
}
return false;

Back to the top