Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2012-04-11 12:47:10 +0000
committerUwe Stieber2012-04-11 12:47:10 +0000
commit74f0ba2b8c46fb8af8977bb669dbe576aa4162a5 (patch)
treef903d8e3b989480c620eb371358deb1bb3868129 /target_explorer/plugins/org.eclipse.tcf.te.runtime.services
parentaa5925aede10214fa6830270ed985658aa177baa (diff)
downloadorg.eclipse.tcf-74f0ba2b8c46fb8af8977bb669dbe576aa4162a5.tar.gz
org.eclipse.tcf-74f0ba2b8c46fb8af8977bb669dbe576aa4162a5.tar.xz
org.eclipse.tcf-74f0ba2b8c46fb8af8977bb669dbe576aa4162a5.zip
Target Explorer: ADD File Transfer to Remote App launch
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.runtime.services')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/META-INF/MANIFEST.MF40
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.properties26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.xml2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/filetransfer/FileTransferItem.java69
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/filetransfer/IFileTransferItem.java58
5 files changed, 163 insertions, 32 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/META-INF/MANIFEST.MF
index 69ce1fb1b..cc0ea9ced 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/META-INF/MANIFEST.MF
@@ -1,19 +1,21 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tcf.te.runtime.services;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tcf.te.runtime.services.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.core.expressions;bundle-version="3.4.300",
- org.eclipse.tcf.te.runtime;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tcf.te.runtime.services,
- org.eclipse.tcf.te.runtime.services.activator;x-internal:=true,
- org.eclipse.tcf.te.runtime.services.interfaces,
- org.eclipse.tcf.te.runtime.services.interfaces.constants,
- org.eclipse.tcf.te.runtime.services.internal;x-internal:=true,
- org.eclipse.tcf.te.runtime.services.nls;x-internal:=true
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.runtime.services;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.runtime.services.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.runtime.services,
+ org.eclipse.tcf.te.runtime.services.activator;x-internal:=true,
+ org.eclipse.tcf.te.runtime.services.filetransfer,
+ org.eclipse.tcf.te.runtime.services.interfaces,
+ org.eclipse.tcf.te.runtime.services.interfaces.constants,
+ org.eclipse.tcf.te.runtime.services.interfaces.filetransfer,
+ org.eclipse.tcf.te.runtime.services.internal;x-internal:=true,
+ org.eclipse.tcf.te.runtime.services.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.properties
index ab8f9d542..388945886 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.properties
@@ -1,12 +1,14 @@
-##################################################################################
-# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Wind River Systems - initial API and implementation
-##################################################################################
-
-pluginName = Target Explorer, Services plug-in
-providerName = Eclipse.org - TCF
+##################################################################################
+# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+pluginName = Target Explorer, Services plug-in
+providerName = Eclipse.org - TCF
+
+ExtensionPoint.service = Service Contribution \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.xml
index 8521aa65a..56601c646 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.xml
@@ -3,7 +3,7 @@
<plugin>
<!-- Extension points -->
- <extension-point id="services" name="Service Contributions" schema="schema/services.exsd"/>
+ <extension-point id="services" name="%ExtensionPoint.service" schema="schema/services.exsd"/>
<!-- Property tester contributions -->
<extension point="org.eclipse.core.expressions.propertyTesters">
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/filetransfer/FileTransferItem.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/filetransfer/FileTransferItem.java
new file mode 100644
index 000000000..5a4ef7f81
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/filetransfer/FileTransferItem.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tcf.te.runtime.services.filetransfer;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.interfaces.filetransfer.IFileTransferItem;
+
+/**
+ * FileTransferItem
+ */
+public class FileTransferItem extends PropertiesContainer implements IFileTransferItem {
+
+ /**
+ * Constructor.
+ */
+ public FileTransferItem() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IFileTransferItem#isEnabled()
+ */
+ @Override
+ public boolean isEnabled() {
+ return getBooleanProperty(PROPERTY_ENABLED);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IFileTransferItem#getHostPath()
+ */
+ @Override
+ public IPath getHostPath() {
+ return new Path(getStringProperty(PROPERTY_HOST));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IFileTransferItem#getTargetPath()
+ */
+ @Override
+ public IPath getTargetPath() {
+ return new Path(getStringProperty(PROPERTY_TARGET));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IFileTransferItem#getDirection()
+ */
+ @Override
+ public int getDirection() {
+ int direction = getIntProperty(PROPERTY_DIRECTION);
+ return direction == TARGET_TO_HOST ? TARGET_TO_HOST : HOST_TO_TARGET;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IFileTransferItem#getOptions()
+ */
+ @Override
+ public String getOptions() {
+ return getStringProperty(PROPERTY_OPTIONS);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/filetransfer/IFileTransferItem.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/filetransfer/IFileTransferItem.java
new file mode 100644
index 000000000..4dac74d72
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/filetransfer/IFileTransferItem.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tcf.te.runtime.services.interfaces.filetransfer;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+
+/**
+ * IFileTransferItem
+ */
+public interface IFileTransferItem extends IPropertiesContainer {
+
+ public static final String PROPERTY_ENABLED = "enabled"; //$NON-NLS-1$
+ public static final String PROPERTY_DIRECTION = "direction"; //$NON-NLS-1$
+ public static final String PROPERTY_HOST = "host"; //$NON-NLS-1$
+ public static final String PROPERTY_TARGET = "target"; //$NON-NLS-1$
+ public static final String PROPERTY_OPTIONS = "options"; //$NON-NLS-1$
+
+ public static final int HOST_TO_TARGET = 1;
+ public static final int TARGET_TO_HOST = 2;
+
+ /**
+ * Return <code>true</code> if the item is enabled.
+ */
+ public boolean isEnabled();
+
+ /**
+ * Return the host path. Must not be <code>null</code>.
+ * The host path needs to be a file for transfer from host to target.
+ * For a transfer from target to host, the path can be a file or directory.
+ */
+ public IPath getHostPath();
+
+ /**
+ * Return the target (remote) path. Must not be <code>null</code>.
+ * The target path needs to be a file for transfer from target to host.
+ * For a transfer from host to target, the path can be a file or directory.
+ */
+ public IPath getTargetPath();
+
+ /**
+ * Return the transfer direction.
+ */
+ public int getDirection();
+
+ /**
+ * Return the option string for the transfer or <code>null</code>.
+ */
+ public String getOptions();
+}

Back to the top