Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Torregrosa Paez2016-02-18 10:36:50 -0500
committerPablo Torregrosa Paez2016-02-18 10:36:57 -0500
commit6a9c67c8263eedddf88c88bbcf9089edd1c6c12f (patch)
tree9161f101d072b01bcf9c8b9cfe13cdc872561f45 /target_explorer
parent2555324e54280195a1901d6f22757b70adc1d43b (diff)
downloadorg.eclipse.tcf-6a9c67c8263eedddf88c88bbcf9089edd1c6c12f.tar.gz
org.eclipse.tcf-6a9c67c8263eedddf88c88bbcf9089edd1c6c12f.tar.xz
org.eclipse.tcf-6a9c67c8263eedddf88c88bbcf9089edd1c6c12f.zip
Target Explorer: Append task name to the IO Terminal
Change-Id: Ic82e140367d8518d2426858cad2422d58bbd0784 Signed-off-by: Pablo Torregrosa Paez <pablo.torregrosa@windriver.com>
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncher.java32
1 files changed, 17 insertions, 15 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncher.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncher.java
index 6ce812511..32727365a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncher.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncher.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2015 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2011, 2016 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
@@ -693,22 +693,24 @@ public class ProcessLauncher extends PlatformObject implements IProcessLauncher
title.append(processPath.toString());
}
- // Get the peer name
- final AtomicReference<String> peerName = new AtomicReference<String>(getProperties().getStringProperty(IProcessLauncher.PROP_CONNECTION_NAME));
- if (peerName.get() == null) {
- // Query the peer from the open channel
- Runnable runnable = new Runnable() {
- @Override
- public void run() {
- if (channel != null) {
- peerName.set(channel.getRemotePeer().getName());
- }
+ // In case, the path is empty, append the connection name
+ if (title.length() == 0 && properties.getStringProperty(IProcessLauncher.PROP_CONNECTION_NAME) != null) {
+ title.append(properties.getStringProperty(IProcessLauncher.PROP_CONNECTION_NAME));
+ }
+
+ // Query the peer from the open channel
+ final AtomicReference<String> peerName = new AtomicReference<String>();
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ if (channel != null) {
+ peerName.set(channel.getRemotePeer().getName());
}
- };
+ }
+ };
- if (Protocol.isDispatchThread()) runnable.run();
- else Protocol.invokeAndWait(runnable);
- }
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
if (peerName.get() != null) {
title.append(" [").append(peerName.get()).append("]"); //$NON-NLS-1$ //$NON-NLS-2$

Back to the top