Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordschaefer2011-06-30 11:25:40 -0400
committerdschaefer2011-06-30 11:25:40 -0400
commita6c2942428996402853b56cbb01a9f3d857492a4 (patch)
treec4bc5cca4939c98fd18862862b0f0833dfddc35b
parent61fa8dcef2f7ca21edbafc6cfa5b18b13e364aac (diff)
downloadorg.eclipse.tcf-a6c2942428996402853b56cbb01a9f3d857492a4.tar.gz
org.eclipse.tcf-a6c2942428996402853b56cbb01a9f3d857492a4.tar.xz
org.eclipse.tcf-a6c2942428996402853b56cbb01a9f3d857492a4.zip
Removing the prototype target explorer plugins. The real ones are in target_explorer.
-rw-r--r--plugins/org.eclipse.tcf.target.core/.classpath7
-rw-r--r--plugins/org.eclipse.tcf.target.core/.project28
-rw-r--r--plugins/org.eclipse.tcf.target.core/.settings/org.eclipse.jdt.core.prefs23
-rw-r--r--plugins/org.eclipse.tcf.target.core/META-INF/MANIFEST.MF13
-rw-r--r--plugins/org.eclipse.tcf.target.core/about.html28
-rw-r--r--plugins/org.eclipse.tcf.target.core/build.properties6
-rw-r--r--plugins/org.eclipse.tcf.target.core/plugin.xml14
-rw-r--r--plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/Activator.java68
-rw-r--r--plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/DiscoveredTarget.java35
-rw-r--r--plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/LocalTarget.java151
-rw-r--r--plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/SSHLinuxTarget.java33
-rw-r--r--plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/TargetManager.java126
-rw-r--r--plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/TargetServiceTester.java60
-rw-r--r--plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/AbstractTarget.java196
-rw-r--r--plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/ITarget.java113
-rw-r--r--plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/ITargetListener.java15
-rw-r--r--plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/ITargetManager.java21
-rw-r--r--plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/TargetEvent.java27
-rw-r--r--plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/TargetRequestSequence.java56
-rw-r--r--plugins/org.eclipse.tcf.target.ui/.classpath7
-rw-r--r--plugins/org.eclipse.tcf.target.ui/.project28
-rw-r--r--plugins/org.eclipse.tcf.target.ui/.settings/org.eclipse.jdt.core.prefs19
-rw-r--r--plugins/org.eclipse.tcf.target.ui/META-INF/MANIFEST.MF19
-rw-r--r--plugins/org.eclipse.tcf.target.ui/about.html28
-rw-r--r--plugins/org.eclipse.tcf.target.ui/build.properties8
-rw-r--r--plugins/org.eclipse.tcf.target.ui/icons/debug_exc.gifbin348 -> 0 bytes
-rw-r--r--plugins/org.eclipse.tcf.target.ui/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--plugins/org.eclipse.tcf.target.ui/icons/system_view.gifbin362 -> 0 bytes
-rw-r--r--plugins/org.eclipse.tcf.target.ui/plugin.xml204
-rw-r--r--plugins/org.eclipse.tcf.target.ui/schema/targetPage.exsd112
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/Activator.java72
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/TargetLaunchShortcut.java194
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/TargetsContentProvider.java96
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/TargetsLabelProvider.java61
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/actions/AttachDebuggerAction.java58
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/actions/InspectTargetAction.java42
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/actions/TargetActionProvider.java77
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/editors/TargetEditor.java212
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/editors/TargetEditorContributor.java76
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/editors/TargetEditorInput.java70
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/CopyToTargetOperation.java36
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemContentProvider.java161
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemDropAdapter.java70
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemLabelProvider.java53
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemNode.java185
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemTargetPage.java78
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/newtarget/NewTargetCommandHandler.java62
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/newtarget/NewTargetPage.java86
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/newtarget/NewTargetWizard.java46
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesContentProvider.java194
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesLabelProvider.java58
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesNode.java51
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesTargetPage.java73
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/properties/LocalPropertyPage.java111
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/properties/TargetSummaryPropertyPage.java93
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/target/ui/ITargetEditorInput.java20
-rw-r--r--plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/target/ui/ITargetPage.java22
57 files changed, 0 insertions, 3802 deletions
diff --git a/plugins/org.eclipse.tcf.target.core/.classpath b/plugins/org.eclipse.tcf.target.core/.classpath
deleted file mode 100644
index c51c113be..000000000
--- a/plugins/org.eclipse.tcf.target.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry excluding="**/.svn/*" kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.tcf.target.core/.project b/plugins/org.eclipse.tcf.target.core/.project
deleted file mode 100644
index 1019dd2d2..000000000
--- a/plugins/org.eclipse.tcf.target.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tcf.target.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.tcf.target.core/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.tcf.target.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 5ef9a0be5..000000000
--- a/plugins/org.eclipse.tcf.target.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,23 +0,0 @@
-#Tue Nov 09 14:00:53 PST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch,.svn/
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/plugins/org.eclipse.tcf.target.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.tcf.target.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 94c449141..000000000
--- a/plugins/org.eclipse.tcf.target.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: TCF Target Management Core
-Bundle-SymbolicName: org.eclipse.tcf.target.core;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tcf.internal.target.core.Activator
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.expressions;bundle-version="3.4.200",
- org.eclipse.tm.tcf.core;bundle-version="0.4.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Export-Package: org.eclipse.tcf.internal.target.core;x-friends:="org.eclipse.tcf.target.ui",
- org.eclipse.tcf.target.core
diff --git a/plugins/org.eclipse.tcf.target.core/about.html b/plugins/org.eclipse.tcf.target.core/about.html
deleted file mode 100644
index 6c5b3615b..000000000
--- a/plugins/org.eclipse.tcf.target.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>January 10, 2008</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.tcf.target.core/build.properties b/plugins/org.eclipse.tcf.target.core/build.properties
deleted file mode 100644
index 2d5759904..000000000
--- a/plugins/org.eclipse.tcf.target.core/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html
diff --git a/plugins/org.eclipse.tcf.target.core/plugin.xml b/plugins/org.eclipse.tcf.target.core/plugin.xml
deleted file mode 100644
index 2e9f96724..000000000
--- a/plugins/org.eclipse.tcf.target.core/plugin.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.tcf.internal.target.core.TargetServiceTester"
- id="org.eclipse.tcf.target.targetService"
- namespace="org.eclipse.tcf.target"
- properties="targetService,targetServiceRunning"
- type="org.eclipse.tcf.target.core.ITarget">
- </propertyTester>
- </extension>
-</plugin>
diff --git a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/Activator.java b/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/Activator.java
deleted file mode 100644
index 98ad7de4b..000000000
--- a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/Activator.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.ILog;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.tcf.target.core.ITargetManager;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-public class Activator implements BundleActivator {
-
- private static final String PLUGIN_ID = "org.eclipse.tcf.target.core";
-
- private static BundleContext context;
-
- private TargetManager targetManager;
-
- static BundleContext getContext() {
- return context;
- }
-
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
-
- // Register the target manager
- targetManager = new TargetManager();
- context.registerService(ITargetManager.class.getName(), targetManager, null);
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
- targetManager.dispose();
- }
-
- @SuppressWarnings("unchecked")
- public static <T> T getService(Class<T> cls) {
- ServiceReference ref = context.getServiceReference(cls.getName());
- return ref != null ? (T)context.getService(ref) : null;
- }
-
- public static void log(IStatus status) {
- getService(ILog.class).log(status);
- }
-
- public static void log(int severity, Throwable e) {
- getService(ILog.class).log(createStatus(severity, e));
- }
-
- public static IStatus createStatus(int severity, Throwable e) {
- if (e instanceof CoreException)
- return ((CoreException)e).getStatus();
-
- return new Status(severity, PLUGIN_ID, e.getLocalizedMessage(), e);
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/DiscoveredTarget.java b/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/DiscoveredTarget.java
deleted file mode 100644
index 5c3684bf2..000000000
--- a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/DiscoveredTarget.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.core;
-
-import org.eclipse.tcf.target.core.AbstractTarget;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.tm.tcf.protocol.IPeer;
-
-public class DiscoveredTarget extends AbstractTarget implements ITarget {
-
- public DiscoveredTarget(IPeer firstPeer) {
- handleNewPeer(firstPeer);
- }
-
- @Override
- protected void launch() {
- // Discovered targets have already launched
- }
-
- @Override
- public boolean handleRemovePeer(String id) {
- super.handleRemovePeer(id); // ignore result
-
- return peers.isEmpty(); // return true if peers all gone
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/LocalTarget.java b/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/LocalTarget.java
deleted file mode 100644
index 63bf23ac1..000000000
--- a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/LocalTarget.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.core;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.tcf.target.core.AbstractTarget;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.osgi.framework.Bundle;
-
-public class LocalTarget extends AbstractTarget implements ITarget {
-
- // TODO provide API and UI to change these
- private String host = "127.0.0.1";
- private String port = "1534";
-
- private Process process;
-
- public String getHost() {
- return host;
- }
-
- public void setHost(String host) {
- this.host = host;
- }
-
- public String getPort() {
- return port;
- }
-
- public void setPort(String port) {
- this.port = port;
- }
-
- @Override
- public String getShortName() {
- return "Local";
- }
-
- @Override
- protected void launch() {
- try {
- // Find the path to the agent executable
- File agentFile = getAgentFile();
- if (!Platform.getOS().equals(Platform.OS_WIN32)) {
- Runtime.getRuntime().exec(new String[] { "chmod", "+x", agentFile.getAbsolutePath() }).waitFor();
- }
-
- // Start the agent
- process = Runtime.getRuntime().exec(new String[] {
- agentFile.getAbsolutePath(),
- "-s",
- "TCP:" + host + ":" + port + ";IsLocal=true" });
-
- // Start monitor process
- Thread t = new Thread() {
- public void run() {
- try {
- final int n = process.waitFor();
- if (n != 0 && process != null) { // ignore when shutting down
- // Assume bad things happened and peers never reported
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- for (ITargetRequest request : outstandingRequests)
- request.channelUnavailable(Activator.createStatus(IStatus.ERROR, new Error("Local TCF Agent exited with code: " + n)));
- outstandingRequests.clear();
- }
- });
- }
- } catch (InterruptedException e) {
- Activator.log(IStatus.WARNING, e);
- }
- }
- };
- t.setDaemon(true);
- t.setName("Local TCF Agent Monitor");
- t.start();
-
- } catch (IOException e) {
- Activator.log(IStatus.ERROR, e);
- } catch (URISyntaxException e) {
- Activator.log(IStatus.ERROR, e);
- } catch (InterruptedException e) {
- Activator.log(IStatus.ERROR, e);
- }
- }
-
- private boolean isLocalAgent(IPeer peer) {
- String h = peer.getAttributes().get(IPeer.ATTR_IP_HOST);
- String p = peer.getAttributes().get(IPeer.ATTR_IP_PORT);
- String l = peer.getAttributes().get("IsLocal");
- return host.equals(h) && port.equals(p) && "true".equals(l);
- }
-
- private static File getAgentFile() throws URISyntaxException, IOException {
- String localAgent = System.getProperty("tcf.localAgent");
- if (localAgent != null) {
- return new File(localAgent);
- } else {
- String os = System.getProperty("os.name");
- String arch = System.getProperty("os.arch");
- String fnm = "agent";
- if (arch.equals("x86")) arch = "i386";
- if (arch.equals("i686")) arch = "i386";
- if (os.startsWith("Windows")) {
- os = "Windows";
- fnm = "agent.exe";
- }
- if (os.equals("Linux")) os = "GNU/Linux";
- IPath agentPath = new Path("agent/" + os + "/" + arch + "/" + fnm);
- Bundle debugBundle = Platform.getBundle("org.eclipse.tm.tcf.debug");
- URL agentURL = FileLocator.find(debugBundle, agentPath, null);
- return new File(FileLocator.toFileURL(agentURL).toURI());
- }
- }
-
- @Override
- public boolean handleNewPeer(IPeer peer) {
- // If it's the first one in, make sure it's a local agent
- if (peers.isEmpty() && !isLocalAgent(peer))
- return false;
-
- return super.handleNewPeer(peer);
- }
-
- public void dispose() {
- if (process != null) {
- process.destroy();
- process = null;
- }
- }
-}
diff --git a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/SSHLinuxTarget.java b/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/SSHLinuxTarget.java
deleted file mode 100644
index 92f2c26ba..000000000
--- a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/SSHLinuxTarget.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.core;
-
-import org.eclipse.tcf.target.core.AbstractTarget;
-
-/**
- * A target that is launched through an SSH session.
- *
- * @author Doug Schaefer
- */
-public class SSHLinuxTarget extends AbstractTarget {
-
- @Override
- public String getName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- protected void launch() {
- // TODO Auto-generated method stub
-
- }
-}
diff --git a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/TargetManager.java b/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/TargetManager.java
deleted file mode 100644
index 553b3555d..000000000
--- a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/TargetManager.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.core;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Map;
-
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.tcf.target.core.ITargetListener;
-import org.eclipse.tcf.target.core.ITargetManager;
-import org.eclipse.tcf.target.core.TargetEvent;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ILocator;
-
-public class TargetManager implements ITargetManager, ILocator.LocatorListener, ITargetListener {
-
- private LinkedList<ITarget> targets = new LinkedList<ITarget>();
- private LinkedList<ITargetListener> listeners = new LinkedList<ITargetListener>();
- private final LocalTarget localTarget;
-
- public TargetManager() {
- // Add in the local target
- localTarget = new LocalTarget();
- targets.add(localTarget);
- localTarget.addTargetListener(this);
-
- // load targets and kick of listener
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- ILocator locator = Protocol.getLocator();
- Map<String, IPeer> peers = locator.getPeers();
- for (IPeer peer : peers.values())
- peerAdded(peer);
- locator.addListener(TargetManager.this);
- }
- });
- }
-
- @Override
- public ITarget[] getTargets() {
- synchronized (targets) {
- return targets.toArray(new ITarget[targets.size()]);
- }
- }
-
- @Override
- public void handleEvent(TargetEvent event) {
- if (event.getEventType() == TargetEvent.EventType.DELETED)
- if (!targets.remove(event.getTarget()))
- // target wasn't really there, ignore
- return;
-
- fireEvent(event);
- }
-
- @Override
- public void addTargetListener(ITargetListener listener) {
- listeners.add(listener);
- }
-
- @Override
- public void removeTargetListener(ITargetListener listener) {
- listeners.remove(listener);
- }
-
- private void fireEvent(TargetEvent event) {
- for (ITargetListener listener : listeners)
- listener.handleEvent(event);
- }
-
- @Override
- public void peerAdded(IPeer peer) {
- synchronized (targets) {
- for (ITarget target : targets) {
- if (target.handleNewPeer(peer))
- return;
- }
-
- // New target
- ITarget target = new DiscoveredTarget(peer);
- targets.add(target);
- target.addTargetListener(this);
- fireEvent(new TargetEvent(TargetEvent.EventType.ADDED, target));
- }
- }
-
- @Override
- public void peerChanged(IPeer peer) {
- }
-
- @Override
- public void peerHeartBeat(String id) {
- }
-
- @Override
- public void peerRemoved(String id) {
- synchronized (targets) {
- for (Iterator<ITarget> i = targets.iterator(); i.hasNext();) {
- ITarget target = i.next();
- if (target.handleRemovePeer(id)) {
- i.remove();
- fireEvent(new TargetEvent(TargetEvent.EventType.DELETED, target));
- }
- }
- }
- }
-
- /**
- * Call when shutting down so we can clean up any resources.
- * In particular the local target.
- */
- public void dispose() {
- localTarget.dispose();
- }
-}
diff --git a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/TargetServiceTester.java b/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/TargetServiceTester.java
deleted file mode 100644
index 6c1c762e0..000000000
--- a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/internal/target/core/TargetServiceTester.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.core;
-
-import java.util.Collection;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.util.TCFTask;
-
-public class TargetServiceTester extends PropertyTester {
-
- @Override
- public boolean test(Object receiver, String property, final Object[] args, Object expectedValue) {
- if (!(receiver instanceof ITarget))
- return false;
- final ITarget target = (ITarget)receiver;
-
- // If target isn't running, return false
- if (!target.isRunning())
- return false;
-
- return new TCFTask<Boolean>() {
- @Override
- public void run() {
- target.handleTargetRequest(new ITarget.ITargetRequest() {
- @Override
- public void execute(IChannel channel) {
- Collection<String> remoteServices = channel.getRemoteServices();
- for (String remoteService : remoteServices) {
- for (Object arg : args) {
- if (remoteService.equals(arg)) {
- done(Boolean.TRUE);
- return;
- }
- }
- }
- done(Boolean.FALSE);
- }
-
- @Override
- public void channelUnavailable(IStatus error) {
- done(Boolean.FALSE);
- }
- });
- }
- }.getE().booleanValue();
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/AbstractTarget.java b/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/AbstractTarget.java
deleted file mode 100644
index 31a0470c8..000000000
--- a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/AbstractTarget.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.target.core;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tcf.internal.target.core.Activator;
-import org.eclipse.tcf.target.core.TargetEvent.EventType;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-
-public abstract class AbstractTarget extends PlatformObject implements ITarget {
-
- protected LinkedList<IPeer> peers = new LinkedList<IPeer>();
- protected LinkedList<ITargetListener> listeners = new LinkedList<ITargetListener>();
- protected LinkedList<ITargetRequest> outstandingRequests = new LinkedList<ITargetRequest>();
- private Map<String, Object> localProperties = new HashMap<String, Object>();
-
- private IChannel channel;
-
- @Override
- public boolean isRunning() {
- return !peers.isEmpty();
- }
-
- @Override
- public Map<String, Object> getLocalProperties() {
- return localProperties;
- }
-
- @Override
- public void addTargetListener(ITargetListener listener) {
- listeners.add(listener);
- }
-
- @Override
- public void removeLaunchListener(ITargetListener listener) {
- listeners.remove(listener);
- }
-
- protected abstract void launch();
-
- protected IChannel getChannel() {
- if (channel != null)
- return channel;
-
- if (peers.isEmpty())
- return null;
-
- channel = peers.getFirst().openChannel();
- // Add listener to inform when we're being closed
- channel.addChannelListener(new IChannel.IChannelListener() {
- @Override
- public void onChannelOpened() {
- }
-
- @Override
- public void onChannelClosed(Throwable error) {
- fireEvent(new TargetEvent(EventType.DELETED, AbstractTarget.this));
- }
-
- @Override
- public void congestionLevel(int level) {
- }
- });
- return channel;
- }
-
- @Override
- public String getShortName() {
- if (peers.isEmpty())
- return "<unknown>";
- return peers.getFirst().getName();
- }
-
- @Override
- public String getName() {
- String name = getShortName();
- String agentId = getAgentId();
- if (agentId != null)
- name += " {" + agentId + "}";
- return name;
- }
-
- private String getAgentId() {
- if (peers.isEmpty())
- return null;
-
- return peers.getFirst().getAgentID();
- }
-
- @Override
- public void handleTargetRequest(final ITargetRequest request) {
- assert Protocol.isDispatchThread();
- if (!peers.isEmpty()) {
- // have peers, ready to go.
- final IChannel channel = getChannel();
- switch (channel.getState()) {
- case IChannel.STATE_OPENING:
- channel.addChannelListener(new IChannel.IChannelListener() {
- @Override
- public void onChannelOpened() {
- request.execute(channel);
- channel.removeChannelListener(this);
- }
-
- @Override
- public void onChannelClosed(Throwable error) {
- request.channelUnavailable(Activator.createStatus(IStatus.ERROR, error));
- }
-
- @Override
- public void congestionLevel(int level) {
- }
- });
- break;
- case IChannel.STATE_OPEN:
- request.execute(channel);
- break;
- case IChannel.STATE_CLOSED:
- request.channelUnavailable(Activator.createStatus(IStatus.ERROR, new Error("Channel closed.")));
- break;
- }
- return;
- }
-
- // Need to launch
- boolean launching = !outstandingRequests.isEmpty();
- outstandingRequests.add(request);
- if (!launching)
- launch();
- }
-
- protected void fireEvent(TargetEvent event) {
- for (ITargetListener listener : listeners)
- listener.handleEvent(event);
- }
-
- @Override
- public boolean handleNewPeer(IPeer peer) {
- boolean launching = false;
- if (peers.isEmpty())
- launching = true;
- else {
- // Make sure agent id matches
- if (!getAgentId().equals(peer.getAgentID()))
- return false;
-
- // Replace any old peer object with the new one
- for (Iterator<IPeer> i = peers.iterator(); i.hasNext();) {
- IPeer p = i.next();
- if (p.getID().equals(peer.getID()))
- i.remove();
- }
- }
-
- peers.add(peer);
-
- if (launching) {
- // start things up now that we have a peer
- fireEvent(new TargetEvent(EventType.LAUNCHED, this));
- for (ITargetRequest request : outstandingRequests)
- handleTargetRequest(request);
- outstandingRequests.clear();
- }
-
- return true;
- }
-
- @Override
- public boolean handleRemovePeer(String id) {
- for (Iterator<IPeer> i = peers.iterator(); i.hasNext();) {
- if (id.equals(i.next().getID())) {
- i.remove();
- }
- }
-
- // Always return false, only discovered targets should return true.
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/ITarget.java b/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/ITarget.java
deleted file mode 100644
index 689b2861a..000000000
--- a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/ITarget.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.target.core;
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-
-/**
- * Object that represents a target, or more accurately an agent running on a target.
- *
- * Extends IAdaptable to allow for extensions in the targets view.
- *
- * @author Doug Schaefer
- *
- */
-public interface ITarget extends IAdaptable {
-
- /**
- * The UI name for the target.
- *
- * @return name
- */
- String getName();
-
- /**
- * A short name for the target, typically the peer name.
- *
- * @return short name
- */
- String getShortName();
-
- /**
- * Execute the request, launching the target and opening a channel if necessary.
- * @param request
- */
- void handleTargetRequest(ITargetRequest request);
-
- /**
- * Target request.
- */
- interface ITargetRequest {
- /**
- * Execute the requested with the target's channel.
- *
- * @param channel
- */
- void execute(IChannel channel);
-
- /**
- * Failed to open a channel to execute the request.
- *
- * @param error that occured
- */
- void channelUnavailable(IStatus error);
- }
-
- /**
- * Is target running.
- *
- * @return is running
- */
- boolean isRunning();
-
- /**
- * Add target listener.
- *
- * @param listener
- */
- void addTargetListener(ITargetListener listener);
-
- /**
- * Remove target listener
- *
- * @param listener
- */
- void removeLaunchListener(ITargetListener listener);
-
- /**
- * Return true if this peer is associated with this target.
- *
- * @param peer
- * @return is my peer
- */
- boolean handleNewPeer(IPeer peer);
-
- /**
- * Peer has been removed. Return true if there are no more peers for this target.
- *
- * @param peer
- * @return no more peers
- */
- boolean handleRemovePeer(String id);
-
- /**
- * Get properties associated with this target by local tooling.
- *
- * @return local properties
- */
- Map<String, Object> getLocalProperties();
-
-}
diff --git a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/ITargetListener.java b/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/ITargetListener.java
deleted file mode 100644
index 360c52875..000000000
--- a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/ITargetListener.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.target.core;
-
-public interface ITargetListener {
- void handleEvent(TargetEvent event);
-}
diff --git a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/ITargetManager.java b/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/ITargetManager.java
deleted file mode 100644
index 7c2f31212..000000000
--- a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/ITargetManager.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.target.core;
-
-public interface ITargetManager {
-
- ITarget[] getTargets();
-
- void addTargetListener(ITargetListener listener);
-
- void removeTargetListener(ITargetListener listener);
-
-}
diff --git a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/TargetEvent.java b/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/TargetEvent.java
deleted file mode 100644
index 638dc97b6..000000000
--- a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/TargetEvent.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.target.core;
-
-
-public class TargetEvent {
- public enum EventType { ADDED, LAUNCHED, DELETED };
-
- private final TargetEvent.EventType eventType;
- private final ITarget target;
-
- public TargetEvent(TargetEvent.EventType eventType, ITarget target) {
- this.eventType = eventType;
- this.target = target;
- }
-
- public TargetEvent.EventType getEventType() { return eventType; }
- public ITarget getTarget() { return target; }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/TargetRequestSequence.java b/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/TargetRequestSequence.java
deleted file mode 100644
index 46efc9404..000000000
--- a/plugins/org.eclipse.tcf.target.core/src/org/eclipse/tcf/target/core/TargetRequestSequence.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems 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.target.core;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.tcf.target.core.ITarget.ITargetRequest;
-import org.eclipse.tm.tcf.protocol.IChannel;
-
-/**
- * @author dschaefer
- *
- */
-public abstract class TargetRequestSequence implements ITargetRequest {
-
- private Step[] steps;
- private int current;
- private IChannel channel;
-
- public abstract class Step {
- public abstract void run(IChannel channel);
-
- public void nextStep() {
- TargetRequestSequence.this.next();
- }
-
- }
-
- public abstract Step[] getSteps();
-
- @Override
- public void execute(IChannel channel) {
- this.channel = channel;
- this.current = 0;
- this.steps = getSteps();
- next();
- }
-
- private void next() {
- if (current < steps.length)
- steps[current++].run(channel);
- }
-
- @Override
- public void channelUnavailable(IStatus error) {
- // default - do nothing
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/.classpath b/plugins/org.eclipse.tcf.target.ui/.classpath
deleted file mode 100644
index c51c113be..000000000
--- a/plugins/org.eclipse.tcf.target.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry excluding="**/.svn/*" kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.tcf.target.ui/.project b/plugins/org.eclipse.tcf.target.ui/.project
deleted file mode 100644
index cf7fe4e90..000000000
--- a/plugins/org.eclipse.tcf.target.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tcf.target.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.tcf.target.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.tcf.target.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 9f4c93263..000000000
--- a/plugins/org.eclipse.tcf.target.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,19 +0,0 @@
-#Tue Nov 09 14:01:13 PST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch,.svn/
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/plugins/org.eclipse.tcf.target.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.tcf.target.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 77944da63..000000000
--- a/plugins/org.eclipse.tcf.target.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: TCF Target Management UI
-Bundle-SymbolicName: org.eclipse.tcf.target.ui;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tcf.internal.target.ui.Activator
-Bundle-Vendor: Eclipse TCF
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.expressions;bundle-version="3.4.200",
- org.eclipse.ui,
- org.eclipse.ui.navigator;bundle-version="3.5.0",
- org.eclipse.ui.ide,
- org.eclipse.debug.ui;bundle-version="3.6.1",
- org.eclipse.tm.tcf.core;bundle-version="0.4.0",
- org.eclipse.tm.tcf.debug;bundle-version="0.4.0",
- org.eclipse.tcf.target.core;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.tcf.target.ui
diff --git a/plugins/org.eclipse.tcf.target.ui/about.html b/plugins/org.eclipse.tcf.target.ui/about.html
deleted file mode 100644
index 6c5b3615b..000000000
--- a/plugins/org.eclipse.tcf.target.ui/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>January 10, 2008</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.tcf.target.ui/build.properties b/plugins/org.eclipse.tcf.target.ui/build.properties
deleted file mode 100644
index 9c8c37204..000000000
--- a/plugins/org.eclipse.tcf.target.ui/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- schema/,\
- icons/,\
- about.html
diff --git a/plugins/org.eclipse.tcf.target.ui/icons/debug_exc.gif b/plugins/org.eclipse.tcf.target.ui/icons/debug_exc.gif
deleted file mode 100644
index afe775b5a..000000000
--- a/plugins/org.eclipse.tcf.target.ui/icons/debug_exc.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.tcf.target.ui/icons/sample.gif b/plugins/org.eclipse.tcf.target.ui/icons/sample.gif
deleted file mode 100644
index 34fb3c9d8..000000000
--- a/plugins/org.eclipse.tcf.target.ui/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.tcf.target.ui/icons/system_view.gif b/plugins/org.eclipse.tcf.target.ui/icons/system_view.gif
deleted file mode 100644
index c3fe221a1..000000000
--- a/plugins/org.eclipse.tcf.target.ui/icons/system_view.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.tcf.target.ui/plugin.xml b/plugins/org.eclipse.tcf.target.ui/plugin.xml
deleted file mode 100644
index bf38e97c5..000000000
--- a/plugins/org.eclipse.tcf.target.ui/plugin.xml
+++ /dev/null
@@ -1,204 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension-point id="targetPage" name="Target Page" schema="schema/targetPage.exsd"/>
- <extension
- point="org.eclipse.ui.views">
- <category
- id="org.eclipse.tcf.target.category"
- name="Target Management">
- </category>
- <view
- allowMultiple="false"
- category="org.eclipse.tcf.target.category"
- class="org.eclipse.ui.navigator.CommonNavigator"
- icon="icons/system_view.gif"
- id="org.eclipse.tcf.target.targetsView"
- name="Target Explorer"
- restorable="true">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.navigator.viewer">
- <viewerContentBinding
- viewerId="org.eclipse.tcf.target.targetsView">
- <includes>
- <contentExtension
- isRoot="true"
- pattern="org.eclipse.tcf.target.targetsContent">
- </contentExtension>
- </includes>
- </viewerContentBinding>
- <viewerActionBinding
- viewerId="org.eclipse.tcf.target.targetsView">
- <includes>
- <actionExtension
- pattern="org.eclipse.tcf.target.*">
- </actionExtension></includes>
- </viewerActionBinding>
- </extension>
- <extension
- point="org.eclipse.ui.navigator.navigatorContent">
- <navigatorContent
- activeByDefault="true"
- contentProvider="org.eclipse.tcf.internal.target.ui.TargetsContentProvider"
- id="org.eclipse.tcf.target.targetsContent"
- labelProvider="org.eclipse.tcf.internal.target.ui.TargetsLabelProvider"
- name="TCF Targets"
- priority="normal">
- <triggerPoints>
- <instanceof
- value="org.eclipse.core.resources.IWorkspaceRoot">
- </instanceof></triggerPoints>
- </navigatorContent>
- <actionProvider
- class="org.eclipse.tcf.internal.target.ui.actions.TargetActionProvider"
- id="org.eclipse.tcf.target.TargetActions">
- <enablement>
- <instanceof
- value="org.eclipse.tcf.target.core.ITarget">
- </instanceof>
- </enablement>
- </actionProvider>
- </extension>
- <extension
- point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.tcf.internal.target.ui.editors.TargetEditor"
- contributorClass="org.eclipse.tcf.internal.target.ui.editors.TargetEditorContributor"
- icon="icons/system_view.gif"
- id="org.eclipse.tcf.target.editors.TargetEditor"
- name="Target">
- </editor>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- defaultHandler="org.eclipse.tcf.internal.target.ui.newtarget.NewTargetCommandHandler"
- id="org.eclipse.tcf.target.command.newTarget"
- name="NewTarget">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="toolbar:org.eclipse.tcf.target.targetsView">
- <command
- commandId="org.eclipse.tcf.target.command.newTarget"
- icon="icons/sample.gif"
- label="New Target..."
- style="push">
- </command>
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.tcf.target.ui.targetPage">
- <targetPage
- class="org.eclipse.tcf.internal.target.ui.filesystem.FileSystemTargetPage">
- <enablement>
- <test
- args="FileSystem"
- property="org.eclipse.tcf.target.targetService">
- </test>
- </enablement>
- </targetPage>
- <targetPage
- class="org.eclipse.tcf.internal.target.ui.processes.ProcessesTargetPage">
- <enablement>
- <test
- args="Processes"
- property="org.eclipse.tcf.target.targetService">
- </test></enablement>
- </targetPage>
- </extension>
- <extension
- point="org.eclipse.ui.navigator.navigatorContent">
- <navigatorContent
- activeByDefault="true"
- contentProvider="org.eclipse.tcf.internal.target.ui.filesystem.FileSystemContentProvider"
- id="org.eclipse.tcf.target.fileSystemContent"
- labelProvider="org.eclipse.tcf.internal.target.ui.filesystem.FileSystemLabelProvider"
- name="TCF File System"
- priority="normal"
- providesSaveables="false"
- sortOnly="false">
- <triggerPoints>
- <instanceof
- value="org.eclipse.tcf.target.core.ITarget">
- </instanceof>
- <test
- args="FileSystem"
- property="org.eclipse.tcf.target.targetServiceRunning">
- </test>
- </triggerPoints>
- </navigatorContent>
- </extension>
- <extension
- point="org.eclipse.ui.navigator.viewer">
- <viewerContentBinding
- viewerId="org.eclipse.tcf.target.targetsView">
- <includes>
- <contentExtension
- isRoot="false"
- pattern="org.eclipse.tcf.target.fileSystemContent">
- </contentExtension>
- </includes>
- </viewerContentBinding>
- </extension>
- <extension
- point="org.eclipse.debug.ui.launchShortcuts">
- <shortcut
- class="org.eclipse.tcf.internal.target.ui.TargetLaunchShortcut"
- id="org.eclipse.tcf.target.targetShortcut"
- label="TCF Launch"
- modes="debug">
- <contextualLaunch>
- <enablement>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <instanceof
- value="org.eclipse.tcf.target.core.ITarget">
- </instanceof>
- </iterate>
- </with>
- </enablement>
- </contextualLaunch>
- <description
- description="Attach Debugger using TCF"
- mode="debug">
- </description>
- <configurationType
- id="org.eclipse.tm.tcf.debug.LaunchConfigurationType"></configurationType>
- </shortcut>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- class="org.eclipse.tcf.internal.target.ui.properties.TargetSummaryPropertyPage"
- id="org.eclipse.tcf.target.ui.properties.summary"
- name="Summary"
- nameFilter="*.*">
- <enabledWhen>
- <instanceof
- value="org.eclipse.tcf.target.core.ITarget">
- </instanceof>
- </enabledWhen>
- </page>
- <page
- class="org.eclipse.tcf.internal.target.ui.properties.LocalPropertyPage"
- id="org.eclipse.tcf.target.ui.properties.local"
- name="Local Connection">
- <enabledWhen>
- <instanceof
- value="org.eclipse.tcf.internal.target.core.LocalTarget">
- </instanceof>
- </enabledWhen>
- </page>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.tcf.target.ui/schema/targetPage.exsd b/plugins/org.eclipse.tcf.target.ui/schema/targetPage.exsd
deleted file mode 100644
index 34800204c..000000000
--- a/plugins/org.eclipse.tcf.target.ui/schema/targetPage.exsd
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.tcf.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.tm.tcf.ui" id="targetPage" name="Target Page"/>
- </appinfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="targetPage" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="targetPage">
- <annotation>
- <documentation>
- Target Page for the Target Editor.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="enablement"/>
- </sequence>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- Class that implements the Target Page.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.tcf.target.ui.ITargetPage"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema>
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/Activator.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/Activator.java
deleted file mode 100644
index 37ad10ad1..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/Activator.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.tcf.target.ui"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- public static Activator getDefault() {
- return plugin;
- }
-
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- @SuppressWarnings("unchecked")
- public static <T> T getService(Class<T> cls) {
- BundleContext context = plugin.getBundle().getBundleContext();
- ServiceReference ref = context.getServiceReference(cls.getName());
- return ref != null ? (T)context.getService(ref) : null;
- }
-
- public static void log(IStatus status) {
- plugin.getLog().log(status);
- }
-
- public static void log(int severity, Throwable e) {
- plugin.getLog().log(createStatus(severity, e));
- }
-
- public static IStatus createStatus(int severity, Throwable e) {
- if (e instanceof CoreException)
- return ((CoreException)e).getStatus();
-
- return new Status(severity, PLUGIN_ID, e.getLocalizedMessage(), e);
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/TargetLaunchShortcut.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/TargetLaunchShortcut.java
deleted file mode 100644
index 2a5f68061..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/TargetLaunchShortcut.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui;
-
-import java.io.IOException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.ILaunchShortcut2;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.tcf.target.ui.ITargetEditorInput;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.util.TCFTask;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-
-public class TargetLaunchShortcut implements ILaunchShortcut2 {
-
- @Override
- public void launch(ISelection selection, String mode) {
- if (selection instanceof IStructuredSelection) {
- Object obj = ((IStructuredSelection)selection).getFirstElement();
- if (obj instanceof ITarget)
- launch((ITarget)obj, mode);
- }
- }
-
- @Override
- public void launch(IEditorPart editor, String mode) {
- IEditorInput input = editor.getEditorInput();
- if (input instanceof ITargetEditorInput) {
- launch(((ITargetEditorInput)input).getTarget(), mode);
- }
- }
-
- private void launch(ITarget target, String mode) {
- ILaunchConfiguration[] configs = getLaunchConfigurations(target);
- if (configs.length == 0)
- return;
-
- ILaunchConfiguration config = configs[0]; // there should only be one
- DebugUITools.launch(config, mode);
- }
-
- @Override
- public ILaunchConfiguration[] getLaunchConfigurations(ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- Object obj = ((IStructuredSelection)selection).getFirstElement();
- if (obj instanceof ITarget)
- return getLaunchConfigurations((ITarget)obj);
- }
- return null;
- }
-
- @Override
- public ILaunchConfiguration[] getLaunchConfigurations(IEditorPart editorpart) {
- IEditorInput input = editorpart.getEditorInput();
- if (input instanceof ITargetEditorInput) {
- return getLaunchConfigurations(((ITargetEditorInput)input).getTarget());
- }
- return null;
- }
-
- private ILaunchConfiguration findLaunchConfiguration(final ITarget target) throws CoreException {
- ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType type = manager.getLaunchConfigurationType("org.eclipse.tm.tcf.debug.LaunchConfigurationType");
- final ILaunchConfiguration[] configs = manager.getLaunchConfigurations(type);
-
- // Find the config that matches our target if there is one
- try {
- return new TCFTask<ILaunchConfiguration>() {
- public void run() {
- target.handleTargetRequest(new ITarget.ITargetRequest() {
- @Override
- public void execute(IChannel channel) {
- IPeer peer = channel.getRemotePeer();
- String peerId = peer.getID();
- String agentId = peer.getAgentID();
-
- for (ILaunchConfiguration config : configs) {
- try {
- String cpeerId = config.getAttribute(TCFLaunchDelegate.ATTR_PEER_ID, (String)null);
- if (cpeerId == null)
- continue;
-
- if (cpeerId.equals(peerId)) {
- done(config);
- return;
- } else {
- IPeer cpeer = Protocol.getLocator().getPeers().get(cpeerId);
- if (cpeer != null) {
- String cagentId = cpeer.getAgentID();
- if (cagentId != null && cagentId.equals(agentId)) {
- done(config);
- return;
- }
- }
- }
- } catch (CoreException e) {
- }
- }
-
- done(null);
- }
-
- @Override
- public void channelUnavailable(IStatus error) {
- done(null);
- }
- });
- };
- }.getIO();
- } catch (IOException e) {
- throw new CoreException(Activator.createStatus(IStatus.ERROR, e));
- }
- }
-
- private ILaunchConfiguration createLaunchConfiguration(final ITarget target) throws CoreException {
- ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
- final ILaunchConfigurationType type = manager.getLaunchConfigurationType("org.eclipse.tm.tcf.debug.LaunchConfigurationType");
- ILaunchConfigurationWorkingCopy wc = new TCFTask<ILaunchConfigurationWorkingCopy>() {
- @Override
- public void run() {
- target.handleTargetRequest(new ITarget.ITargetRequest() {
- @Override
- public void execute(IChannel channel) {
- try {
- ILaunchConfigurationWorkingCopy wc = type.newInstance(null, "Attach " + target.getName());
- IPeer peer = channel.getRemotePeer();
- wc.setAttribute(TCFLaunchDelegate.ATTR_PEER_ID, peer.getID());
- wc.setAttribute(TCFLaunchDelegate.ATTR_USE_LOCAL_AGENT, false);
- wc.setAttribute(TCFLaunchDelegate.ATTR_USE_LOCAL_AGENT, false);
- done(wc);
- } catch (CoreException e) {
- error(e);
- }
- }
-
- @Override
- public void channelUnavailable(IStatus error) {
- error(new CoreException(error));
- }
- });
- }
- }.getE();
- return wc.doSave();
- }
-
- private ILaunchConfiguration[] getLaunchConfigurations(ITarget target) {
- try {
- ILaunchConfiguration config = findLaunchConfiguration(target);
- if (config == null)
- config = createLaunchConfiguration(target);
-
- if (config != null)
- return new ILaunchConfiguration[] { config };
- } catch (CoreException e) {
- Activator.log(e.getStatus());
- }
- return new ILaunchConfiguration[0];
- }
-
- @Override
- public IResource getLaunchableResource(ISelection selection) {
- // We're not associated with a resource
- return null;
- }
-
- @Override
- public IResource getLaunchableResource(IEditorPart editorpart) {
- // We're not associated with a resource
- return null;
- }
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/TargetsContentProvider.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/TargetsContentProvider.java
deleted file mode 100644
index fb6bc3cf7..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/TargetsContentProvider.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.tcf.target.core.ITargetListener;
-import org.eclipse.tcf.target.core.ITargetManager;
-import org.eclipse.tcf.target.core.TargetEvent;
-
-/**
- * Provides navigator content for Targets.
- *
- * @author Doug Schaefer
- */
-public class TargetsContentProvider implements ITreeContentProvider, ITargetListener {
-
- private TreeViewer viewer;
- private Object input;
- private final ITargetManager targetManager;
-
- public TargetsContentProvider() {
- targetManager = Activator.getService(ITargetManager.class);
- targetManager.addTargetListener(this);
- }
-
- @Override
- public void handleEvent(final TargetEvent event) {
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- if (viewer != null) {
- switch (event.getEventType()) {
- case ADDED:
- case DELETED:
- viewer.refresh();
- break;
- case LAUNCHED:
- viewer.refresh(event.getTarget());
- break;
- }
- }
- }
- });
- }
-
- @Override
- public void dispose() {
- targetManager.removeTargetListener(this);
- viewer = null;
- }
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- this.viewer = (TreeViewer)viewer;
- this.input = newInput;
- }
-
- @Override
- public Object[] getElements(Object inputElement) {
- return targetManager.getTargets();
- }
-
- @Override
- public synchronized Object[] getChildren(Object parentElement) {
- if (parentElement == input)
- return targetManager.getTargets();
- return new Object[0];
- }
-
- @Override
- public Object getParent(Object element) {
- return null;
- }
-
- @Override
- public boolean hasChildren(Object element) {
- if (element == input)
- return true;
- else if (element instanceof ITarget)
- return false;
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/TargetsLabelProvider.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/TargetsLabelProvider.java
deleted file mode 100644
index 168b4e67b..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/TargetsLabelProvider.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.tcf.target.core.ITarget;
-
-public class TargetsLabelProvider implements ILabelProvider {
-
- @Override
- public void addListener(ILabelProviderListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void dispose() {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public boolean isLabelProperty(Object element, String property) {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public void removeListener(ILabelProviderListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public Image getImage(Object element) {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public String getText(Object element) {
- if (element instanceof ITarget) {
- ITarget target = (ITarget)element;
- return target.getName() + " ("
- + (target.isRunning() ? "connected" : "disconnected")
- + ")";
- }
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/actions/AttachDebuggerAction.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/actions/AttachDebuggerAction.java
deleted file mode 100644
index 445b2ef23..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/actions/AttachDebuggerAction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui.actions;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.tcf.internal.target.ui.Activator;
-import org.eclipse.tcf.internal.target.ui.TargetLaunchShortcut;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-public class AttachDebuggerAction extends BaseSelectionListenerAction {
-
- public AttachDebuggerAction() {
- super("Attach Debugger");
- }
-
- private class LauncherJob extends Job {
- public LauncherJob() {
- super("Attaching Debugger");
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- new TargetLaunchShortcut().launch(getStructuredSelection(), "debug");
- return Status.OK_STATUS;
- }
- }
-
- @Override
- public void run() {
- // Automate creating a Launch that connects to this target
- Object element = getStructuredSelection().getFirstElement();
- if (element instanceof ITarget) {
- new LauncherJob().schedule();
- }
- }
-
- @Override
- public ImageDescriptor getImageDescriptor() {
- ImageDescriptor desc = Activator.getImageDescriptor("icons/debug_exc.gif");
- if (desc != null)
- return desc;
- return super.getImageDescriptor();
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/actions/InspectTargetAction.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/actions/InspectTargetAction.java
deleted file mode 100644
index 86b26bbf9..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/actions/InspectTargetAction.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui.actions;
-
-import org.eclipse.tcf.internal.target.ui.Activator;
-import org.eclipse.tcf.internal.target.ui.editors.TargetEditor;
-import org.eclipse.tcf.internal.target.ui.editors.TargetEditorInput;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-import org.eclipse.ui.ide.IDE;
-
-public class InspectTargetAction extends BaseSelectionListenerAction {
-
- private final IWorkbenchPage page;
-
- public InspectTargetAction(IWorkbenchPage page) {
- super("Inspect");
- this.page = page;
- }
-
- @Override
- public void run() {
- Object element = getStructuredSelection().getFirstElement();
- if (element instanceof ITarget) {
- try {
- IDE.openEditor(page, new TargetEditorInput((ITarget)element), TargetEditor.EDITOR_ID);
- } catch (PartInitException e) {
- Activator.log(e.getStatus());
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/actions/TargetActionProvider.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/actions/TargetActionProvider.java
deleted file mode 100644
index 229e11ae6..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/actions/TargetActionProvider.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui.actions;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-import org.eclipse.ui.navigator.CommonActionProvider;
-import org.eclipse.ui.navigator.ICommonActionConstants;
-import org.eclipse.ui.navigator.ICommonActionExtensionSite;
-import org.eclipse.ui.navigator.ICommonMenuConstants;
-import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
-
-public class TargetActionProvider extends CommonActionProvider {
-
- private InspectTargetAction inspectTargetAction;
- private AttachDebuggerAction attachDebuggerAction;
- private PropertyDialogAction propertiesAction;
-
- private ICommonViewerWorkbenchSite viewSite;
- private boolean contribute = false;
-
- @Override
- public void init(ICommonActionExtensionSite aSite) {
- if (aSite.getViewSite() instanceof ICommonViewerWorkbenchSite) {
- viewSite = (ICommonViewerWorkbenchSite)aSite.getViewSite();
- inspectTargetAction = new InspectTargetAction(viewSite.getPage());
- attachDebuggerAction = new AttachDebuggerAction();
- propertiesAction = new PropertyDialogAction(viewSite.getSite(), viewSite.getSelectionProvider());
- contribute = true;
- }
- }
-
- @Override
- public void fillContextMenu(IMenuManager menu) {
- if (!contribute || getContext().getSelection().isEmpty())
- return;
-
- IStructuredSelection selection = (IStructuredSelection)getContext().getSelection();
-
- inspectTargetAction.selectionChanged(selection);
- if (inspectTargetAction.isEnabled())
- menu.insertAfter(ICommonMenuConstants.GROUP_OPEN, inspectTargetAction);
-
- propertiesAction.selectionChanged(selection);
- if (propertiesAction.isEnabled())
- menu.insertAfter(ICommonMenuConstants.GROUP_PROPERTIES, propertiesAction);
-
- attachDebuggerAction.selectionChanged(selection);
- if (attachDebuggerAction.isEnabled())
- menu.insertAfter(ICommonMenuConstants.GROUP_ADDITIONS, attachDebuggerAction);
-
- }
-
- @Override
- public void fillActionBars(IActionBars actionBars) {
- if (!contribute)
- return;
-
- IStructuredSelection selection = (IStructuredSelection)getContext().getSelection();
- if (selection.size() == 1 && selection.getFirstElement() instanceof ITarget) {
- inspectTargetAction.selectionChanged(selection);
- actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, inspectTargetAction);
- }
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/editors/TargetEditor.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/editors/TargetEditor.java
deleted file mode 100644
index df0ecf2c4..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/editors/TargetEditor.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui.editors;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.core.expressions.EvaluationContext;
-import org.eclipse.core.expressions.EvaluationResult;
-import org.eclipse.core.expressions.Expression;
-import org.eclipse.core.expressions.ExpressionConverter;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tcf.internal.target.ui.Activator;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.tcf.target.core.ITargetListener;
-import org.eclipse.tcf.target.core.TargetEvent;
-import org.eclipse.tcf.target.core.TargetEvent.EventType;
-import org.eclipse.tcf.target.ui.ITargetEditorInput;
-import org.eclipse.tcf.target.ui.ITargetPage;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.ui.part.MultiPageEditorPart;
-
-/**
- * An editor to show information about a target.
- *
- * @author Doug Schaefer
- */
-public class TargetEditor extends MultiPageEditorPart implements ITargetListener {
-
- public static final String EDITOR_ID = "org.eclipse.tcf.target.editors.TargetEditor";
-
- private List servicesList;
-
- private void createAttributesPage() {
- final Composite composite = new Composite(getContainer(), SWT.NONE);
- GridLayout layout = new GridLayout();
- composite.setLayout(layout);
- layout.numColumns = 2;
-
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- final ITarget target = ((ITargetEditorInput)getEditorInput()).getTarget();
- target.handleTargetRequest(new ITarget.ITargetRequest() {
- @Override
- public void execute(IChannel channel) {
- final Map<String, String> attributes = channel.getRemotePeer().getAttributes();
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- for (Entry<String, String> entry : attributes.entrySet())
- addAttribute(composite, entry.getKey(), entry.getValue());
-
- composite.layout(true);
- };
- });
- }
-
- @Override
- public void channelUnavailable(IStatus error) {
- }
- });
- }
- });
-
- int index = addPage(composite);
- setPageText(index, "Attributes");
- }
-
- private void addAttribute(Composite parent, String key, String value) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(key);
- label.setLayoutData(new GridData(SWT.TRAIL, SWT.CENTER, false, false));
-
- Text text = new Text(parent, SWT.BORDER | SWT.READ_ONLY);
- text.setText(value);
- text.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, true, false));
- }
-
- private void createServicesPage() {
- Composite composite = new Composite(getContainer(), SWT.NONE);
- GridLayout layout = new GridLayout();
- composite.setLayout(layout);
-
- servicesList = new List(composite, SWT.BORDER);
- servicesList.add("<Pending...>");
- servicesList.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- ITarget target = ((ITargetEditorInput)getEditorInput()).getTarget();
- target.handleTargetRequest(new ITarget.ITargetRequest() {
- @Override
- public void execute(IChannel channel) {
- final Collection<String> services = channel.getRemoteServices();
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- servicesList.removeAll();
- for (String service : services)
- servicesList.add(service);
- }
- });
- }
-
- @Override
- public void channelUnavailable(IStatus error) {
- Activator.log(error);
- }
- });
- }
- });
-
- int index = addPage(composite);
- setPageText(index, "Services");
- }
-
- protected void createPages() {
- createAttributesPage();
- createServicesPage();
-
- IExtensionRegistry extReg = Platform.getExtensionRegistry();
- IExtensionPoint extPoint = extReg.getExtensionPoint(Activator.PLUGIN_ID + ".targetPage");
- IExtension[] exts = extPoint.getExtensions();
- for (IExtension ext : exts) {
- IConfigurationElement[] elements = ext.getConfigurationElements();
- for (IConfigurationElement element : elements) {
- IConfigurationElement[] children = element.getChildren();
- // Should only be one - enablement
- try {
- Expression expression = ExpressionConverter.getDefault().perform(children[0]);
- ITarget target = ((ITargetEditorInput)getEditorInput()).getTarget();
- EvaluationContext context = new EvaluationContext(null, target);
- if (expression.evaluate(context).equals(EvaluationResult.TRUE)) {
- ITargetPage page = (ITargetPage)element.createExecutableExtension("class");
- if (page != null) {
- int index = addPage(page.createPage(getContainer(), target));
- setPageText(index, page.getPageText());
- }
- }
- } catch (CoreException e) {
- Activator.log(e.getStatus());
- }
- }
- }
-
- ITarget target = ((ITargetEditorInput)getEditorInput()).getTarget();
- setPartName(target.getShortName());
- target.addTargetListener(this);
- }
-
- @Override
- public void handleEvent(TargetEvent event) {
- if (event.getEventType() == EventType.DELETED)
- // target is gone, close the editor
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- getEditorSite().getPage().closeEditor(TargetEditor.this, false);
- }
- });
- }
-
- /**
- * Calculates the contents of page 2 when the it is activated.
- */
- protected void pageChange(int newPageIndex) {
- super.pageChange(newPageIndex);
- if (newPageIndex == 2) {
- }
- }
-
- @Override
- public void doSave(IProgressMonitor monitor) {
- // Nothing to save
- }
-
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- @Override
- public void doSaveAs() {
- // Nothing here either
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/editors/TargetEditorContributor.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/editors/TargetEditorContributor.java
deleted file mode 100644
index 8ce75700e..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/editors/TargetEditorContributor.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui.editors;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
-
-/**
- * Manages the installation/deinstallation of global actions for multi-page editors.
- * Responsible for the redirection of global actions to the active editor.
- * Multi-page contributor replaces the contributors for the individual editors in the multi-page editor.
- */
-public class TargetEditorContributor extends MultiPageEditorActionBarContributor {
- private IEditorPart activeEditorPart;
- private Action sampleAction;
- /**
- * Creates a multi-page contributor.
- */
- public TargetEditorContributor() {
- super();
- createActions();
- }
-
- public void setActivePage(IEditorPart part) {
- if (activeEditorPart == part)
- return;
-
- activeEditorPart = part;
-
- IActionBars actionBars = getActionBars();
- if (actionBars != null) {
- actionBars.updateActionBars();
- }
- }
-
- private void createActions() {
- sampleAction = new Action() {
- public void run() {
- MessageDialog.openInformation(null, "TCF UI", "Sample Action Executed");
- }
- };
- sampleAction.setText("Sample Action");
- sampleAction.setToolTipText("Sample Action tool tip");
- sampleAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
- getImageDescriptor(IDE.SharedImages.IMG_OBJS_TASK_TSK));
- }
-
- public void contributeToMenu(IMenuManager manager) {
- IMenuManager menu = new MenuManager("Editor &Menu");
- manager.prependToGroup(IWorkbenchActionConstants.MB_ADDITIONS, menu);
- menu.add(sampleAction);
- }
-
- public void contributeToToolBar(IToolBarManager manager) {
- manager.add(new Separator());
- manager.add(sampleAction);
- }
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/editors/TargetEditorInput.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/editors/TargetEditorInput.java
deleted file mode 100644
index 447fc2072..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/editors/TargetEditorInput.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui.editors;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.tcf.target.ui.ITargetEditorInput;
-import org.eclipse.ui.IPersistableElement;
-
-public class TargetEditorInput implements ITargetEditorInput {
-
- private final ITarget target;
-
- public TargetEditorInput(ITarget target) {
- this.target = target;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof ITargetEditorInput)
- return target.equals(((ITargetEditorInput)obj).getTarget());
- return super.equals(obj);
- }
-
- @Override
- public boolean exists() {
- return false;
- }
-
- @Override
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- @Override
- public String getName() {
- return target.getName();
- }
-
- @Override
- public IPersistableElement getPersistable() {
- return null;
- }
-
- @Override
- public String getToolTipText() {
- return target.getName();
- }
-
- @Override
- public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
- if (ITarget.class.equals(adapter))
- return target;
- return null;
- }
-
- @Override
- public ITarget getTarget() {
- return target;
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/CopyToTargetOperation.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/CopyToTargetOperation.java
deleted file mode 100644
index abf4cc01a..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/CopyToTargetOperation.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems 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.internal.target.ui.filesystem;
-
-import org.eclipse.tcf.target.core.ITarget;
-
-/**
- * @author DSchaefe
- *
- */
-public class CopyToTargetOperation {
-
- private final ITarget target;
- private final String[] source;
- private final String destination;
-
- public CopyToTargetOperation(ITarget target, String[] source, String destination) {
- this.target = target;
- this.source = source;
- this.destination = destination;
- }
-
- public void run() {
- for (String src : source)
- System.out.println("Copy " + src + " to " + target.getName() + ":" + destination);
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemContentProvider.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemContentProvider.java
deleted file mode 100644
index cfd20c86d..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemContentProvider.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui.filesystem;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tcf.internal.target.ui.Activator;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IFileSystem;
-
-public class FileSystemContentProvider implements ITreeContentProvider {
-
- private TreeViewer viewer;
- private boolean showRootNode;
- private boolean fetching;
-
- static final String pending = "pending...";
-
- static class RootNode {
- private static final String propertyName = "fileSystemRoot";
- private final ITarget target;
- private FileSystemNode[] roots;
-
- public RootNode(ITarget target) {
- this.target = target;
- }
- }
-
- public FileSystemContentProvider() {
- this(true);
- }
-
- public FileSystemContentProvider(boolean showRootNode) {
- this.showRootNode = showRootNode;
- }
-
- @Override
- public void dispose() {
- }
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (viewer instanceof TreeViewer)
- this.viewer = (TreeViewer)viewer;
- }
-
- @Override
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- @Override
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof ITarget) {
- ITarget target = (ITarget)parentElement;
- RootNode root = (RootNode)target.getLocalProperties().get(RootNode.propertyName);
- if (root == null) {
- root = new RootNode(target);
- target.getLocalProperties().put(RootNode.propertyName, root);
- }
- if (showRootNode) {
- return new Object[] { root };
- } else
- return getRoots((ITarget)parentElement);
- } else if (parentElement instanceof RootNode) {
- return getRoots(((RootNode)parentElement).target);
- } else if (parentElement instanceof FileSystemNode) {
- return ((FileSystemNode)parentElement).getChildren(viewer);
- } else {
- return new Object[0];
- }
- }
-
- private void refresh(final TreeViewer viewer, final Object parentElement) {
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- viewer.refresh(parentElement);
- }
- });
- }
-
- private Object[] getRoots(final ITarget target) {
- final RootNode root = (RootNode)target.getLocalProperties().get(RootNode.propertyName);
- if (root == null)
- return new Object[0];
-
- if (root.roots != null)
- return root.roots;
-
- if (!fetching) {
- fetching = true;
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- // Get the roots
- target.handleTargetRequest(new ITarget.ITargetRequest() {
- @Override
- public void execute(IChannel channel) {
- IFileSystem fileSystem = channel.getRemoteService(IFileSystem.class);
- fileSystem.roots(new IFileSystem.DoneRoots() {
- @Override
- public void doneRoots(IToken token, IFileSystem.FileSystemException error, IFileSystem.DirEntry[] entries) {
- root.roots = new FileSystemNode[entries.length];
- for (int i = 0; i < entries.length; ++i)
- root.roots[i] = new FileSystemNode(target, entries[i]);
- fetching = false;
- refresh(viewer, target);
- }
- });
- }
-
- @Override
- public void channelUnavailable(IStatus error) {
- Activator.log(error);
- }
- });
- }
- });
- }
-
- return new Object[] { pending };
- }
-
- @Override
- public Object getParent(Object element) {
- if (element instanceof RootNode)
- return ((RootNode)element).target;
- else if (element instanceof FileSystemNode)
- return ((FileSystemNode)element).getParent();
- else
- return null;
- }
-
- @Override
- public boolean hasChildren(Object element) {
- if (element instanceof ITarget)
- return true;
- else if (element instanceof RootNode)
- return true;
- else if (element instanceof FileSystemNode)
- return ((FileSystemNode)element).hasChildren();
- else
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemDropAdapter.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemDropAdapter.java
deleted file mode 100644
index 6ac6c308d..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemDropAdapter.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems 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.internal.target.ui.filesystem;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.ui.part.PluginDropAdapter;
-import org.eclipse.ui.part.ResourceTransfer;
-
-/**
- * @author DSchaefe
- *
- */
-public class FileSystemDropAdapter extends PluginDropAdapter {
-
- protected FileSystemDropAdapter(TreeViewer viewer) {
- super(viewer);
- setFeedbackEnabled(false);
- }
-
- @Override
- public boolean performDrop(Object data) {
- String[] source = null;
- if (data instanceof IResource[]) {
- IResource[] resources = (IResource[])data;
- source = new String[resources.length];
-
- } else if (data instanceof String[]) {
- source = (String[])data;
- } else
- return false;
-
- ITarget target = (ITarget)getViewer().getInput();
- FileSystemNode destNode = (FileSystemNode)getCurrentTarget();
- if (!destNode.getDirEntry().attrs.isDirectory()) {
- Object parent = destNode.getParent();
- if (parent instanceof FileSystemNode)
- destNode = (FileSystemNode)parent;
- else
- return false;
- }
- CopyToTargetOperation op = new CopyToTargetOperation(target, source, destNode.getPath());
- op.run();
-
- return true;
- }
-
- @Override
- public boolean validateDrop(Object target, int operation, TransferData transferData) {
- if (FileTransfer.getInstance().isSupportedType(transferData)) {
- return true;
- } else if (ResourceTransfer.getInstance().isSupportedType(transferData)) {
- return true;
- }
-
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemLabelProvider.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemLabelProvider.java
deleted file mode 100644
index b17d3e2a2..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemLabelProvider.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui.filesystem;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.swt.graphics.Image;
-
-public class FileSystemLabelProvider implements ILabelProvider {
-
- @Override
- public void addListener(ILabelProviderListener listener) {
- }
-
- @Override
- public void dispose() {
- }
-
- @Override
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- @Override
- public void removeListener(ILabelProviderListener listener) {
- }
-
- @Override
- public Image getImage(Object element) {
- return null;
- }
-
- @Override
- public String getText(Object element) {
- if (element instanceof FileSystemContentProvider.RootNode)
- return "File System";
- else if (element instanceof FileSystemNode)
- return ((FileSystemNode)element).getDirEntry().filename;
- else if (element == FileSystemContentProvider.pending)
- return element.toString();
- else
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemNode.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemNode.java
deleted file mode 100644
index 6740d0fa3..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemNode.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui.filesystem;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tcf.internal.target.ui.Activator;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.tcf.target.core.TargetRequestSequence;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.tcf.services.IFileSystem.DirEntry;
-import org.eclipse.tm.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tm.tcf.services.IFileSystem.IFileHandle;
-
-public class FileSystemNode {
-
- private final FileSystemNode parent;
- private final ITarget target;
- private final IFileSystem.DirEntry dirEntry;
-
- private FileSystemNode[] children;
- private boolean fetching;
-
- public FileSystemNode(ITarget target, IFileSystem.DirEntry dirEntry) {
- this(target, null, dirEntry);
- }
-
- public FileSystemNode(ITarget target, FileSystemNode parent, IFileSystem.DirEntry dirEntry) {
- this.target = target;
- this.parent = parent;
- this.dirEntry = dirEntry;
- }
-
- public IFileSystem.DirEntry getDirEntry() {
- return dirEntry;
- }
-
- private char buildPath(StringBuffer path, boolean last) {
- String filename = dirEntry.filename;
- char separator;
- if (parent != null)
- separator = parent.buildPath(path, false);
- else
- separator = filename.charAt(filename.length() - 1);
-
- path.append(filename);
- if (parent != null && !last)
- // Only need the separator after non root nodes and not the last one
- path.append(separator);
-
- return separator;
- }
-
- public String getPath() {
- StringBuffer path = new StringBuffer();
- buildPath(path, true);
- return path.toString();
- }
-
- private void refresh(final TreeViewer viewer, final Object parentElement) {
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- viewer.refresh(parentElement);
- }
- });
- }
-
- public boolean hasChildren() {
- // On Windows, if drive isn't mounted, it's listed but has no attributes.
- if (dirEntry.attrs == null)
- return false;
- return dirEntry.attrs.isDirectory();
- }
-
- public Object getParent() {
- return parent != null ? parent : target;
- }
-
- public Object[] getChildren(final TreeViewer viewer) {
- if (children != null)
- return children;
-
- if (!fetching) {
- fetching = true;
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- // Get the roots
- target.handleTargetRequest(new TargetRequestSequence() {
- private IFileSystem fileSystem;
- private IFileSystem.IFileHandle _handle;
- private List<FileSystemNode> _children = new ArrayList<FileSystemNode>();
-
- @Override
- public Step[] getSteps() {
- return new TargetRequestSequence.Step[] {
- new TargetRequestSequence.Step() {
- @Override
- public void run(IChannel channel) {
- fileSystem = channel.getRemoteService(IFileSystem.class);
- fileSystem.opendir(getPath(), new IFileSystem.DoneOpen() {
- @Override
- public void doneOpen(IToken token, FileSystemException error, IFileHandle handle) {
- if (error != null) {
- Activator.log(IStatus.ERROR, error);
- } else {
- _handle = handle;
- nextStep();
- }
- }
- });
- }
- },
- new TargetRequestSequence.Step() {
- @Override
- public void run(IChannel channel) {
- fileSystem.readdir(_handle, new IFileSystem.DoneReadDir() {
- @Override
- public void doneReadDir(IToken token, FileSystemException error,
- DirEntry[] entries, boolean eof) {
- if (error != null) {
- Activator.log(IStatus.ERROR, error);
- } else if (entries != null) {
- for (IFileSystem.DirEntry entry : entries)
- _children.add(new FileSystemNode(target, FileSystemNode.this, entry));
-
- // Loop until we get an eof
- if (eof)
- nextStep();
- else
- fileSystem.readdir(_handle, this);
- }
- }
- });
- }
- },
- new TargetRequestSequence.Step() {
- @Override
- public void run(IChannel channel) {
- fileSystem.close(_handle, new IFileSystem.DoneClose() {
- @Override
- public void doneClose(IToken token, FileSystemException error) {
- if (error != null)
- Activator.log(IStatus.ERROR, error);
- else {
- children = _children.toArray(new FileSystemNode[_children.size()]);
- fetching = false;
- refresh(viewer, FileSystemNode.this);
- nextStep();
- }
- }
- });
- }
- },
- };
- }
-
- @Override
- public void channelUnavailable(IStatus error) {
- Activator.log(error);
- }
- });
- }
- });
- }
-
- return new Object[] { FileSystemContentProvider.pending };
- }
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemTargetPage.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemTargetPage.java
deleted file mode 100644
index a88af7b90..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/filesystem/FileSystemTargetPage.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui.filesystem;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DragSource;
-import org.eclipse.swt.dnd.DragSourceEvent;
-import org.eclipse.swt.dnd.DragSourceListener;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.tcf.target.ui.ITargetPage;
-import org.eclipse.ui.part.ResourceTransfer;
-
-public class FileSystemTargetPage implements ITargetPage {
-
- private TreeViewer viewer;
-
- @Override
- public Composite createPage(Composite parent, ITarget target) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- composite.setLayout(layout);
-
- viewer = new TreeViewer(composite, SWT.BORDER);
- viewer.setContentProvider(new FileSystemContentProvider(false));
- viewer.setLabelProvider(new FileSystemLabelProvider());
- viewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- Transfer[] transferTypes = new Transfer[] {
- FileTransfer.getInstance(),
- ResourceTransfer.getInstance(),
- };
- viewer.addDropSupport(DND.DROP_COPY | DND.DROP_MOVE, transferTypes, new FileSystemDropAdapter(viewer));
- DragSource dragSource = new DragSource(viewer.getControl(), DND.DROP_COPY);
- dragSource.setTransfer(transferTypes);
- dragSource.addDragListener(new DragSourceListener() {
-
- @Override
- public void dragStart(DragSourceEvent event) {
- if (viewer.getSelection() == null)
- event.doit = false;
- }
-
- @Override
- public void dragSetData(DragSourceEvent event) {
- event.data = ((IStructuredSelection)viewer.getSelection()).toArray();
- }
-
- @Override
- public void dragFinished(DragSourceEvent event) {
- System.out.println("Hey");
- }
- });
- viewer.setInput(target);
-
- return composite;
- }
-
- @Override
- public String getPageText() {
- return "File System";
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/newtarget/NewTargetCommandHandler.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/newtarget/NewTargetCommandHandler.java
deleted file mode 100644
index 9610bf4fb..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/newtarget/NewTargetCommandHandler.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui.newtarget;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.IHandlerListener;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Display;
-
-public class NewTargetCommandHandler implements IHandler {
-
- @Override
- public void addHandlerListener(IHandlerListener handlerListener) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void removeHandlerListener(IHandlerListener handlerListener) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void dispose() {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- Wizard ntWizard = new NewTargetWizard();
- WizardDialog dialog = new WizardDialog(Display.getDefault().getActiveShell(), ntWizard);
- dialog.create();
- dialog.open();
- return null;
- }
-
- @Override
- public boolean isEnabled() {
- // TODO Auto-generated method stub
- return true;
- }
-
- @Override
- public boolean isHandled() {
- // TODO Auto-generated method stub
- return true;
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/newtarget/NewTargetPage.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/newtarget/NewTargetPage.java
deleted file mode 100644
index e94f4c493..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/newtarget/NewTargetPage.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui.newtarget;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Wizard page to set attributes for the target launch.
- * TODO assuming SSH for now.
- *
- * @author Doug Schaefer
- */
-public class NewTargetPage extends WizardPage {
-
- private Text hostnameText;
- private Text usernameText;
- private Text passwordText;
-
- private static final String HOSTNAME = "hostname";
- private static final String USERNAME = "username";
-
- public NewTargetPage() {
- super("NewTargetPage");
- setTitle("Target Agent Launch");
- setDescription("Enter SSH login information to use when launching the target agent.");
- }
-
- @Override
- public void createControl(Composite parent) {
- Composite comp = new Composite(parent, SWT.None);
- GridLayout layout = new GridLayout(2, false);
- comp.setLayout(layout);
-
- IDialogSettings settings = getDialogSettings();
-
- Label label = new Label(comp, SWT.NONE);
- label.setText("Host:");
-
- hostnameText = new Text(comp, SWT.BORDER);
- hostnameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- String hostname = settings.get(HOSTNAME);
- if (hostname != null)
- hostnameText.setText(hostname);
-
- label = new Label(comp, SWT.NONE);
- label.setText("User name:");
-
- usernameText = new Text(comp, SWT.BORDER);
- usernameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- String username = settings.get(USERNAME);
- if (username != null)
- usernameText.setText(settings.get(USERNAME));
-
- label = new Label(comp, SWT.NONE);
- label.setText("Password:");
-
- passwordText = new Text(comp, SWT.BORDER);
- passwordText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- passwordText.setEchoChar('*');
-
- setControl(comp);
- }
-
- public void performFinish() {
- // Save away the host and username
- IDialogSettings settings = getDialogSettings();
- settings.put(HOSTNAME, hostnameText.getText());
- settings.put(USERNAME, usernameText.getText());
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/newtarget/NewTargetWizard.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/newtarget/NewTargetWizard.java
deleted file mode 100644
index 3178b9d7c..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/newtarget/NewTargetWizard.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui.newtarget;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.tcf.internal.target.ui.Activator;
-
-/**
- * Wizard to create a new target object for the Targets view.
- *
- * @author Doug Schaefer
- */
-public class NewTargetWizard extends Wizard {
-
- NewTargetPage newTargetPage = new NewTargetPage();
-
- public NewTargetWizard() {
- final String SECTION = "NewTargetWizard";
- IDialogSettings rootSettings = Activator.getDefault().getDialogSettings();
- IDialogSettings mySettings = rootSettings.getSection(SECTION);
- if (mySettings == null)
- mySettings = rootSettings.addNewSection(SECTION);
- setDialogSettings(mySettings);
- }
-
- @Override
- public void addPages() {
- addPage(newTargetPage);
- }
-
- @Override
- public boolean performFinish() {
- newTargetPage.performFinish();
- return true;
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesContentProvider.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesContentProvider.java
deleted file mode 100644
index 13be9a8f9..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesContentProvider.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems 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.internal.target.ui.processes;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tcf.internal.target.core.Activator;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.tcf.target.core.TargetRequestSequence;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IProcesses;
-
-/**
- * @author dschaefer
- *
- */
-public class ProcessesContentProvider implements ITreeContentProvider {
-
- private TreeViewer viewer;
- private boolean showRootNode;
- private boolean fetching;
-
- static final String pending = "pending...";
-
- static class RootNode {
- static final String propertyName = "processesRoot";
- private final ITarget target;
- private ProcessesNode[] processes;
-
- public RootNode(ITarget target) {
- this.target = target;
- }
- }
-
- public ProcessesContentProvider() {
- this(true);
- }
-
- public ProcessesContentProvider(boolean showRootNode) {
- this.showRootNode = showRootNode;
- }
-
- @Override
- public void dispose() {
- }
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (viewer instanceof TreeViewer)
- this.viewer = (TreeViewer)viewer;
- }
-
- @Override
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- @Override
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof ITarget) {
- ITarget target = (ITarget)parentElement;
- RootNode root = (RootNode)target.getLocalProperties().get(RootNode.propertyName);
- if (root == null) {
- root = new RootNode(target);
- target.getLocalProperties().put(RootNode.propertyName, root);
- }
- if (showRootNode) {
- return new Object[] { root };
- } else
- return getProcesses((ITarget)parentElement);
- } else if (parentElement instanceof RootNode) {
- return getProcesses(((RootNode)parentElement).target);
- } else if (parentElement instanceof ProcessesNode) {
- return ((ProcessesNode)parentElement).getChildren(viewer);
- } else
- return new Object[0];
- }
-
- private void refresh(final TreeViewer viewer, final Object parentElement) {
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- viewer.refresh(parentElement);
- }
- });
- }
-
- private Object[] getProcesses(final ITarget target) {
- final RootNode root = (RootNode)target.getLocalProperties().get(RootNode.propertyName);
- if (root == null)
- return new Object[0];
-
- if (root.processes != null)
- return root.processes;
-
- if (!fetching) {
- fetching = true;
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- target.handleTargetRequest(new TargetRequestSequence() {
- IProcesses processes;
- int i = 0;
-
- @Override
- public Step[] getSteps() {
- return new Step[] {
- new Step() {
- @Override
- public void run(IChannel channel) {
- processes = channel.getRemoteService(IProcesses.class);
- processes.getChildren(null, false, new IProcesses.DoneGetChildren() {
- @Override
- public void doneGetChildren(IToken token, Exception error, String[] context_ids) {
- root.processes = new ProcessesNode[context_ids.length];
- for (int i = 0; i < context_ids.length; ++i)
- root.processes[i] = new ProcessesNode(target, context_ids[i]);
- refresh(viewer, target);
- nextStep();
- }
- });
- }
- },
- new Step() {
- @Override
- public void run(IChannel channel) {
- processes.getContext(root.processes[i].getContextId(), new IProcesses.DoneGetContext() {
- @Override
- public void doneGetContext(IToken token, Exception error, IProcesses.ProcessContext context) {
- if (error != null) {
- Activator.log(IStatus.ERROR, error);
- } else {
- root.processes[i].setContext(context);
- if (++i < root.processes.length)
- processes.getContext(root.processes[i].getContextId(), this);
- else {
- refresh(viewer, target);
- fetching = false;
- nextStep();
- }
- }
- }
- });
- }
- }
- };
- }
-
- @Override
- public void channelUnavailable(IStatus error) {
- Activator.log(error);
- }
- });
- }
- });
- }
-
- return new Object[] { pending };
- }
-
- @Override
- public Object getParent(Object element) {
- if (element instanceof RootNode)
- return ((RootNode)element).target;
- else if (element instanceof ProcessesNode)
- return ((ProcessesNode)element).getParent();
- else
- return null;
- }
-
- @Override
- public boolean hasChildren(Object element) {
- if (element instanceof ITarget)
- return true;
- else if (element instanceof RootNode)
- return true;
- else
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesLabelProvider.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesLabelProvider.java
deleted file mode 100644
index 8869e776f..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesLabelProvider.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems 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.internal.target.ui.processes;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author dschaefer
- *
- */
-public class ProcessesLabelProvider implements ILabelProvider {
-
- @Override
- public void addListener(ILabelProviderListener listener) {
- }
-
- @Override
- public void dispose() {
- }
-
- @Override
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- @Override
- public void removeListener(ILabelProviderListener listener) {
- }
-
- @Override
- public Image getImage(Object element) {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public String getText(Object element) {
- if (element instanceof ProcessesContentProvider.RootNode)
- return "Processes";
- else if (element instanceof ProcessesNode)
- return ((ProcessesNode)element).getName();
- else if (element == ProcessesContentProvider.pending)
- return element.toString();
- else
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesNode.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesNode.java
deleted file mode 100644
index 88b166712..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesNode.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.eclipse.tcf.internal.target.ui.processes;
-
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.tm.tcf.services.IProcesses;
-
-public class ProcessesNode {
-
- private final ITarget target;
- private final ProcessesNode parent;
- private final String contextId;
- private IProcesses.ProcessContext context;
-
- public ProcessesNode(ITarget target, String contextId) {
- this(target, null, contextId);
- }
-
- public ProcessesNode(ITarget target, ProcessesNode parent, String contextId) {
- this.target = target;
- this.parent = parent;
- this.contextId = contextId;
- }
-
- public String getName() {
- if (context != null)
- return context.getName() + " (" + contextId + ")";
- else
- return contextId;
- }
-
- public String getContextId() {
- return contextId;
- }
-
- public void setContext(IProcesses.ProcessContext context) {
- this.context = context;
- }
-
- public IProcesses.ProcessContext getContext() {
- return context;
- }
-
- public Object[] getChildren(final TreeViewer viewer) {
- return new Object[0];
- }
-
- public Object getParent() {
- return parent != null ? parent : target;
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesTargetPage.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesTargetPage.java
deleted file mode 100644
index f20b36b9d..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/processes/ProcessesTargetPage.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems 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.internal.target.ui.processes;
-
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.tcf.internal.target.ui.processes.ProcessesContentProvider.RootNode;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.tcf.target.ui.ITargetPage;
-
-public class ProcessesTargetPage implements ITargetPage {
-
- private TreeViewer viewer;
-
- @Override
- public Composite createPage(Composite parent, final ITarget target) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(1, false));
-
- Composite buttons = new Composite(composite, SWT.NONE);
- buttons.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- buttons.setLayout(new GridLayout(2, false));
-
- Label label = new Label(buttons, SWT.NONE);
- label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false));
- label.setText("Processes running on the target");
-
- Button refresh = new Button(buttons, SWT.PUSH);
- refresh.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
- refresh.setText("Refresh");
- refresh.addSelectionListener(new SelectionListener() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- // Force a refresh of the data
- target.getLocalProperties().remove(RootNode.propertyName);
- viewer.refresh();
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
-
- viewer = new TreeViewer(composite, SWT.BORDER);
- viewer.setContentProvider(new ProcessesContentProvider(false));
- viewer.setLabelProvider(new ProcessesLabelProvider());
- viewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- viewer.setInput(target);
-
- return composite;
- }
-
- @Override
- public String getPageText() {
- return "Processes";
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/properties/LocalPropertyPage.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/properties/LocalPropertyPage.java
deleted file mode 100644
index 108751cf8..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/properties/LocalPropertyPage.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui.properties;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tcf.internal.target.core.LocalTarget;
-import org.eclipse.ui.IWorkbenchPropertyPage;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * Page for viewing and setting the Local Target connection properties.
- *
- * @author Doug Schaefer
- */
-public class LocalPropertyPage extends PropertyPage implements IWorkbenchPropertyPage {
-
- private Text hostText;
- private Text portText;
-
- @Override
- protected Control createContents(Composite parent) {
- Composite comp = new Composite(parent, SWT.NONE);
- comp.setLayout(new GridLayout(2, false));
-
- LocalTarget target = (LocalTarget)getElement();
-
- Label hostLabel = new Label(comp, SWT.NONE);
- hostLabel.setText("Host:");
-
- hostText = new Text(comp, SWT.BORDER);
- hostText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- hostText.setText(target.getHost());
- hostText.addModifyListener(new ModifyListener() {
- @Override
- public void modifyText(ModifyEvent e) {
- setValid(validHost());
- }
- });
-
- Label portLabel = new Label(comp, SWT.NONE);
- portLabel.setText("Port:");
-
- portText = new Text(comp, SWT.BORDER);
- portText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- portText.setText(target.getPort());
- portText.addModifyListener(new ModifyListener() {
- @Override
- public void modifyText(ModifyEvent e) {
- setValid(validPort());
- }
- });
-
- return comp;
- }
-
- private boolean validHost() {
- // valid if field isn't empty
- return !hostText.getText().isEmpty();
- }
-
- private boolean validPort() {
- // valid if text is a number
- String port = portText.getText();
- if (port.isEmpty()) {
- return false;
- } else {
- try {
- Integer.parseInt(portText.getText());
- return true;
- } catch (NumberFormatException ex) {
- return false;
- }
- }
- }
-
- @Override
- public String getErrorMessage() {
- if (!validHost())
- return "Host name is invalid";
-
- if (!validPort())
- return "Port number is invalid";
-
- return null;
- }
-
- @Override
- public boolean performOk() {
- LocalTarget target = (LocalTarget)getElement();
- target.setHost(hostText.getText().trim());
- target.setPort(portText.getText().trim());
- return super.performOk();
- }
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/properties/TargetSummaryPropertyPage.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/properties/TargetSummaryPropertyPage.java
deleted file mode 100644
index c339cff5f..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/internal/target/ui/properties/TargetSummaryPropertyPage.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.internal.target.ui.properties;
-
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-public class TargetSummaryPropertyPage extends PropertyPage {
-
- private static final String PATH_TITLE = "Name:";
-
- /**
- * Constructor for SamplePropertyPage.
- */
- public TargetSummaryPropertyPage() {
- super();
- }
-
- private void addFirstSection(Composite parent) {
- Composite composite = createDefaultComposite(parent);
-
- // Label for path field
- Label pathLabel = new Label(composite, SWT.NONE);
- pathLabel.setText(PATH_TITLE);
-
- // Path text field
- Text pathValueText = new Text(composite, SWT.WRAP | SWT.READ_ONLY);
- pathValueText.setText(((ITarget)getElement()).getName());
- }
-
- private void addSeparator(Composite parent) {
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL;
- gridData.grabExcessHorizontalSpace = true;
- separator.setLayoutData(gridData);
- }
-
- /**
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- composite.setLayout(layout);
- GridData data = new GridData(GridData.FILL);
- data.grabExcessHorizontalSpace = true;
- composite.setLayoutData(data);
-
- addFirstSection(composite);
- addSeparator(composite);
- return composite;
- }
-
- private Composite createDefaultComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
-
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- composite.setLayoutData(data);
-
- return composite;
- }
-
- protected void performDefaults() {
- super.performDefaults();
- }
-
- public boolean performOk() {
- return true;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/target/ui/ITargetEditorInput.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/target/ui/ITargetEditorInput.java
deleted file mode 100644
index 841ab0931..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/target/ui/ITargetEditorInput.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.target.ui;
-
-import org.eclipse.tcf.target.core.ITarget;
-import org.eclipse.ui.IEditorInput;
-
-public interface ITargetEditorInput extends IEditorInput {
-
- ITarget getTarget();
-
-}
diff --git a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/target/ui/ITargetPage.java b/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/target/ui/ITargetPage.java
deleted file mode 100644
index f6ca1709a..000000000
--- a/plugins/org.eclipse.tcf.target.ui/src/org/eclipse/tcf/target/ui/ITargetPage.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems 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.target.ui;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tcf.target.core.ITarget;
-
-public interface ITargetPage {
-
- public Composite createPage(Composite parent, ITarget target);
-
- public String getPageText();
-
-}

Back to the top