Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java2
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java4
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java9
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java7
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java9
5 files changed, 26 insertions, 5 deletions
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java
index 45a90c36c..4eff1dcfb 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java
@@ -206,7 +206,7 @@ public class ProcessesProxy implements IProcesses {
if (error == null) {
assert args.length == 2;
error = toError(args[0]);
- if (args[1] != null) ctx = new ProcessContext((Map<String, Object>)args[1]);
+ if (args[1] != null) ctx = new ProcessContext((Map<String,Object>)args[1]);
}
done.doneStart(token, error, ctx);
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java
index dc92ea236..866b0b91b 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java
@@ -56,6 +56,10 @@ public class RunControlProxy implements IRunControl {
return (String)props.get(PROP_CREATOR_ID);
}
+ public String getName() {
+ return (String)props.get(PROP_NAME);
+ }
+
public boolean isContainer() {
Boolean b = (Boolean)props.get(PROP_IS_CONTAINER);
return b != null && b.booleanValue();
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java
index 2467ada3b..da5aa0b73 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java
@@ -36,6 +36,9 @@ public interface IRunControl extends IService {
/** ID of a context that created this context */
PROP_CREATOR_ID = "CreatorID",
+ /** Human readable context name */
+ PROP_NAME = "Name",
+
/** true if the context is a container. Container can propagate run control commands to his children */
PROP_IS_CONTAINER = "IsContainer",
@@ -274,6 +277,12 @@ public interface IRunControl extends IService {
String getCreatorID();
/**
+ * Retrieve human readable context name.
+ * Same as getProperties().get(“Name”)
+ */
+ String getName();
+
+ /**
* Utility method to read context property PROP_IS_CONTAINER.
* Executing resume or suspend command on a container causes all its children to resume or suspend.
* @return value of PROP_IS_CONTAINER.
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
index b17519fd3..539857879 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
@@ -162,12 +162,15 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
IOConsoleInputStream inp = console.getInputStream();
final byte[] buf = new byte[0x100];
for (;;) {
- final int len = inp.read(buf);
+ int len = inp.read(buf);
if (len < 0) break;
+ // TODO: Eclipse Console view has a bad habit of replacing CR with CR/LF
+ if (len == 2 && buf[0] == '\r' && buf[1] == '\n') len = 1;
+ final int n = len;
Protocol.invokeAndWait(new Runnable() {
public void run() {
try {
- launch.writeProcessInputStream(buf, 0, len);
+ launch.writeProcessInputStream(buf, 0, n);
}
catch (Exception x) {
onProcessStreamError(null, 0, x, 0);
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
index 6ee267253..395b50e13 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
@@ -511,16 +511,21 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
if (!run_context.validate(done)) return false;
String image_name = null;
StringBuffer label = new StringBuffer();
- label.append(id);
Throwable error = run_context.getError();
if (error != null) {
result.setForeground(new RGB(255, 0, 0), 0);
+ label.append(id);
label.append(": ");
label.append(TCFModel.getErrorMessage(error, false));
}
else {
IRunControl.RunControlContext ctx = run_context.getData();
- if (ctx != null) {
+ if (ctx == null) {
+ label.append(id);
+ }
+ else {
+ String nm = ctx.getName();
+ label.append(nm != null ? nm : id);
if (ctx.hasState()) {
// Thread
if (!state.validate(done)) return false;

Back to the top