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.launch.core
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.launch.core')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/META-INF/MANIFEST.MF6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.xml4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/interfaces/IFileTransferItem.java28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonFileTransferItemPersistenceDelegate.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IFileTransferLaunchAttributes.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchContextLaunchAttributes.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IContextSelectorLaunchAttributes.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.java7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.properties7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransferItem.java27
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransferItemValidator.java85
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransfersPersistenceDelegate.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/launchcontext/LaunchContextsPersistenceDelegate.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/RemoteSelectionContext.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/StepContextSelectionContext.java)28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/IRemoteSelectionContext.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/IStepContextSelectionContext.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/AbstractLaunchStep.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/iterators/AbstractLaunchStepGroupIterator.java63
17 files changed, 102 insertions, 191 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/META-INF/MANIFEST.MF
index ed1b91c01..216bdf1e7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/META-INF/MANIFEST.MF
@@ -19,10 +19,8 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Export-Package: org.eclipse.tcf.te.launch.core.activator;x-internal:=true,
- org.eclipse.tcf.te.launch.core.adapters.internal;x-internal:=true,
org.eclipse.tcf.te.launch.core.bindings,
org.eclipse.tcf.te.launch.core.bindings.interfaces,
- org.eclipse.tcf.te.launch.core.bindings.internal;x-friends:="org.eclipse.tcf.te.launch.ui",
org.eclipse.tcf.te.launch.core.delegates,
org.eclipse.tcf.te.launch.core.exceptions,
org.eclipse.tcf.te.launch.core.interfaces,
@@ -30,7 +28,6 @@ Export-Package: org.eclipse.tcf.te.launch.core.activator;x-internal:=true,
org.eclipse.tcf.te.launch.core.lm,
org.eclipse.tcf.te.launch.core.lm.delegates,
org.eclipse.tcf.te.launch.core.lm.interfaces,
- org.eclipse.tcf.te.launch.core.lm.internal;x-internal:=true,
org.eclipse.tcf.te.launch.core.nls;x-internal:=true,
org.eclipse.tcf.te.launch.core.persistence,
org.eclipse.tcf.te.launch.core.persistence.filetransfer,
@@ -39,4 +36,5 @@ Export-Package: org.eclipse.tcf.te.launch.core.activator;x-internal:=true,
org.eclipse.tcf.te.launch.core.preferences,
org.eclipse.tcf.te.launch.core.selection,
org.eclipse.tcf.te.launch.core.selection.interfaces,
- org.eclipse.tcf.te.launch.core.steps
+ org.eclipse.tcf.te.launch.core.steps,
+ org.eclipse.tcf.te.launch.core.steps.iterators
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.xml
index 3b8add180..8504730de 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.xml
@@ -74,11 +74,11 @@
</with>
<with variable="context">
<or>
- <instanceof value="org.eclipse.tcf.te.launch.core.interfaces.IFileTransferItem"/>
+ <instanceof value="org.eclipse.tcf.te.runtime.services.interfaces.filetransfer.IFileTransferItem"/>
<and>
<instanceof value="java.lang.Class"/>
<with variable="contextClass">
- <equals value="org.eclipse.tcf.te.launch.core.interfaces.IFileTransferItem"/>
+ <equals value="org.eclipse.tcf.te.runtime.services.interfaces.filetransfer.IFileTransferItem"/>
</with>
</and>
</or>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java
index e8d70edc3..91e52c537 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java
@@ -34,7 +34,7 @@ import org.eclipse.tcf.te.launch.core.activator.CoreBundleActivator;
import org.eclipse.tcf.te.launch.core.bindings.LaunchConfigTypeBindingsManager;
import org.eclipse.tcf.te.launch.core.interfaces.IReferencedProjectItem;
import org.eclipse.tcf.te.launch.core.lm.interfaces.ICommonLaunchAttributes;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.IContextSelectorLaunchAttributes;
+import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchContextLaunchAttributes;
import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchManagerDelegate;
import org.eclipse.tcf.te.launch.core.nls.Messages;
import org.eclipse.tcf.te.launch.core.persistence.launchcontext.LaunchContextsPersistenceDelegate;
@@ -118,8 +118,8 @@ public class LaunchConfigurationDelegate extends AbstractLaunchConfigurationDele
launch.getLaunchMode()));
IModelNode[] contexts = LaunchContextsPersistenceDelegate.decodeLaunchContexts(
- launchConfig.getAttribute(IContextSelectorLaunchAttributes.ATTR_LAUNCH_CONTEXTS, (String)null));
- properties.setProperty(IContextSelectorLaunchAttributes.ATTR_ACTIVE_LAUNCH_CONTEXT, contexts != null && contexts.length > 0 ? contexts[0] : null);
+ launchConfig.getAttribute(ILaunchContextLaunchAttributes.ATTR_LAUNCH_CONTEXTS, (String)null));
+ properties.setProperty(ILaunchContextLaunchAttributes.ATTR_ACTIVE_LAUNCH_CONTEXT, contexts != null && contexts.length > 0 ? contexts[0] : null);
// Initialize the stepper
IStepContext context = (IStepContext)launch.getAdapter(IStepContext.class);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/interfaces/IFileTransferItem.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/interfaces/IFileTransferItem.java
deleted file mode 100644
index 8c551963c..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/interfaces/IFileTransferItem.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * 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.launch.core.interfaces;
-
-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;
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonFileTransferItemPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonFileTransferItemPersistenceDelegate.java
index 0bcfbe75c..0d611f98f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonFileTransferItemPersistenceDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonFileTransferItemPersistenceDelegate.java
@@ -13,9 +13,9 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tcf.te.launch.core.interfaces.IFileTransferItem;
-import org.eclipse.tcf.te.launch.core.persistence.filetransfer.FileTransferItem;
import org.eclipse.tcf.te.runtime.persistence.AbstractGsonMapPersistenceDelegate;
+import org.eclipse.tcf.te.runtime.services.filetransfer.FileTransferItem;
+import org.eclipse.tcf.te.runtime.services.interfaces.filetransfer.IFileTransferItem;
/**
* File transfer item to string delegate implementation.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IFileTransferLaunchAttributes.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IFileTransferLaunchAttributes.java
index 79acc14d1..41e5ba5cb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IFileTransferLaunchAttributes.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IFileTransferLaunchAttributes.java
@@ -21,4 +21,8 @@ public interface IFileTransferLaunchAttributes {
*/
public static final String ATTR_FILE_TRANSFERS = ICommonLaunchAttributes.ATTR_PREFIX + ".file_transfers"; //$NON-NLS-1$
+ /**
+ * Launch attribute: The file transfer item the launch is currently operating with.
+ */
+ public static final String ATTR_ACTIVE_FILE_TRANSFER = ICommonLaunchAttributes.ATTR_PREFIX + ".file_transfer"; //$NON-NLS-1$
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IContextSelectorLaunchAttributes.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchContextLaunchAttributes.java
index 5f9026565..76efd9f79 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IContextSelectorLaunchAttributes.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchContextLaunchAttributes.java
@@ -12,7 +12,7 @@ package org.eclipse.tcf.te.launch.core.lm.interfaces;
/**
* Defines the launch configuration attribute id's to access the launch step contexts.
*/
-public interface IContextSelectorLaunchAttributes {
+public interface ILaunchContextLaunchAttributes {
/**
* Launch configuration attribute: The active launch context the launch is operating with.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.java
index e9b3a5b7a..5a3e40dca 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.java
@@ -43,13 +43,6 @@ public class Messages extends NLS {
public static String AbstractLaunchConfigurationDelegate_scoped_incremental_build;
- public static String FileTransferItemValidator_missingFile;
- public static String FileTransferItemValidator_missingFileOrDirectory;
- public static String FileTransferItemValidator_notExistingFile;
- public static String FileTransferItemValidator_notExistingFileOrDirectory;
- public static String FileTransferItemValidator_invalidFile;
- public static String FileTransferItemValidator_invalidFileOrDirectory;
-
public static String ReferencedProjectItemValidator_missingProject;
public static String ReferencedProjectItemValidator_notExistingProject;
public static String ReferencedProjectItemValidator_closedProject;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.properties
index 64c16b153..936f96769 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.properties
@@ -19,13 +19,6 @@ LaunchConfigurationDelegate_error_inaccessibleReferencedProject=Failed to access
AbstractLaunchConfigurationDelegate_scoped_incremental_build=Scoped incremental build before launch...
-FileTransferItemValidator_missingFile = Missing file
-FileTransferItemValidator_missingFileOrDirectory = Missing file or directory
-FileTransferItemValidator_notExistingFile = File does not exist or is not readable
-FileTransferItemValidator_notExistingFileOrDirectory = File or directory does not exist or is not writeable
-FileTransferItemValidator_invalidFile = File is not valid
-FileTransferItemValidator_invalidFileOrDirectory = File or directory is not valid
-
ReferencedProjectItemValidator_missingProject = Missing project
ReferencedProjectItemValidator_notExistingProject = Project does not exist
ReferencedProjectItemValidator_closedProject = Project is closed
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransferItem.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransferItem.java
deleted file mode 100644
index 31dea92bf..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransferItem.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * 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.launch.core.persistence.filetransfer;
-
-import org.eclipse.tcf.te.launch.core.interfaces.IFileTransferItem;
-import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
-
-/**
- * FileTransferItem
- */
-public class FileTransferItem extends PropertiesContainer implements IFileTransferItem {
-
- /**
- * Constructor.
- */
- public FileTransferItem() {
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransferItemValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransferItemValidator.java
deleted file mode 100644
index 82ef47013..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransferItemValidator.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * 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.launch.core.persistence.filetransfer;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.tcf.te.launch.core.interfaces.IFileTransferItem;
-import org.eclipse.tcf.te.launch.core.nls.Messages;
-
-/**
- * FileTransferItemValidator
- */
-public class FileTransferItemValidator {
-
- public static final Map<String,String> validate(IFileTransferItem item) {
- Assert.isNotNull(item);
-
- Map<String,String> invalid = new HashMap<String,String>();
-
- String host = item.getStringProperty(IFileTransferItem.PROPERTY_HOST);
- String target = item.getStringProperty(IFileTransferItem.PROPERTY_TARGET);
- int direction = (item.getProperty(IFileTransferItem.PROPERTY_DIRECTION) != null ?
- item.getIntProperty(IFileTransferItem.PROPERTY_DIRECTION) : IFileTransferItem.HOST_TO_TARGET);
-
- if (host == null || host.trim().length() == 0) {
- if (direction == IFileTransferItem.HOST_TO_TARGET) {
- invalid.put(IFileTransferItem.PROPERTY_HOST, Messages.FileTransferItemValidator_missingFile);
- }
- else {
- invalid.put(IFileTransferItem.PROPERTY_HOST, Messages.FileTransferItemValidator_missingFileOrDirectory);
- }
- }
- else {
- IPath hostPath = new Path(host);
- File hostFile = hostPath.toFile();
- if (direction == IFileTransferItem.HOST_TO_TARGET) {
- if (!hostFile.exists() || !hostFile.isFile() || !hostFile.canRead()) {
- invalid.put(IFileTransferItem.PROPERTY_HOST, Messages.FileTransferItemValidator_notExistingFile);
- }
- }
- else {
- if ((hostFile.isFile() && !hostFile.canWrite()) || (hostFile.isDirectory() && (!hostFile.exists() || !hostFile.canWrite()))) {
- invalid.put(IFileTransferItem.PROPERTY_HOST, Messages.FileTransferItemValidator_notExistingFileOrDirectory);
- }
- }
- }
-
- if (target == null || target.trim().length() == 0) {
- if (direction == IFileTransferItem.HOST_TO_TARGET) {
- invalid.put(IFileTransferItem.PROPERTY_TARGET, Messages.FileTransferItemValidator_missingFileOrDirectory);
- }
- else {
- invalid.put(IFileTransferItem.PROPERTY_TARGET, Messages.FileTransferItemValidator_missingFile);
- }
- }
- else {
- IPath targetPath = new Path(target);
- if (direction == IFileTransferItem.HOST_TO_TARGET) {
- if (!targetPath.isValidPath(target)) {
- invalid.put(IFileTransferItem.PROPERTY_TARGET, Messages.FileTransferItemValidator_invalidFileOrDirectory);
- }
- }
- else {
- if (!targetPath.isValidPath(target)) {
- invalid.put(IFileTransferItem.PROPERTY_TARGET, Messages.FileTransferItemValidator_invalidFile);
- }
- }
- }
-
- return invalid.isEmpty() ? null : invalid;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransfersPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransfersPersistenceDelegate.java
index 074b06512..abf476913 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransfersPersistenceDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransfersPersistenceDelegate.java
@@ -13,11 +13,11 @@ import java.util.List;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.tcf.te.launch.core.interfaces.IFileTransferItem;
import org.eclipse.tcf.te.launch.core.lm.interfaces.IFileTransferLaunchAttributes;
import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification;
import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListPersistenceDelegate;
import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListXMLParser;
+import org.eclipse.tcf.te.runtime.services.interfaces.filetransfer.IFileTransferItem;
/**
* File transfer persistence delegate.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/launchcontext/LaunchContextsPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/launchcontext/LaunchContextsPersistenceDelegate.java
index f624a0b6c..d8c644a87 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/launchcontext/LaunchContextsPersistenceDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/launchcontext/LaunchContextsPersistenceDelegate.java
@@ -17,7 +17,7 @@ import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.IContextSelectorLaunchAttributes;
+import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchContextLaunchAttributes;
import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification;
import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListPersistenceDelegate;
import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListXMLParser;
@@ -43,7 +43,7 @@ public class LaunchContextsPersistenceDelegate {
private static final String TAG_LAUNCH_CONTEXT = "context"; //$NON-NLS-1$
private static final AbstractItemListPersistenceDelegate<IModelNode> delegate =
- new AbstractItemListPersistenceDelegate<IModelNode>(TAG_LAUNCH_CONTEXT, IContextSelectorLaunchAttributes.ATTR_LAUNCH_CONTEXTS) {
+ new AbstractItemListPersistenceDelegate<IModelNode>(TAG_LAUNCH_CONTEXT, ILaunchContextLaunchAttributes.ATTR_LAUNCH_CONTEXTS) {
@Override
protected AbstractItemListXMLParser<IModelNode> getXMLParser() {
return new AbstractItemListXMLParser<IModelNode>(TAG_LAUNCH_CONTEXT) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/StepContextSelectionContext.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/RemoteSelectionContext.java
index 9139008a7..b7f40337f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/StepContextSelectionContext.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/RemoteSelectionContext.java
@@ -9,46 +9,46 @@
*******************************************************************************/
package org.eclipse.tcf.te.launch.core.selection;
-import org.eclipse.tcf.te.launch.core.selection.interfaces.IStepContextSelectionContext;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
+import org.eclipse.tcf.te.launch.core.selection.interfaces.IRemoteSelectionContext;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
/**
* Step context selection context implementation.
*/
-public class StepContextSelectionContext extends AbstractSelectionContext implements IStepContextSelectionContext {
+public class RemoteSelectionContext extends AbstractSelectionContext implements IRemoteSelectionContext {
// The step context
- private IStepContext stepCtx = null;
+ private IModelNode remoteCtx = null;
/**
* Constructor.
*
- * @param stepCtx The step context or <code>null</code>.
+ * @param remoteCtx The remote context or <code>null</code>.
* @param isPreferred <code>True</code> to mark the selection context the preferred context,
* <code>false</code> otherwise.
*/
- public StepContextSelectionContext(IStepContext remoteCtx, boolean isPreferred) {
+ public RemoteSelectionContext(IModelNode remoteCtx, boolean isPreferred) {
this(remoteCtx, null, isPreferred);
}
/**
* Constructor.
*
- * @param stepCtx The step context or <code>null</code>.
+ * @param remoteCtx The remote context or <code>null</code>.
* @param selections The selected objects or <code>null</code>.
* @param isPreferred <code>True</code> to mark the selection context the preferred context,
* <code>false</code> otherwise.
*/
- public StepContextSelectionContext(IStepContext remoteCtx, Object[] selections, boolean isPreferred) {
+ public RemoteSelectionContext(IModelNode remoteCtx, Object[] selections, boolean isPreferred) {
super(selections, isPreferred);
- this.stepCtx = remoteCtx;
+ this.remoteCtx = remoteCtx;
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.selection.interfaces.IStepContextSelectionContext#getRemoteCtx()
+ * @see org.eclipse.tcf.te.launch.core.selection.interfaces.IRemoteSelectionContext#getRemoteCtx()
*/
@Override
- public IStepContext getStepCtx() {
- return stepCtx;
+ public IModelNode getRemoteCtx() {
+ return remoteCtx;
}
/* (non-Javadoc)
@@ -58,8 +58,8 @@ public class StepContextSelectionContext extends AbstractSelectionContext implem
public String toString() {
StringBuffer toString = new StringBuffer();
- if (stepCtx != null) {
- toString.append(stepCtx.toString());
+ if (remoteCtx != null) {
+ toString.append(remoteCtx.toString());
}
toString.append(toString.length() > 0 ? " " : ""); //$NON-NLS-1$ //$NON-NLS-2$
toString.append(super.toString());
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/IStepContextSelectionContext.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/IRemoteSelectionContext.java
index 45cbe3e77..df97305d9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/IStepContextSelectionContext.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/IRemoteSelectionContext.java
@@ -9,17 +9,17 @@
*******************************************************************************/
package org.eclipse.tcf.te.launch.core.selection.interfaces;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
/**
- * A selection context providing the step context for the launch.
+ * A selection context providing the remote context for the launch.
*/
-public interface IStepContextSelectionContext extends ISelectionContext {
+public interface IRemoteSelectionContext extends ISelectionContext {
/**
- * Returns the step context.
+ * Returns the remote context.
*
- * @return The step context or <code>null</code>.
+ * @return The remote context or <code>null</code>.
*/
- public IStepContext getStepCtx();
+ public IModelNode getRemoteCtx();
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/AbstractLaunchStep.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/AbstractLaunchStep.java
index f19061f30..6d4daf08f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/AbstractLaunchStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/AbstractLaunchStep.java
@@ -12,7 +12,7 @@ package org.eclipse.tcf.te.launch.core.steps;
import org.eclipse.core.runtime.Assert;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.IContextSelectorLaunchAttributes;
+import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchContextLaunchAttributes;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
import org.eclipse.tcf.te.runtime.stepper.extensions.AbstractStep;
@@ -42,7 +42,7 @@ public abstract class AbstractLaunchStep extends AbstractStep {
*/
protected IModelNode getActiveLaunchContext(IPropertiesContainer data) {
Assert.isNotNull(data);
- Object context = data.getProperty(IContextSelectorLaunchAttributes.ATTR_ACTIVE_LAUNCH_CONTEXT);
+ Object context = data.getProperty(ILaunchContextLaunchAttributes.ATTR_ACTIVE_LAUNCH_CONTEXT);
Assert.isTrue(context instanceof IModelNode);
return (IModelNode)context;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/iterators/AbstractLaunchStepGroupIterator.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/iterators/AbstractLaunchStepGroupIterator.java
new file mode 100644
index 000000000..7e8033802
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/iterators/AbstractLaunchStepGroupIterator.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * 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.launch.core.steps.iterators;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchContextLaunchAttributes;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepGroupIterator;
+
+/**
+ * Abstract launch stepgroup iterator.
+ */
+public abstract class AbstractLaunchStepGroupIterator extends ExecutableExtension implements IStepGroupIterator {
+
+ /**
+ * Returns the launch object for the given step context.
+ *
+ * @param context The step context.
+ * @return The launch or <code>null</code>.
+ */
+ protected ILaunch getLaunch(IStepContext context) {
+ Assert.isNotNull(context);
+ return (ILaunch)context.getAdapter(ILaunch.class);
+ }
+
+ /**
+ * Returns the active launch context model node that is currently used.
+ *
+ * @param data The data giving object. Must not be <code>null</code>.
+ * @return The active launch context model node.
+ */
+ protected IModelNode getActiveLaunchContext(IPropertiesContainer data) {
+ Assert.isNotNull(data);
+ Object context = data.getProperty(ILaunchContextLaunchAttributes.ATTR_ACTIVE_LAUNCH_CONTEXT);
+ Assert.isTrue(context instanceof IModelNode);
+ return (IModelNode)context;
+ }
+
+ /**
+ * Returns the uses launch configuration.
+ *
+ * @param context The step context.
+ * @return
+ */
+ protected ILaunchConfiguration getLaunchConfiguration(IStepContext context) {
+ ILaunch launch = getLaunch(context);
+ Assert.isNotNull(launch);
+ return launch.getLaunchConfiguration();
+ }
+}

Back to the top