Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2012-01-03 19:31:01 +0000
committerEugene Tarassov2012-01-03 19:31:01 +0000
commit34254814550b9351dd8e7fdd45d7df49f76a2c91 (patch)
tree47dbc724bbd0833571ed1d4a640d1ae939a5e5dc
parentafb4d36974640819566a8ac39f96fcd6f4c4990e (diff)
downloadorg.eclipse.tcf-34254814550b9351dd8e7fdd45d7df49f76a2c91.tar.gz
org.eclipse.tcf-34254814550b9351dd8e7fdd45d7df49f76a2c91.tar.xz
org.eclipse.tcf-34254814550b9351dd8e7fdd45d7df49f76a2c91.zip
TCF Debugger: added public interface to get TCF ID and channel of visual elements in the debugger views.
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/debug/ui/ITCFObject.java35
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNode.java3
3 files changed, 39 insertions, 2 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.tcf.debug.ui/META-INF/MANIFEST.MF
index 6f781354f..52d4d35c1 100644
--- a/plugins/org.eclipse.tcf.debug.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.tcf.debug.ui/META-INF/MANIFEST.MF
@@ -31,4 +31,5 @@ Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
Export-Package: org.eclipse.tcf.internal.debug.ui.commands;x-friends:="org.eclipse.tcf.cdt.ui",
org.eclipse.tcf.internal.debug.ui.launch;x-friends:="org.eclipse.tcf.cdt.ui",
- org.eclipse.tcf.internal.debug.ui.model;x-friends:="org.eclipse.tcf.cdt.ui"
+ org.eclipse.tcf.internal.debug.ui.model;x-friends:="org.eclipse.tcf.cdt.ui",
+ org.eclipse.tcf.debug.ui
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/debug/ui/ITCFObject.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/debug/ui/ITCFObject.java
new file mode 100644
index 000000000..a5d158902
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/debug/ui/ITCFObject.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.ui;
+
+import org.eclipse.tcf.protocol.IChannel;
+
+/**
+ * ITCFObject is an interface that is implemented by all TCF debug model elements.
+ * A visual element in a debugger view can be adapted to this interface -
+ * if the element represents a remote TCF object.
+ * Clients can get communication channel and ID of the object,
+ * and use them to access the object through TCF service interfaces.
+ */
+public interface ITCFObject {
+
+ /**
+ * Get TCF ID of the object.
+ * @return TCF ID
+ */
+ public String getID();
+
+ /**
+ * Get IChannel of the debug model that owns this object.
+ * @return IChannel object
+ */
+ public IChannel getChannel();
+}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNode.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNode.java
index 00517b518..ff5cf76e4 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNode.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNode.java
@@ -23,6 +23,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputUpdate;
+import org.eclipse.tcf.debug.ui.ITCFObject;
import org.eclipse.tcf.internal.debug.model.TCFLaunch;
import org.eclipse.tcf.protocol.IChannel;
import org.eclipse.tcf.protocol.Protocol;
@@ -32,7 +33,7 @@ import org.eclipse.ui.IWorkbenchPart;
/**
* TCFNode is base class for all TCF debug model elements.
*/
-public abstract class TCFNode extends PlatformObject implements Comparable<TCFNode> {
+public abstract class TCFNode extends PlatformObject implements ITCFObject, Comparable<TCFNode> {
protected final String id;
protected final TCFNode parent;

Back to the top