Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/utils/DataHelper.java22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.properties6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/StartPingTimerStep.java44
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/IProcessContextItem.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/persistence/ProcessContextItem.java13
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/util/ProcessDataHelper.java26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/delegates/DefaultContextToolbarDelegate.java8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/AttachContextSelectionDialog.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/plugin.properties2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/AbstractContextStepperCommandHandler.java1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/launcher/LocalLauncherDelegate.java50
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.properties10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.xml6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.properties2
17 files changed, 117 insertions, 93 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties
index b5ef7144e..4a04d8924 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties
@@ -17,17 +17,17 @@ ExtensionPoint.tabs.name=Launch Configuration Tabs Extension Point
# ***** Command Contributions *****
-command.attach.name=Attach Context Command
+command.attach.name=Attach Context
command.attach.description=Attach to the selected Context
-command.detach.name=Detach Context Command
+command.detach.name=Detach Context
command.detach.description=Detach from the selected Context
-command.run.name=Launch in Run Mode Command
+command.run.name=Launch in Run Mode
command.run.label=Run
command.run.description=Launches the selected launch configuration in Run mode
-command.debug.name=Launch in Debug Mode Command
+command.debug.name=Launch in Debug Mode
command.debug.label=Debug
command.debug.description=Launches the selected launch configuration in Debug mode
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/utils/DataHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/utils/DataHelper.java
index 52f9b4c78..e8ad5d3c7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/utils/DataHelper.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/utils/DataHelper.java
@@ -12,7 +12,6 @@ package org.eclipse.tcf.te.runtime.persistence.utils;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -43,8 +42,6 @@ public class DataHelper {
return null;
}
- private static final Map<String, IPropertiesContainer> cache = new LinkedHashMap<String, IPropertiesContainer>();
-
/**
* Decode a string encoded properties container.
* @param encoded The string encoded properties container.
@@ -52,21 +49,12 @@ public class DataHelper {
*/
public static final IPropertiesContainer decodePropertiesContainer(String encoded) {
if (encoded != null && encoded.trim().length() > 0) {
- IPropertiesContainer result = cache.remove(encoded);
- if (result == null) {
- try {
- IPersistenceDelegate delegate = PersistenceManager.getInstance().getDelegate(Map.class, String.class);
- result = (IPropertiesContainer)delegate.read(IPropertiesContainer.class, encoded);
- }
- catch (Exception e) {
- }
-
- if (cache.size() == 10) cache.remove(cache.keySet().toArray()[0]);
+ try {
+ IPersistenceDelegate delegate = PersistenceManager.getInstance().getDelegate(Map.class, String.class);
+ return (IPropertiesContainer)delegate.read(IPropertiesContainer.class, encoded);
+ }
+ catch (Exception e) {
}
-
- cache.put(encoded, result);
-
- return result;
}
return new PropertiesContainer();
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.properties
index ab9eed8d6..fac3bc9c6 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.properties
@@ -19,7 +19,7 @@ SourceLookupEditorPage.name=Source Paths
# ***** Command contributions *****
-Command.showInDebugView.name=Show In Debug View Command
+Command.showInDebugView.name=Show In Debug View
Command.showInDebugView.description=Show the selection in the Debug View.
LauchTree.name=Launches
@@ -31,11 +31,11 @@ command.debug.name=Debug Remote Application
menu.diagnostics.label=Diagnostics
-command.runtests.name=Run Diagnostics Tests Command
+command.runtests.name=Run Diagnostics Tests
command.runtests.label=Run Tests
command.runtests.tooltip=Run Diagnostics Tests on the selected Peer
-command.runtestsloop.name=Run Diagnostics Tests Loop Command
+command.runtestsloop.name=Run Diagnostics Tests Loop
command.runtestsloop.label=Run Tests Loop
command.runtestsloop.tooltip=Run Diagnostics Tests in a loop on the selected Peer
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/StartPingTimerStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/StartPingTimerStep.java
index 8acfc38b5..3d515fa81 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/StartPingTimerStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/StartPingTimerStep.java
@@ -79,28 +79,34 @@ public class StartPingTimerStep extends AbstractPeerNodeStep {
final AtomicBoolean running = new AtomicBoolean(false);
@Override
public void run() {
- if (!running.get()) {
- running.set(true);
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- if (peerNode.getConnectState() == IConnectable.STATE_CONNECTED) {
- diagnostics.echo("ping", new IDiagnostics.DoneEcho() { //$NON-NLS-1$
- @Override
- public void doneEcho(IToken token, Throwable error, String s) {
- running.set(false);
- if (error != null) {
- thisTimer.cancel();
- }
+ try {
+ if (!running.get()) {
+ running.set(true);
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (peerNode.getConnectState() == IConnectable.STATE_CONNECTED) {
+ diagnostics.echo("ping", new IDiagnostics.DoneEcho() { //$NON-NLS-1$
+ @Override
+ public void doneEcho(IToken token, Throwable error, String s) {
+ running.set(false);
+ if (error != null) {
+ thisTimer.cancel();
+ }
+ }
+ });
}
- });
- }
- else {
- thisTimer.cancel();
+ else {
+ thisTimer.cancel();
+ }
+ }
+ catch (Throwable e) {}
}
- }
- });
+ });
+ }
}
+ catch (Throwable e) {}
}
};
pingTimer.schedule(pingTask, 10000, 10000);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/IProcessContextItem.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/IProcessContextItem.java
index a6768fb22..39b9571c1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/IProcessContextItem.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/IProcessContextItem.java
@@ -22,6 +22,8 @@ public interface IProcessContextItem extends IPropertiesContainer {
public static final String PROPERTY_NAME = "name"; //$NON-NLS-1$
public static final String PROPERTY_PATH = "path"; //$NON-NLS-1$
+ public static final String PATH_SEPARATOR = "/"; //$NON-NLS-1$
+
/**
* Return the context id.
*/
@@ -35,5 +37,5 @@ public interface IProcessContextItem extends IPropertiesContainer {
/**
* Return the context path.
*/
- public String[] getPath();
+ public String getPath();
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/persistence/ProcessContextItem.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/persistence/ProcessContextItem.java
index ce83190eb..4715476c6 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/persistence/ProcessContextItem.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/persistence/ProcessContextItem.java
@@ -10,8 +10,6 @@
package org.eclipse.tcf.te.tcf.processes.core.persistence;
-import java.util.List;
-
import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
import org.eclipse.tcf.te.tcf.processes.core.interfaces.IProcessContextItem;
@@ -47,15 +45,8 @@ public class ProcessContextItem extends PropertiesContainer implements IProcessC
* @see org.eclipse.tcf.te.tcf.processes.core.interfaces.IProcessContextItem#getPath()
*/
@Override
- public String[] getPath() {
- Object path = getProperty(PROPERTY_PATH);
- if (path instanceof String[]) {
- return (String[])path;
- }
- if (path instanceof List<?>) {
- return ((List<?>)path).toArray(new String[((List<?>)path).size()]);
- }
- return null;
+ public String getPath() {
+ return getStringProperty(PROPERTY_PATH);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/util/ProcessDataHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/util/ProcessDataHelper.java
index cb66803c1..3e8a45511 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/util/ProcessDataHelper.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/util/ProcessDataHelper.java
@@ -82,13 +82,13 @@ public class ProcessDataHelper {
return ctxItem.get();
}
- protected static final String[] getProcessContextNodePath(IProcessContextNode node) {
- List<String> path = new ArrayList<String>();
+ protected static final String getProcessContextNodePath(IProcessContextNode node) {
+ String path = null;
while (node.getParent() instanceof IProcessContextNode) {
node = (IProcessContextNode)node.getParent();
- path.add(0, node.getProcessContext().getName());
+ path = node.getProcessContext().getName() + (path != null ? IProcessContextItem.PATH_SEPARATOR + path : ""); //$NON-NLS-1$
}
- return path.toArray(new String[path.size()]);
+ return path;
}
public static final IProcessContextNode[] getProcessContextNodes(final IPeerNode peerNode, final IProcessContextItem item) {
@@ -118,21 +118,9 @@ public class ProcessDataHelper {
protected static final boolean isValid(IProcessContextNode node, IProcessContextItem item) {
if (item.getName() != null && node.getProcessContext().getName().equals(item.getName())) {
- if (item.getPath() != null) {
- String[] itemPath = item.getPath();
- String[] nodePath = getProcessContextNodePath(node);
- if (itemPath.length == nodePath.length) {
- for (int i=0; i<itemPath.length; i++) {
- if (!itemPath[i].equals(nodePath[i])) {
- return false;
- }
- }
- return true;
- }
- }
- else {
- return true;
- }
+ String itemPath = item.getPath();
+ String nodePath = getProcessContextNodePath(node);
+ return (itemPath == null && nodePath == null) || (itemPath != null && itemPath.equals(nodePath));
}
return false;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties
index 78bce32e1..df475528a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties
@@ -17,7 +17,7 @@ ProcessExplorerEditorPage.name=Processes
# ***** Command Contributions *****
-command.launch.name=Run Remote Process Command
+command.launch.name=Run Remote Process
command.launch.label=&Run Remote Process...
command.launch.tooltip=Execute the specified process image on the selected target.
@@ -42,7 +42,7 @@ command.stopPolling.tooltip = Stop Polling
command.configure.label = Configure Refresh Interval
command.configure.tooltip = Configure Refresh Interval
-command.configure.name = Configure Refresh Interval Command
+command.configure.name = Configure Refresh Interval
command.attach.label=&Attach
command.attach.tooltip=Attach to the selected Context
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/delegates/DefaultContextToolbarDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/delegates/DefaultContextToolbarDelegate.java
index 10df25f6c..1456b1d02 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/delegates/DefaultContextToolbarDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/delegates/DefaultContextToolbarDelegate.java
@@ -92,11 +92,9 @@ public class DefaultContextToolbarDelegate extends AbstractDefaultContextToolbar
else {
contexts += "\n\t"; //$NON-NLS-1$
}
- String[] path = item.getPath();
- if (path != null && path.length > 0) {
- for (String segment : path) {
- contexts += segment + "/"; //$NON-NLS-1$
- }
+ String path = item.getPath();
+ if (path != null && path.length() > 0) {
+ contexts += path + IProcessContextItem.PATH_SEPARATOR;
}
contexts += item.getName();
IUIService service = peerNode != null ? ServiceManager.getInstance().getService(peerNode, IUIService.class) : null;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/AttachContextSelectionDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/AttachContextSelectionDialog.java
index decb43b40..45fa5e627 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/AttachContextSelectionDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/AttachContextSelectionDialog.java
@@ -148,7 +148,7 @@ public class AttachContextSelectionDialog extends CustomTitleAreaDialog implemen
viewer = new TreeViewer(panel, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
Tree fModuleTree = viewer.getTree();
gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
- gd.minimumHeight = 300;
+ gd.minimumHeight = 250;
gd.minimumWidth = 300;
gd.widthHint = 300;
gd.heightHint = 300;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/plugin.properties
index ab321c59c..1a4880df7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/plugin.properties
@@ -17,7 +17,7 @@ preference.page.name = Console
# ***** Command Contributions *****
-command.remove.name=Close Console Command
+command.remove.name=Close Console
# ***** Themes *****
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/AbstractContextStepperCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/AbstractContextStepperCommandHandler.java
index 257d0a660..637ef2a94 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/AbstractContextStepperCommandHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/AbstractContextStepperCommandHandler.java
@@ -158,6 +158,7 @@ public abstract class AbstractContextStepperCommandHandler extends AbstractStepp
@Override
protected Object getContext(IPropertiesContainer data) {
IPeerNode[] contexts = PeerDataHelper.decodeContextList(data.getStringProperty(IContextDataProperties.PROPERTY_CONTEXT_LIST));
+ data.setProperty(IContextDataProperties.PROPERTY_CONTEXT_LIST, null);
return contexts.length == 1 ? contexts[0] : null;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/launcher/LocalLauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/launcher/LocalLauncherDelegate.java
index d1b7774cc..5f31aaeb4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/launcher/LocalLauncherDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/launcher/LocalLauncherDelegate.java
@@ -9,8 +9,15 @@
*******************************************************************************/
package org.eclipse.tcf.te.ui.terminals.local.launcher;
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
import org.eclipse.tcf.te.runtime.services.ServiceManager;
@@ -22,6 +29,8 @@ import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanel;
import org.eclipse.tcf.te.ui.terminals.interfaces.IMementoHandler;
import org.eclipse.tcf.te.ui.terminals.launcher.AbstractLauncherDelegate;
import org.eclipse.tcf.te.ui.terminals.local.controls.LocalWizardConfigurationPanel;
+import org.eclipse.ui.ISelectionService;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.WorkbenchEncoding;
/**
@@ -73,6 +82,47 @@ public class LocalLauncherDelegate extends AbstractLauncherDelegate {
if (encoding != null && !"".equals(encoding)) properties.setProperty(ITerminalsConnectorConstants.PROP_ENCODING, encoding); //$NON-NLS-1$
}
+ // For local terminals, force a new terminal tab each time it is launched,
+ // if not set otherwise from outside
+ if (!properties.containsKey(ITerminalsConnectorConstants.PROP_FORCE_NEW)) {
+ properties.setProperty(ITerminalsConnectorConstants.PROP_FORCE_NEW, true);
+ }
+
+ // Start the local terminal in the users home directory
+ String home = System.getProperty("user.home"); //$NON-NLS-1$
+ if (home != null && !"".equals(home)) { //$NON-NLS-1$
+ properties.setProperty(ITerminalsConnectorConstants.PROP_PROCESS_WORKING_DIR, home);
+ }
+
+ // If the current selection resolved to an folder, default the working directory
+ // to that folder and update the terminal title
+ ISelectionService service = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ if (service != null && service.getSelection() != null) {
+ ISelection selection = service.getSelection();
+ if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
+ String dir = null;
+ Iterator<?> iter = ((IStructuredSelection)selection).iterator();
+ while (iter.hasNext()) {
+ Object element = iter.next();
+ if (element instanceof IResource && ((IResource)element).exists()) {
+ IPath location = ((IResource)element).getLocation();
+ if (location == null) continue;
+ if (location.toFile().isFile()) location = location.removeLastSegments(1);
+ if (location.toFile().isDirectory() && location.toFile().canRead()) {
+ dir = location.toFile().getAbsolutePath();
+ break;
+ }
+ }
+ }
+ if (dir != null) {
+ properties.setProperty(ITerminalsConnectorConstants.PROP_PROCESS_WORKING_DIR, dir);
+
+ String basename = new Path(dir).lastSegment();
+ properties.setProperty(ITerminalsConnectorConstants.PROP_TITLE, basename + " (" + terminalTitle + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ }
+
// Get the terminal service
ITerminalService terminal = ServiceManager.getInstance().getService(ITerminalService.class);
// If not available, we cannot fulfill this request
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.properties
index 2bd19e92c..c26408c26 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.properties
@@ -27,12 +27,12 @@ StreamsConnectorType.label=Streams Connector Type
toolbar.terminal.label=Terminals
-command.launch.name=Launch Terminal Command
-command.launch.label=Launch Terminal...
+command.launch.selection.name=Open Terminal on Selection
+command.launch.name=Open Terminal
+command.launch.label=Open Terminal...
+command.launch.tooltip=Open a Terminal
-command.launchWithoutSelection.tooltip=Open a Terminal
-
-command.disconnect.name=Disconnect Terminal Command
+command.disconnect.name=Disconnect Terminal
command.disconnect.label=Disconnect
command.disconnect.tooltip=Disconnect Terminal Connection
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.xml
index 4616c8cc3..7acbf9d44 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.xml
@@ -128,7 +128,7 @@
id="org.eclipse.tcf.te.ui.terminals.commands.launchToolbar"
label="%command.launch.label"
style="push"
- tooltip="%command.launchWithoutSelection.tooltip">
+ tooltip="%command.launch.tooltip">
</command>
</toolbar>
</menuContribution>
@@ -139,7 +139,7 @@
id="org.eclipse.tcf.te.ui.terminals.commands.launchToolbarTerminalsView"
label="%command.launch.label"
style="push"
- tooltip="%command.launchWithoutSelection.tooltip">
+ tooltip="%command.launch.tooltip">
</command>
<command
commandId="org.eclipse.tcf.te.ui.terminals.command.disconnect"
@@ -169,7 +169,7 @@
categoryId="org.eclipse.tcf.te.ui.commands.category"
helpContextId="org.eclipse.tcf.te.ui.terminals.command_Launch"
id="org.eclipse.tcf.te.ui.terminals.command.launch"
- name="%command.launch.name">
+ name="%command.launch.selection.name">
</command>
<command
categoryId="org.eclipse.tcf.te.ui.commands.category"
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties
index 5ef52deb9..fc0f772fe 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties
@@ -41,7 +41,7 @@ category.mytargets.name=Connections
category.neighborhood.name=Neighborhood
# ***** Command and menu contributions *****
-command.open.name=Open Command
+command.open.name=Open
command.open.label=Open
command.open.mnemonic=O
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.properties
index 94ea2cf58..8ce5847d7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.properties
@@ -43,7 +43,7 @@ command.newWizards.description=Open the New Wizard
command.refresh.name=Refresh
command.refresh.description=Refresh the selected connection
-command.showConsoleView.name=Show Console View Command
+command.showConsoleView.name=Show Console View
command.showConsoleView.description=Shows the Console View
command.connect.name=Connect

Back to the top