Skip to main content
summaryrefslogtreecommitdiffstats
path: root/dsf
diff options
context:
space:
mode:
authorMarc Dumais2016-06-17 16:58:48 +0000
committerGerrit Code Review @ Eclipse.org2016-11-10 16:35:27 +0000
commitdc6e3a06ff3734457340c62558863c34a0500440 (patch)
tree04f737f219e51a2047bcac94c7bd6f790501bad6 /dsf
parente9beafae109ba3881b74b4e42dde0250508c0140 (diff)
downloadorg.eclipse.cdt-dc6e3a06ff3734457340c62558863c34a0500440.tar.gz
org.eclipse.cdt-dc6e3a06ff3734457340c62558863c34a0500440.tar.xz
org.eclipse.cdt-dc6e3a06ff3734457340c62558863c34a0500440.zip
bug 498782 - [debug] synchronize selection between the DV and GDB
This adds a new service, GDBFocusSynchronizer, that helps keep the internal GDB selection and the Debug View selection synchronized. Change-Id: I021b3f65d61e82f6971bdb9232369b6fdf58ea5b
Diffstat (limited to 'dsf')
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/AbstractDMVMNode.java37
-rw-r--r--dsf/org.eclipse.cdt.dsf/META-INF/MANIFEST.MF2
2 files changed, 38 insertions, 1 deletions
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/AbstractDMVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/AbstractDMVMNode.java
index a07c56ee95c..3a607a666f3 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/AbstractDMVMNode.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/AbstractDMVMNode.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.dsf.ui.viewmodel.datamodel;
+import java.util.List;
import java.util.concurrent.RejectedExecutionException;
import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
@@ -27,6 +28,7 @@ import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMContext;
import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMNode;
import org.eclipse.cdt.dsf.ui.viewmodel.IVMContext;
import org.eclipse.cdt.dsf.ui.viewmodel.IVMNode;
+import org.eclipse.cdt.dsf.ui.viewmodel.VMChildrenUpdate;
import org.eclipse.cdt.dsf.ui.viewmodel.VMDelta;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -347,4 +349,39 @@ abstract public class AbstractDMVMNode extends AbstractVMNode implements IVMNode
return retVal;
}
+
+ /**
+ * This method looks for a specific DMC, used in a IVMNode type. If found, its index is returned, else
+ * index 0.
+ *
+ * @param nodeType the node to search on
+ * @param wantedCtx the dmc we are looking-for
+ * @param parentDelta delta for the parent VMNode
+ * @param rm request monitor
+ */
+ protected void getVMCIndexForDmc(IVMNode nodetype, IDMContext wantedCtx, VMDelta parentDelta, DataRequestMonitor<Integer> rm) {
+ final int indexFailed = 0;
+ getVMProvider().updateNode(nodetype, new VMChildrenUpdate(
+ parentDelta, getVMProvider().getPresentationContext(), -1, -1,
+ new DataRequestMonitor<List<Object>>(getExecutor(), rm) {
+ @Override
+ protected void handleSuccess() {
+ boolean found = false;
+ for (int i = 0; i < getData().size(); i++) {
+ if (getData().get(i) instanceof IDMVMContext) {
+ IDMVMContext vmc = (IDMVMContext)getData().get(i);
+ if (vmc.getDMContext().equals(wantedCtx)) {
+ rm.setData(i);
+ found = true;
+ break;
+ }
+ }
+ }
+ if (!found) {
+ rm.setData(indexFailed);
+ }
+ rm.done();
+ }
+ }));
+ }
}
diff --git a/dsf/org.eclipse.cdt.dsf/META-INF/MANIFEST.MF b/dsf/org.eclipse.cdt.dsf/META-INF/MANIFEST.MF
index 6f521704eb1..d8f944036aa 100644
--- a/dsf/org.eclipse.cdt.dsf/META-INF/MANIFEST.MF
+++ b/dsf/org.eclipse.cdt.dsf/META-INF/MANIFEST.MF
@@ -1,4 +1,4 @@
-Manifest-Version: 1.0
+Manifest-Version: 1.02.8.0-SNAPSHOT
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName

Back to the top