Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2014-12-16 04:39:39 -0500
committerUwe Stieber2015-01-16 02:03:18 -0500
commit76357669b9ddd084d917685ce3f67f3e38c182bd (patch)
treec6ef3535ed640f69d8d88ae5fe0f272619deb1e4
parent61b63104c70b4341b222f63041aef49bd6c7b2cb (diff)
downloadorg.eclipse.tcf-76357669b9ddd084d917685ce3f67f3e38c182bd.tar.gz
org.eclipse.tcf-76357669b9ddd084d917685ce3f67f3e38c182bd.tar.xz
org.eclipse.tcf-76357669b9ddd084d917685ce3f67f3e38c182bd.zip
Bug 454116: org.eclipse.remote API adapter for TCF
Change-Id: I32cc4887b487f4deff9eee403181ddf92cbae99f Signed-off-by: Markus Schorn <markus.schorn@windriver.com>
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncher.java108
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.settings/org.eclipse.jdt.core.prefs380
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.settings/org.eclipse.jdt.ui.prefs62
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.settings/org.eclipse.pde.prefs32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/META-INF/MANIFEST.MF22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/about.html28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/build.properties16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/plugin.properties13
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/plugin.xml20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/Activator.java35
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/Messages.java34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/Messages.properties20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnection.java270
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnectionBase.java102
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnectionManager.java216
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnectionWorkingCopy.java155
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFEclipseFileSystem.java78
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFFileManager.java59
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFFileStore.java195
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFProcess.java183
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFProcessBuilder.java130
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFProcessStreams.java57
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFRemoteServices.java41
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFServicesFactory.java22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/Messages.java30
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/Messages.properties16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/PeerInfo.java154
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFFileStoreOperation.java84
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperation.java107
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationChildStores.java123
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationDelete.java60
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationFetchInfo.java101
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationGetEnvironment.java60
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationMkDir.java88
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationOpenInputStream.java52
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationOpenOutputStream.java61
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationPutInfo.java102
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationStartProcess.java44
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.settings/org.eclipse.jdt.core.prefs362
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.settings/org.eclipse.jdt.ui.prefs56
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.settings/org.eclipse.pde.prefs32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/META-INF/MANIFEST.MF20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/about.html28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/build.properties16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/plugin.properties12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/plugin.xml21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/Activator.java35
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/Messages.java26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/Messages.properties12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFFileSystemContributor.java83
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFUIFileManager.java100
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFUIServices.java47
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFUIServicesFactory.java22
59 files changed, 4280 insertions, 56 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncher.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncher.java
index ae5c7fa1d..6bd95e653 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncher.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncher.java
@@ -503,7 +503,8 @@ public class ProcessLauncher extends PlatformObject implements IProcessLauncher
}
// If a console should be associated, a streams listener needs to be created
- if (properties.getBooleanProperty(IProcessLauncher.PROP_PROCESS_ASSOCIATE_CONSOLE)
+ if (streamsProxy != null
+ || properties.getBooleanProperty(IProcessLauncher.PROP_PROCESS_ASSOCIATE_CONSOLE)
|| properties.getStringProperty(IProcessLauncher.PROP_PROCESS_OUTPUT_REDIRECT_TO_FILE) != null) {
// Create the streams listener
streamsListener = createStreamsListener();
@@ -576,68 +577,63 @@ public class ProcessLauncher extends PlatformObject implements IProcessLauncher
}
}, new CallbackInvocationDelegate());
- // The streams got subscribed, check if we shall attach the console
- if (properties.getBooleanProperty(IProcessLauncher.PROP_PROCESS_ASSOCIATE_CONSOLE)) {
- // If no specific streams proxy is set, the output redirection will default
- // to the standard terminals console view
- if (streamsProxy == null) {
- // Register the notification listener to listen to the console disposal
- eventListener = new ProcessLauncherEventListener(this);
- EventManager.getInstance().addEventListener(eventListener, DisposedEvent.class);
-
- // Get the terminal service
- ITerminalService terminal = ServiceManager.getInstance().getService(ITerminalService.class);
- // If not available, we cannot fulfill this request
- if (terminal != null) {
- // Create the terminal streams settings
- PropertiesContainer props = new PropertiesContainer();
- props.setProperty(ITerminalsConnectorConstants.PROP_CONNECTOR_TYPE_ID, "org.eclipse.tcf.te.ui.terminals.type.streams"); //$NON-NLS-1$
- props.setProperty(ITerminalsConnectorConstants.PROP_ID, "org.eclipse.tcf.te.ui.terminals.TerminalsView"); //$NON-NLS-1$
- // Set the terminal tab title
- String terminalTitle = getTerminalTitle();
- if (terminalTitle != null) {
- props.setProperty(ITerminalsConnectorConstants.PROP_TITLE, terminalTitle);
- }
+ // The streams got subscribed, check what we need to do with them
+ if (streamsProxy != null) {
+ // Publish the streams to the supplied proxy
+ streamsProxy.connectInputStreamMonitor(connectRemoteOutputStream(getStreamsListener(), new String[] { IProcesses.PROP_STDIN_ID }));
+ // Create and store the streams the terminal will see as stdout
+ streamsProxy.connectOutputStreamMonitor(connectRemoteInputStream(getStreamsListener(), new String[] { IProcesses.PROP_STDOUT_ID }, null));
+ // Create and store the streams the terminal will see as stderr
+ streamsProxy.connectErrorStreamMonitor(connectRemoteInputStream(getStreamsListener(), new String[] { IProcesses.PROP_STDERR_ID }, null));
+ } else if (properties.getBooleanProperty(IProcessLauncher.PROP_PROCESS_ASSOCIATE_CONSOLE)) {
+ // We don't have a streams proxy, we default the output redirection to the standard terminals console view
+
+ // Register the notification listener to listen to the console disposal
+ eventListener = new ProcessLauncherEventListener(this);
+ EventManager.getInstance().addEventListener(eventListener, DisposedEvent.class);
+
+ // Get the terminal service
+ ITerminalService terminal = ServiceManager.getInstance().getService(ITerminalService.class);
+ // If not available, we cannot fulfill this request
+ if (terminal != null) {
+ // Create the terminal streams settings
+ PropertiesContainer props = new PropertiesContainer();
+ props.setProperty(ITerminalsConnectorConstants.PROP_CONNECTOR_TYPE_ID, "org.eclipse.tcf.te.ui.terminals.type.streams"); //$NON-NLS-1$
+ props.setProperty(ITerminalsConnectorConstants.PROP_ID, "org.eclipse.tcf.te.ui.terminals.TerminalsView"); //$NON-NLS-1$
+ // Set the terminal tab title
+ String terminalTitle = getTerminalTitle();
+ if (terminalTitle != null) {
+ props.setProperty(ITerminalsConnectorConstants.PROP_TITLE, terminalTitle);
+ }
- // Get the process output listener list from the properties
- Object value = properties.getProperty(PROP_PROCESS_OUTPUT_LISTENER);
- StreamsDataReceiver.Listener[] listeners = value instanceof StreamsDataReceiver.Listener[] ? (StreamsDataReceiver.Listener[]) value : null;
+ // Get the process output listener list from the properties
+ Object value = properties.getProperty(PROP_PROCESS_OUTPUT_LISTENER);
+ StreamsDataReceiver.Listener[] listeners = value instanceof StreamsDataReceiver.Listener[] ? (StreamsDataReceiver.Listener[]) value : null;
- // Create and store the streams which will be connected to the terminals stdin
- props.setProperty(ITerminalsConnectorConstants.PROP_STREAMS_STDIN, connectRemoteOutputStream(getStreamsListener(), new String[] { IProcesses.PROP_STDIN_ID }));
- // Create and store the streams the terminal will see as stdout
- props.setProperty(ITerminalsConnectorConstants.PROP_STREAMS_STDOUT, connectRemoteInputStream(getStreamsListener(), new String[] { IProcesses.PROP_STDOUT_ID }, listeners));
- // Create and store the streams the terminal will see as stderr
- props.setProperty(ITerminalsConnectorConstants.PROP_STREAMS_STDERR, connectRemoteInputStream(getStreamsListener(), new String[] { IProcesses.PROP_STDERR_ID }, null));
+ // Create and store the streams which will be connected to the terminals stdin
+ props.setProperty(ITerminalsConnectorConstants.PROP_STREAMS_STDIN, connectRemoteOutputStream(getStreamsListener(), new String[] { IProcesses.PROP_STDIN_ID }));
+ // Create and store the streams the terminal will see as stdout
+ props.setProperty(ITerminalsConnectorConstants.PROP_STREAMS_STDOUT, connectRemoteInputStream(getStreamsListener(), new String[] { IProcesses.PROP_STDOUT_ID }, listeners));
+ // Create and store the streams the terminal will see as stderr
+ props.setProperty(ITerminalsConnectorConstants.PROP_STREAMS_STDERR, connectRemoteInputStream(getStreamsListener(), new String[] { IProcesses.PROP_STDERR_ID }, null));
- // Copy the terminal properties
- props.setProperty(ITerminalsConnectorConstants.PROP_LOCAL_ECHO, properties.getBooleanProperty(ITerminalsConnectorConstants.PROP_LOCAL_ECHO));
- props.setProperty(ITerminalsConnectorConstants.PROP_LINE_SEPARATOR, properties.getStringProperty(ITerminalsConnectorConstants.PROP_LINE_SEPARATOR));
- props.setProperty(ITerminalsConnectorConstants.PROP_FORCE_NEW, properties.getBooleanProperty(ITerminalsConnectorConstants.PROP_FORCE_NEW));
+ // Copy the terminal properties
+ props.setProperty(ITerminalsConnectorConstants.PROP_LOCAL_ECHO, properties.getBooleanProperty(ITerminalsConnectorConstants.PROP_LOCAL_ECHO));
+ props.setProperty(ITerminalsConnectorConstants.PROP_LINE_SEPARATOR, properties.getStringProperty(ITerminalsConnectorConstants.PROP_LINE_SEPARATOR));
+ props.setProperty(ITerminalsConnectorConstants.PROP_FORCE_NEW, properties.getBooleanProperty(ITerminalsConnectorConstants.PROP_FORCE_NEW));
- // The custom data object is the process launcher itself
- props.setProperty(ITerminalsConnectorConstants.PROP_DATA, this);
+ // The custom data object is the process launcher itself
+ props.setProperty(ITerminalsConnectorConstants.PROP_DATA, this);
- // Initialize the process specific terminal state text representations
- props.setProperty("TabFolderManager_state_connected", Messages.ProcessLauncher_state_connected); //$NON-NLS-1$
- props.setProperty("TabFolderManager_state_connecting", Messages.ProcessLauncher_state_connecting); //$NON-NLS-1$
- props.setProperty("TabFolderManager_state_closed", Messages.ProcessLauncher_state_closed); //$NON-NLS-1$
+ // Initialize the process specific terminal state text representations
+ props.setProperty("TabFolderManager_state_connected", Messages.ProcessLauncher_state_connected); //$NON-NLS-1$
+ props.setProperty("TabFolderManager_state_connecting", Messages.ProcessLauncher_state_connecting); //$NON-NLS-1$
+ props.setProperty("TabFolderManager_state_closed", Messages.ProcessLauncher_state_closed); //$NON-NLS-1$
- // Open the console
- terminal.openConsole(props, new AsyncCallbackCollector.SimpleCollectorCallback(collector));
- }
- } else {
- // Create and connect the streams which will be connected to the terminals stdin
- streamsProxy.connectInputStreamMonitor(connectRemoteOutputStream(getStreamsListener(), new String[] { IProcesses.PROP_STDIN_ID }));
- // Create and store the streams the terminal will see as stdout
- streamsProxy.connectOutputStreamMonitor(connectRemoteInputStream(getStreamsListener(), new String[] { IProcesses.PROP_STDOUT_ID }, null));
- // Create and store the streams the terminal will see as stderr
- streamsProxy.connectErrorStreamMonitor(connectRemoteInputStream(getStreamsListener(), new String[] { IProcesses.PROP_STDERR_ID }, null));
+ // Open the console
+ terminal.openConsole(props, new AsyncCallbackCollector.SimpleCollectorCallback(collector));
}
- }
-
- // The streams got subscribed, check if we shall configure the output redirection to a file
- if (properties.getStringProperty(IProcessLauncher.PROP_PROCESS_OUTPUT_REDIRECT_TO_FILE) != null) {
+ } else if (properties.getStringProperty(IProcessLauncher.PROP_PROCESS_OUTPUT_REDIRECT_TO_FILE) != null) {
// Get the file name where to redirect the process output to
String filename = properties.getStringProperty(IProcessLauncher.PROP_PROCESS_OUTPUT_REDIRECT_TO_FILE);
try {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.classpath
new file mode 100644
index 000000000..ad32c83a7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.classpath
@@ -0,0 +1,7 @@
+<?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 kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.project
new file mode 100644
index 000000000..0d13c61d6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.remote.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/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..2817c6483
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,380 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+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.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=100
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..290bd5639
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,62 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Target Explorer Java STD
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=false
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_cleanup.use_type_arguments=false
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.settings/org.eclipse.pde.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.settings/org.eclipse.pde.prefs
new file mode 100644
index 000000000..cf80c8bc5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,32 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=1
+compilers.p.missing-version-require-bundle=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..44a04b22a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.remote.core;singleton:=true
+Bundle-Version: 1.3.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.remote.core.Activator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
+ org.eclipse.remote.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.3.0",
+ org.eclipse.tcf.core;bundle-version="1.3.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.3.0",
+ org.eclipse.tcf.te.core;bundle-version="1.3.0",
+ org.eclipse.tcf.te.runtime.model;bundle-version="1.3.0",
+ org.eclipse.core.filesystem;bundle-version="1.4.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.3.0",
+ org.eclipse.tcf.te.tcf.processes.core;bundle-version="1.3.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.tcf.remote.core;x-friends:="org.eclipse.tcf.te.tcf.remote.ui",
+ org.eclipse.tcf.te.tcf.remote.core.operation;x-friends:="org.eclipse.tcf.te.tcf.remote.ui"
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/about.html b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/about.html
new file mode 100644
index 000000000..0f07cf034
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/about.html
@@ -0,0 +1,28 @@
+<!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>May 24, 2012</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/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/build.properties
new file mode 100644
index 000000000..611112dd5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/build.properties
@@ -0,0 +1,16 @@
+###############################################################################
+# Copyright (c) 2012, 2014 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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ plugin.xml,\
+ about.html
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/plugin.properties
new file mode 100644
index 000000000..e3d893aa1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/plugin.properties
@@ -0,0 +1,13 @@
+##################################################################################
+# Copyright (c) 2014 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, TCF Remote Core Plug-in
+providerName = Eclipse.org - Target Explorer
+
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/plugin.xml
new file mode 100644
index 000000000..ece1187df
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/plugin.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.remote.core.remoteServices">
+ <remoteServices
+ class="org.eclipse.tcf.te.tcf.remote.core.TCFServicesFactory"
+ id="org.eclipse.tcf.te.tcf.remote.core.TCFService"
+ name="TCF"
+ scheme="tcf">
+ </remoteServices>
+ </extension>
+ <extension point="org.eclipse.core.filesystem.filesystems"
+ id="org.eclipse.tcf.te.tcf.remote.core.filesystem">
+ <filesystem scheme="tcf">
+ <run class="org.eclipse.tcf.te.tcf.remote.core.TCFEclipseFileSystem"/>
+ </filesystem>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/pom.xml
new file mode 100644
index 000000000..147ed920e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.3.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.remote.core</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/Activator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/Activator.java
new file mode 100644
index 000000000..2fbb3cd99
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/Activator.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ public static String ID = "org.eclipes.tcf.te.tcf.remote.core"; //$NON-NLS-1$
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ }
+
+ public static void logError(String msg, Throwable th) {
+ Platform.getLog(Platform.getBundle(ID)).log(new Status(IStatus.ERROR, ID, msg, th));
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/Messages.java
new file mode 100644
index 000000000..affb6e677
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/Messages.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.remote.core.Messages"; //$NON-NLS-1$
+ public static String TCFConnection_errorNoCommandShell;
+ public static String TCFConnection_errorNoEnvironment;
+ public static String TCFConnection_notifyListeners;
+ public static String TCFConnectionBase_errorNoPortForwarding;
+ public static String TCFConnectionManager_errorCannotConnect;
+ public static String TCFConnectionManager_errorNoCreateConnection;
+ public static String TCFFileManager_errorFileStoreForPath;
+ public static String TCFProcessBuilder_errorConnectionClosed;
+ public static String TCFProcessBuilder_errorLaunchingProcess;
+ public static String TCFProcessBuilder_errorNoCommand;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/Messages.properties
new file mode 100644
index 000000000..9eab18acc
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/Messages.properties
@@ -0,0 +1,20 @@
+################################################################################
+# Copyright (c) 2014 Wind River Systems, Inc.
+# 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:
+# Markus Schorn - initial API and implementation
+################################################################################
+TCFConnection_errorNoCommandShell=Command shell is not supported.
+TCFConnection_errorNoEnvironment=Cannot obtain environment
+TCFConnection_notifyListeners=Notify Listeners
+TCFConnectionBase_errorNoPortForwarding=Port forwarding is not supported.
+TCFConnectionManager_errorCannotConnect=Cannot establish connection
+TCFConnectionManager_errorNoCreateConnection=Creating a new TCF remote connection is not supported.
+TCFFileManager_errorFileStoreForPath=Cannot create file store
+TCFProcessBuilder_errorConnectionClosed=Connection {0} is not open
+TCFProcessBuilder_errorLaunchingProcess=Cannot launch remote process
+TCFProcessBuilder_errorNoCommand=No command specified
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnection.java
new file mode 100644
index 000000000..ac68fb743
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnection.java
@@ -0,0 +1,270 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core;
+
+import static java.util.Collections.emptyMap;
+import static java.util.Collections.unmodifiableMap;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.remote.core.IRemoteConnection;
+import org.eclipse.remote.core.IRemoteConnectionChangeEvent;
+import org.eclipse.remote.core.IRemoteConnectionChangeListener;
+import org.eclipse.remote.core.IRemoteConnectionWorkingCopy;
+import org.eclipse.remote.core.IRemoteFileManager;
+import org.eclipse.remote.core.IRemoteProcess;
+import org.eclipse.remote.core.IRemoteProcessBuilder;
+import org.eclipse.remote.core.exception.RemoteConnectionException;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.te.core.interfaces.IConnectable;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
+import org.eclipse.tcf.te.tcf.remote.core.operation.TCFOperationGetEnvironment;
+
+public class TCFConnection extends TCFConnectionBase {
+
+ private static enum EState {OPEN, CLOSED_TCF, CLOSED_REMOTE_SERVICES}
+
+ private final String fName;
+ private volatile IPeerNode fPeerNode;
+ private final List<IRemoteConnectionChangeListener> fListeners = new ArrayList<IRemoteConnectionChangeListener>();
+
+ private volatile EState fState;
+ private Map<String, String> fAttributes;
+ private Map<String, String> fEnvironment;
+
+ public TCFConnection(TCFRemoteServices tcfServices, IPeerNode peerNode) {
+ super(tcfServices);
+ fName = peerNode.getName();
+ fPeerNode = peerNode;
+ fState = peerNode.getConnectState() == IConnectable.STATE_CONNECTED ? EState.OPEN : EState.CLOSED_TCF;
+ }
+
+ public TCFConnection(TCFRemoteServices tcfServices, String name) {
+ super(tcfServices);
+ fName = name;
+ fState = EState.CLOSED_TCF;
+ }
+
+ public void setPeerNode(IPeerNode peerNode) {
+ fPeerNode = peerNode;
+ setConnectedTCF(peerNode.getConnectState() == IConnectable.STATE_CONNECTED);
+ }
+
+ public IPeerNode getPeerNode() {
+ return fPeerNode;
+ }
+
+ @Override
+ public String getAddress() {
+ if (fPeerNode == null)
+ return "0.0.0.0"; //$NON-NLS-1$
+
+ return fPeerNode.getPeer().getAttributes().get(IPeer.ATTR_IP_HOST);
+ }
+
+ @Override
+ public Map<String, String> getAttributes() {
+ if (fPeerNode == null)
+ return emptyMap();
+
+ if (fAttributes == null) {
+ Map<String, String> attributes = new HashMap<String, String>();
+ attributes.put(OS_NAME_PROPERTY, fPeerNode.getPeer().getOSName());
+ fAttributes = unmodifiableMap(attributes);
+ }
+ return fAttributes;
+ }
+
+ @Override
+ public IRemoteProcess getCommandShell(int flags) throws IOException {
+ throw new IOException(Messages.TCFConnection_errorNoCommandShell);
+ }
+
+ @Override
+ public Map<String, String> getEnv() {
+ if (fEnvironment == null && fPeerNode != null) {
+ try {
+ fEnvironment = new TCFOperationGetEnvironment(fPeerNode.getPeer()).execute(SubMonitor.convert(null));
+ } catch (OperationCanceledException e) {
+ } catch (CoreException e) {
+ Activator.logError(Messages.TCFConnection_errorNoEnvironment, e);
+ }
+ }
+ return fEnvironment;
+ }
+
+ @Override
+ public IRemoteFileManager getFileManager() {
+ return new TCFFileManager(this);
+ }
+
+ @Override
+ public String getName() {
+ return fName;
+ }
+
+ @Override
+ public int getPort() {
+ if (fPeerNode == null)
+ return 0;
+
+ try {
+ return Integer.parseInt(fPeerNode.getPeer().getAttributes().get(IPeer.ATTR_IP_PORT));
+ } catch (Exception e) {
+ return 0;
+ }
+ }
+
+ @Override
+ public IRemoteProcessBuilder getProcessBuilder(List<String> command) {
+ return new TCFProcessBuilder(this, command);
+ }
+
+ @Override
+ public IRemoteProcessBuilder getProcessBuilder(String... command) {
+ return new TCFProcessBuilder(this, command);
+ }
+
+ @Override
+ public String getUsername() {
+ if (fPeerNode == null)
+ return null;
+ return fPeerNode.getPeer().getAttributes().get(IPeer.ATTR_USER_NAME);
+ }
+
+ @Override
+ public IRemoteConnectionWorkingCopy getWorkingCopy() {
+ return new TCFConnectionWorkingCopy(this);
+ }
+
+ @Override
+ public boolean isOpen() {
+ return fState == EState.OPEN;
+ }
+
+ @Override
+ public void open(IProgressMonitor monitor) throws RemoteConnectionException {
+ if (fPeerNode == null) {
+ getRemoteServices().getConnectionManager().waitForInitialization(monitor);
+ }
+ boolean notify = false;
+ boolean performOpen = false;
+ synchronized (this) {
+ if (fState != EState.OPEN) {
+ if (fPeerNode.getConnectState() == IConnectable.STATE_CONNECTED) {
+ fState = EState.OPEN;
+ notify = true;
+ } else {
+ fState = EState.CLOSED_TCF;
+ performOpen = true;
+ }
+ }
+ }
+ if (notify) {
+ fireConnectionChangeEvent(IRemoteConnectionChangeEvent.CONNECTION_OPENED);
+ } else if (performOpen) {
+ getRemoteServices().getConnectionManager().open(fPeerNode, monitor);
+ }
+ }
+
+ @Override
+ public void close() {
+ boolean notify = false;
+ synchronized (this) {
+ if (fState == EState.OPEN) {
+ fState = EState.CLOSED_REMOTE_SERVICES;
+ notify = true;
+ }
+ }
+ if (notify) {
+ fireConnectionChangeEvent(IRemoteConnectionChangeEvent.CONNECTION_CLOSED);
+ }
+ }
+
+ void setConnectedTCF(boolean connected) {
+ int notify = -1;
+ synchronized (this) {
+ if (connected) {
+ if (fState == EState.CLOSED_TCF) {
+ fState = EState.OPEN;
+ notify = IRemoteConnectionChangeEvent.CONNECTION_OPENED;
+ }
+ } else {
+ if (fState == EState.OPEN) {
+ fState = EState.CLOSED_TCF;
+ notify = IRemoteConnectionChangeEvent.CONNECTION_CLOSED;
+ }
+ }
+ }
+ if (notify != -1) {
+ fireConnectionChangeEvent(notify);
+ }
+ }
+
+
+ @Override
+ public void addConnectionChangeListener(IRemoteConnectionChangeListener listener) {
+ synchronized (fListeners) {
+ if (!fListeners.contains(listener))
+ fListeners.add(listener);
+ }
+ }
+
+ @Override
+ public void removeConnectionChangeListener(IRemoteConnectionChangeListener listener) {
+ synchronized (fListeners) {
+ fListeners.remove(listener);
+ }
+ }
+
+ private IRemoteConnectionChangeListener[] getListeners() {
+ synchronized (fListeners) {
+ return fListeners.toArray(new IRemoteConnectionChangeListener[fListeners.size()]);
+ }
+ }
+
+ @Override
+ public void fireConnectionChangeEvent(final int type) {
+ final IRemoteConnection connection = this;
+ new Job(Messages.TCFConnection_notifyListeners) {
+ @SuppressWarnings("synthetic-access")
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ IRemoteConnectionChangeEvent event = new IRemoteConnectionChangeEvent() {
+ @Override
+ public IRemoteConnection getConnection() {
+ return connection;
+ }
+
+ @Override
+ public int getType() {
+ return type;
+ }
+ };
+ for (Object listener : getListeners()) {
+ ((IRemoteConnectionChangeListener) listener).connectionChanged(event);
+ }
+ return Status.OK_STATUS;
+ }
+ }.schedule();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnectionBase.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnectionBase.java
new file mode 100644
index 000000000..e71e9e115
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnectionBase.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.remote.core.IRemoteConnection;
+import org.eclipse.remote.core.exception.RemoteConnectionException;
+import org.eclipse.remote.core.exception.UnableToForwardPortException;
+
+public abstract class TCFConnectionBase implements IRemoteConnection {
+
+ private final TCFRemoteServices fRemoteServices;
+
+ private String fWorkingDirectory = "/"; //$NON-NLS-1$
+
+ public TCFConnectionBase(TCFRemoteServices tcfServices) {
+ fRemoteServices = tcfServices;
+ }
+
+ @Override
+ public final int compareTo(IRemoteConnection o) {
+ return getName().compareTo(o.getName());
+ }
+
+ @Override
+ public final String getProperty(String key) {
+ return getAttributes().get(key);
+ }
+
+ @Override
+ public final String getEnv(String name) {
+ return getEnv().get(name);
+ }
+
+ @Override
+ public final TCFRemoteServices getRemoteServices() {
+ return fRemoteServices;
+ }
+
+ @Override
+ public final String getWorkingDirectory() {
+ return fWorkingDirectory;
+ }
+
+ @Override
+ public final void forwardLocalPort(int localPort, String fwdAddress, int fwdPort) throws RemoteConnectionException {
+ throw new UnableToForwardPortException(Messages.TCFConnectionBase_errorNoPortForwarding);
+ }
+
+ @Override
+ public final int forwardLocalPort(String fwdAddress, int fwdPort, IProgressMonitor monitor) throws RemoteConnectionException {
+ throw new UnableToForwardPortException(Messages.TCFConnectionBase_errorNoPortForwarding);
+ }
+
+ @Override
+ public final void forwardRemotePort(int remotePort, String fwdAddress, int fwdPort) throws RemoteConnectionException {
+ throw new UnableToForwardPortException(Messages.TCFConnectionBase_errorNoPortForwarding);
+ }
+
+ @Override
+ public final int forwardRemotePort(String fwdAddress, int fwdPort, IProgressMonitor monitor) throws RemoteConnectionException {
+ throw new UnableToForwardPortException(Messages.TCFConnectionBase_errorNoPortForwarding);
+ }
+
+ @Override
+ public final void removeLocalPortForwarding(int port) {
+ }
+
+ @Override
+ public final void removeRemotePortForwarding(int port) {
+ }
+
+ @Override
+ public final void setWorkingDirectory(String path) {
+ if (new Path(path).isAbsolute()) {
+ fWorkingDirectory = path;
+ }
+ }
+ @Override
+ public final boolean supportsTCPPortForwarding() {
+ return false;
+ }
+
+ @Override
+ public final String toString() {
+ String str = getName() + " [" + getAddress(); //$NON-NLS-1$
+ int port = getPort();
+ if (port >= 0 && port != 1756) {
+ str += ":" + port; //$NON-NLS-1$
+ }
+ return str + "]"; //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnectionManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnectionManager.java
new file mode 100644
index 000000000..07443f467
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnectionManager.java
@@ -0,0 +1,216 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.EventObject;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.remote.core.AbstractRemoteConnectionManager;
+import org.eclipse.remote.core.IRemoteConnection;
+import org.eclipse.remote.core.IRemoteConnectionWorkingCopy;
+import org.eclipse.remote.core.exception.RemoteConnectionException;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.core.interfaces.IConnectable;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.events.ChangeEvent;
+import org.eclipse.tcf.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.runtime.interfaces.events.IEventListener;
+import org.eclipse.tcf.te.tcf.locator.interfaces.IPeerModelListener;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProperties;
+import org.eclipse.tcf.te.tcf.locator.model.ModelManager;
+
+public class TCFConnectionManager extends AbstractRemoteConnectionManager implements IPeerModelListener, IEventListener {
+ private final Map<String, TCFConnection> fConnections = Collections.synchronizedMap(new HashMap<String, TCFConnection>());
+ private int fInitialized = 0;
+
+ public TCFConnectionManager(TCFRemoteServices services) {
+ super(services);
+ }
+
+ @Override
+ protected TCFRemoteServices getRemoteServices() {
+ return (TCFRemoteServices) super.getRemoteServices();
+ }
+
+ public void initialize() {
+ synchronized (fConnections) {
+ if (fInitialized > 0)
+ return;
+
+ fInitialized = 1;
+
+ Protocol.invokeLater(new Runnable() {
+ @SuppressWarnings("synthetic-access")
+ @Override
+ public void run() {
+ EventManager.getInstance().addEventListener(TCFConnectionManager.this, ChangeEvent.class);
+ IPeerModel peerModel = ModelManager.getPeerModel();
+ peerModel.addListener(TCFConnectionManager.this);
+
+ synchronized (fConnections) {
+ for (IPeerNode peerNode : peerModel.getPeerNodes()) {
+ String name = peerNode.getPeer().getName();
+ TCFConnection connection = fConnections.get(name);
+ if (connection != null) {
+ connection.setPeerNode(peerNode);
+ } else {
+ fConnections.put(name, new TCFConnection(getRemoteServices(), peerNode));
+ }
+ }
+ for (Iterator<TCFConnection> it = fConnections.values().iterator(); it.hasNext(); ) {
+ TCFConnection conn = it.next();
+ if (conn.getPeerNode() == null)
+ it.remove();
+ }
+ fInitialized = 2;
+ fConnections.notifyAll();
+ }
+ }
+ });
+ }
+ }
+
+ public void waitForInitialization(IProgressMonitor monitor) {
+ synchronized (fConnections) {
+ if (fInitialized == 2)
+ return;
+ if (fInitialized == 0)
+ initialize();
+
+ while (fInitialized != 2) {
+ if (monitor.isCanceled())
+ return;
+ try {
+ fConnections.wait(500);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ return;
+ }
+ }
+ }
+ }
+
+ @Override
+ public void modelChanged(IPeerModel model, IPeerNode peerNode, boolean added) {
+ String name = peerNode.getPeer().getName();
+ if (added) {
+ synchronized (fConnections) {
+ if (!fConnections.containsKey(name)) {
+ fConnections.put(name, new TCFConnection(getRemoteServices(), peerNode));
+ }
+ }
+ } else {
+ TCFConnection connection = fConnections.remove(name);
+ if (connection != null) {
+ connection.setConnectedTCF(false);
+ }
+ }
+ }
+
+ @Override
+ public void modelDisposed(IPeerModel model) {
+ fConnections.clear();
+ }
+
+ @Override
+ public void eventFired(EventObject event) {
+ final ChangeEvent changeEvent = (ChangeEvent) event;
+ final Object source = changeEvent.getSource();
+ if (source instanceof IPeerNode && IPeerNodeProperties.PROPERTY_CONNECT_STATE.equals(changeEvent.getEventId())) {
+ IPeerNode peerNode = (IPeerNode) source;
+ TCFConnection connection = fConnections.get(peerNode.getPeer().getName());
+ if (connection != null) {
+ Object val= changeEvent.getNewValue();
+ boolean connected = val instanceof Number && ((Number) val).intValue() == IConnectable.STATE_CONNECTED;
+ connection.setConnectedTCF(connected);
+ }
+ }
+ }
+
+ @Override
+ public IRemoteConnection getConnection(String name) {
+ synchronized (fConnections) {
+ TCFConnection connection = fConnections.get(name);
+ if (connection == null && fInitialized < 2) {
+ connection = new TCFConnection(getRemoteServices(), name);
+ fConnections.put(name, connection);
+ }
+ }
+ return fConnections.get(name);
+ }
+
+ @Override
+ public IRemoteConnection getConnection(URI uri) {
+ String connName = TCFEclipseFileSystem.getConnectionNameFor(uri);
+ if (connName != null) {
+ return getConnection(connName);
+ }
+ return null;
+ }
+
+ @Override
+ public List<IRemoteConnection> getConnections() {
+ synchronized (fConnections) {
+ return new ArrayList<IRemoteConnection>(fConnections.values());
+ }
+ }
+
+ @Override
+ public IRemoteConnectionWorkingCopy newConnection(String name) throws RemoteConnectionException {
+ throw new RemoteConnectionException(Messages.TCFConnectionManager_errorNoCreateConnection);
+ }
+
+ @Override
+ public void removeConnection(IRemoteConnection conn) {
+ }
+
+ void open(IPeerNode peerNode, IProgressMonitor monitor) throws RemoteConnectionException {
+ final boolean[] done = {false};
+ Callback callback = new Callback() {
+ @Override
+ protected void internalDone(Object caller, IStatus status) {
+ synchronized (done) {
+ done[0] = true;
+ done.notify();
+ }
+ }
+ };
+ synchronized (done) {
+ peerNode.changeConnectState(IConnectable.ACTION_CONNECT, callback, monitor);
+ try {
+ if (!done[0])
+ done.wait();
+ } catch (InterruptedException e) {
+ throw new RemoteConnectionException(e);
+ }
+ }
+ if (peerNode.getConnectState() != IConnectable.STATE_CONNECTED) {
+ IStatus status = callback.getStatus();
+ if (status != null && !status.isOK()) {
+ String msg = status.getMessage();
+ if (msg != null && msg.length() > 0) {
+ throw new RemoteConnectionException(msg, status.getException());
+ }
+ }
+ throw new RemoteConnectionException(Messages.TCFConnectionManager_errorCannotConnect, status != null ? status.getException() : null);
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnectionWorkingCopy.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnectionWorkingCopy.java
new file mode 100644
index 000000000..d7d0819cd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFConnectionWorkingCopy.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.remote.core.IRemoteConnection;
+import org.eclipse.remote.core.IRemoteConnectionChangeListener;
+import org.eclipse.remote.core.IRemoteConnectionWorkingCopy;
+import org.eclipse.remote.core.IRemoteFileManager;
+import org.eclipse.remote.core.IRemoteProcess;
+import org.eclipse.remote.core.IRemoteProcessBuilder;
+import org.eclipse.remote.core.exception.RemoteConnectionException;
+
+public class TCFConnectionWorkingCopy extends TCFConnectionBase implements IRemoteConnectionWorkingCopy {
+
+ private final TCFConnection fConnection;
+
+ public TCFConnectionWorkingCopy(TCFConnection connection) {
+ super(connection.getRemoteServices());
+ fConnection = connection;
+ }
+
+ @Override
+ public IRemoteConnection getOriginal() {
+ return fConnection;
+ }
+ @Override
+ public boolean isDirty() {
+ return false;
+ }
+ @Override
+ public IRemoteConnection save() {
+ return fConnection;
+ }
+ @Override
+ public void setAddress(String address) {
+ }
+
+ @Override
+ public void setAttribute(String key, String value) {
+ }
+
+ @Override
+ public void setName(String name) {
+ }
+
+ @Override
+ public void setPassword(String password) {
+ }
+
+ @Override
+ public void setPort(int port) {
+ }
+
+ @Override
+ public void setUsername(String username) {
+ }
+
+ @Override
+ public void addConnectionChangeListener(IRemoteConnectionChangeListener listener) {
+ fConnection.addConnectionChangeListener(listener);
+ }
+
+ @Override
+ public void close() {
+ fConnection.close();
+ }
+
+ @Override
+ public void fireConnectionChangeEvent(int type) {
+ fConnection.fireConnectionChangeEvent(type);
+ }
+
+ @Override
+ public String getAddress() {
+ return fConnection.getAddress();
+ }
+
+ @Override
+ public Map<String, String> getAttributes() {
+ return fConnection.getAttributes();
+ }
+
+ @Override
+ public IRemoteProcess getCommandShell(int flags) throws IOException {
+ return fConnection.getCommandShell(flags);
+ }
+
+ @Override
+ public Map<String, String> getEnv() {
+ return fConnection.getEnv();
+ }
+
+ @Override
+ public IRemoteFileManager getFileManager() {
+ return fConnection.getFileManager();
+ }
+
+ @Override
+ public String getName() {
+ return fConnection.getName();
+ }
+
+ @Override
+ public int getPort() {
+ return fConnection.getPort();
+ }
+
+ @Override
+ public IRemoteProcessBuilder getProcessBuilder(List<String> command) {
+ return fConnection.getProcessBuilder(command);
+ }
+
+ @Override
+ public IRemoteProcessBuilder getProcessBuilder(String... command) {
+ return fConnection.getProcessBuilder(command);
+ }
+
+ @Override
+ public String getUsername() {
+ return fConnection.getUsername();
+ }
+
+ @Override
+ public IRemoteConnectionWorkingCopy getWorkingCopy() {
+ return this;
+ }
+
+ @Override
+ public boolean isOpen() {
+ return fConnection.isOpen();
+ }
+
+ @Override
+ public void open(IProgressMonitor monitor) throws RemoteConnectionException {
+ fConnection.open(monitor);
+ }
+
+ @Override
+ public void removeConnectionChangeListener(IRemoteConnectionChangeListener listener) {
+ fConnection.removeConnectionChangeListener(listener);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFEclipseFileSystem.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFEclipseFileSystem.java
new file mode 100644
index 000000000..8692d0d8e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFEclipseFileSystem.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.filesystem.provider.FileSystem;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.remote.core.IRemoteConnection;
+import org.eclipse.remote.core.IRemoteServices;
+import org.eclipse.remote.core.RemoteServices;
+
+public class TCFEclipseFileSystem extends FileSystem {
+
+ public static final String SCHEME = "tcf"; //$NON-NLS-1$
+
+ public static String getConnectionNameFor(URI uri) {
+ return uri.getAuthority();
+ }
+
+ public static URI getURIFor(TCFConnection connection, String path) throws URISyntaxException {
+ return new URI(SCHEME, connection.getName(), path, null, null);
+ }
+
+ public static IRemoteConnection getConnection(URI uri) {
+ if (!SCHEME.equals(uri.getScheme()))
+ return null;
+ String peerName = uri.getAuthority();
+ if (peerName == null)
+ return null;
+
+ IRemoteServices trs = RemoteServices.getRemoteServices(TCFRemoteServices.TCF_ID);
+ if (trs == null)
+ return null;
+
+ return trs.getConnectionManager().getConnection(peerName);
+ }
+
+ public TCFEclipseFileSystem() {
+ super();
+ }
+
+ @Override
+ public int attributes() {
+ return EFS.ATTRIBUTE_READ_ONLY | EFS.ATTRIBUTE_EXECUTABLE;
+ }
+
+ @Override
+ public boolean canDelete() {
+ return true;
+ }
+
+ @Override
+ public boolean canWrite() {
+ return true;
+ }
+
+ @Override
+ public IFileStore getStore(IPath path) {
+ return EFS.getNullFileSystem().getStore(path);
+ }
+
+ @Override
+ public IFileStore getStore(URI uri) {
+ return TCFFileStore.getInstance(uri);
+ }
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFFileManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFFileManager.java
new file mode 100644
index 000000000..426415bcb
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFFileManager.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core;
+
+import java.net.URI;
+
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.remote.core.IRemoteFileManager;
+
+public class TCFFileManager implements IRemoteFileManager {
+ private final TCFConnection fConnection;
+
+ public TCFFileManager(TCFConnection connection) {
+ fConnection = connection;
+ }
+
+ @Override
+ public String getDirectorySeparator() {
+ return "/"; //$NON-NLS-1$
+ }
+
+ @Override
+ public IFileStore getResource(String pathStr) {
+ IPath path = new Path(pathStr);
+ if (!path.isAbsolute()) {
+ path = new Path(fConnection.getWorkingDirectory()).append(path);
+ }
+ return TCFFileStore.getInstance(fConnection, path, null);
+ }
+
+ @Override
+ public String toPath(URI uri) {
+ return uri.getPath();
+ }
+
+ @Override
+ public URI toURI(IPath path) {
+ try {
+ return TCFEclipseFileSystem.getURIFor(fConnection, path.toString());
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ @Override
+ public URI toURI(String path) {
+ return toURI(new Path(path));
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFFileStore.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFFileStore.java
new file mode 100644
index 000000000..278ccfd97
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFFileStore.java
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.filesystem.provider.FileInfo;
+import org.eclipse.core.filesystem.provider.FileStore;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.remote.core.IRemoteConnection;
+import org.eclipse.tcf.services.IFileSystem.FileAttrs;
+import org.eclipse.tcf.te.tcf.remote.core.operation.TCFOperationChildStores;
+import org.eclipse.tcf.te.tcf.remote.core.operation.TCFOperationDelete;
+import org.eclipse.tcf.te.tcf.remote.core.operation.TCFOperationFetchInfo;
+import org.eclipse.tcf.te.tcf.remote.core.operation.TCFOperationMkDir;
+import org.eclipse.tcf.te.tcf.remote.core.operation.TCFOperationOpenInputStream;
+import org.eclipse.tcf.te.tcf.remote.core.operation.TCFOperationOpenOutputStream;
+import org.eclipse.tcf.te.tcf.remote.core.operation.TCFOperationPutInfo;
+
+public final class TCFFileStore extends FileStore {
+
+ public static IFileStore getInstance(URI uri) {
+ Path path = new Path(uri.getPath());
+ IRemoteConnection connection = TCFEclipseFileSystem.getConnection(uri);
+ if (connection instanceof TCFConnection)
+ return new TCFFileStore((TCFConnection) connection, path, uri, null);
+
+ return EFS.getNullFileSystem().getStore(path);
+ }
+
+ public static IFileStore getInstance(TCFConnection connection, IPath path, TCFFileStore parent) {
+ try {
+ return new TCFFileStore(connection, path, TCFEclipseFileSystem.getURIFor(connection, path.toString()), parent);
+ } catch (URISyntaxException e) {
+ Activator.logError(Messages.TCFFileManager_errorFileStoreForPath, e);
+ }
+ return EFS.getNullFileSystem().getStore(path);
+ }
+
+ private final URI fURI;
+ private final TCFConnection fConnection;
+ private final IPath fRemotePath;
+ private FileAttrs fAttributes;
+ private IFileStore fParent;
+
+ private TCFFileStore(TCFConnection connection, IPath path, URI uri, TCFFileStore parent) {
+ fURI = uri;
+ fConnection = connection;
+ fRemotePath = new Path(uri.getPath());
+ fParent = parent;
+ }
+
+ @Override
+ public URI toURI() {
+ return fURI;
+ }
+
+ public TCFConnection getConnection() {
+ return fConnection;
+ }
+
+ public IPath getPath() {
+ return fRemotePath;
+ }
+
+ public void setAttributes(FileAttrs attrs) {
+ fAttributes = attrs;
+ }
+
+ public FileAttrs getAttributes() {
+ return fAttributes;
+ }
+
+ @Override
+ public IFileStore getChild(String name) {
+ return getInstance(fConnection, fRemotePath.append(name), this);
+ }
+
+ @Override
+ public String getName() {
+ if (fRemotePath.isRoot()) {
+ return fRemotePath.toString();
+ }
+ return fRemotePath.lastSegment();
+ }
+
+ @Override
+ public IFileStore getParent() {
+ if (fParent != null)
+ return fParent;
+
+ if (fRemotePath.isRoot())
+ return null;
+
+ fParent = getInstance(fConnection, fRemotePath.removeLastSegments(1), null);
+ return fParent;
+ }
+
+ @Override
+ public IFileInfo fetchInfo(int options, IProgressMonitor monitor) throws CoreException {
+ try {
+ return new TCFOperationFetchInfo(this).execute(SubMonitor.convert(monitor));
+ } catch (OperationCanceledException e) {
+ }
+ return new FileInfo(getName());
+ }
+
+ @Override
+ public IFileStore[] childStores(int options, IProgressMonitor monitor) throws CoreException {
+ try {
+ return new TCFOperationChildStores(this).execute(SubMonitor.convert(monitor));
+ } catch (OperationCanceledException e) {
+ }
+ return new IFileStore[0];
+ }
+
+ @Override
+ public String[] childNames(int options, IProgressMonitor monitor) throws CoreException {
+ IFileStore[] children = childStores(options, monitor);
+ String[] result = new String[children.length];
+ int i = 0;
+ for (IFileStore s : children) {
+ result[i++] = s.getName();
+ }
+ return result;
+ }
+
+ @Override
+ public void delete(int options, IProgressMonitor monitor) throws CoreException {
+ try {
+ new TCFOperationDelete(this).execute(SubMonitor.convert(monitor));
+ } catch (OperationCanceledException e) {
+ }
+ }
+
+ @Override
+ public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException {
+ boolean shallow = (options & EFS.SHALLOW) == EFS.SHALLOW;
+ try {
+ new TCFOperationMkDir(this, shallow).execute(SubMonitor.convert(monitor));
+ } catch (OperationCanceledException e) {
+ }
+ return this;
+ }
+
+ @Override
+ public void putInfo(IFileInfo info, int options, IProgressMonitor monitor) throws CoreException {
+ boolean setAttribs = (options & EFS.SET_ATTRIBUTES) != 0;
+ boolean setLastModified = (options & EFS.SET_LAST_MODIFIED) != 0;
+ try {
+ if (setAttribs || setLastModified) {
+ new TCFOperationPutInfo(this, info, setAttribs, setLastModified).execute(SubMonitor.convert(monitor));
+ }
+ } catch (OperationCanceledException e) {
+ }
+ }
+
+ @Override
+ public InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException {
+ try {
+ return new TCFOperationOpenInputStream(this).execute(SubMonitor.convert(monitor));
+ } catch (OperationCanceledException e) {
+ return null;
+ }
+ }
+
+ @Override
+ public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException {
+ boolean append = (options & EFS.APPEND) != 0;
+ try {
+ return new TCFOperationOpenOutputStream(this, append).execute(SubMonitor.convert(monitor));
+ } catch (OperationCanceledException e) {
+ return null;
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFProcess.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFProcess.java
new file mode 100644
index 000000000..8062def71
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFProcess.java
@@ -0,0 +1,183 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PipedInputStream;
+import java.io.PipedOutputStream;
+import java.util.EventObject;
+
+import org.eclipse.remote.core.AbstractRemoteProcess;
+import org.eclipse.tcf.services.IProcesses.ProcessContext;
+import org.eclipse.tcf.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.runtime.interfaces.events.IEventListener;
+import org.eclipse.tcf.te.tcf.processes.core.launcher.ProcessLauncher;
+import org.eclipse.tcf.te.tcf.processes.core.launcher.ProcessStateChangeEvent;
+
+public class TCFProcess extends AbstractRemoteProcess implements IEventListener {
+ private InputStream fStdout;
+ private InputStream fStderr;
+ private OutputStream fStdin;
+
+ private PipedOutputStream fCombinedOutput;
+ private int fReadersDone;
+
+ private final ProcessLauncher fLauncher;
+ private int fExitValue;
+ private boolean fCompleted;
+
+ private class StreamForwarder implements Runnable {
+ private final static int BUF_SIZE = 8192;
+
+ private final InputStream fInput;
+ private final OutputStream fOutput;
+
+ public StreamForwarder(InputStream input, OutputStream output) {
+ fInput = input;
+ fOutput = output;
+ }
+
+ @Override
+ public void run() {
+ int len;
+ byte b[] = new byte[BUF_SIZE];
+ try {
+ while ((len = fInput.read(b)) > 0) {
+ fOutput.write(b, 0, len);
+ }
+ } catch (IOException e) {
+ }
+ onProcReaderDone();
+ }
+ }
+
+ private static class NullInputStream extends InputStream {
+ public NullInputStream() {
+ }
+
+ @Override
+ public int read() throws IOException {
+ return -1;
+ }
+
+ @Override
+ public int available() {
+ return 0;
+ }
+ }
+
+ public TCFProcess(ProcessLauncher launcher) {
+ fLauncher = launcher;
+ EventManager.getInstance().addEventListener(this, ProcessStateChangeEvent.class);
+ }
+
+ public void connectStreams(TCFProcessStreams streams, boolean redirectStderr) throws IOException {
+ if (redirectStderr) {
+ fCombinedOutput = new PipedOutputStream();
+ fStdout = new PipedInputStream(fCombinedOutput);
+ fStderr = null;
+
+ new Thread(new StreamForwarder(streams.getStdout(), fCombinedOutput)).start();
+ new Thread(new StreamForwarder(streams.getStderr(), fCombinedOutput)).start();
+ } else {
+ fStdout = streams.getStdout();
+ fStderr = streams.getStderr();
+ }
+ fStdin = streams.getStdin();
+ }
+
+ protected void onProcReaderDone() {
+ synchronized (this) {
+ if (++fReadersDone == 2) {
+ try {
+ fCombinedOutput.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+ }
+
+ @Override
+ public void destroy() {
+ synchronized(this) {
+ if (fCompleted)
+ return;
+ }
+
+ fLauncher.cancel();
+ fLauncher.terminate();
+ synchronized (this) {
+ if (!fCompleted) {
+ fExitValue = -1;
+ fCompleted = true;
+ notifyAll();
+ }
+ }
+ EventManager.getInstance().removeEventListener(this);
+ }
+
+ @Override
+ public int exitValue() {
+ return fExitValue;
+ }
+
+ @Override
+ public InputStream getErrorStream() {
+ return fStderr != null ? fStderr : new NullInputStream();
+ }
+
+ @Override
+ public InputStream getInputStream() {
+ return fStdout != null ? fStdout : new NullInputStream();
+ }
+
+ @Override
+ public OutputStream getOutputStream() {
+ return fStdin;
+ }
+
+ @Override
+ public int waitFor() throws InterruptedException {
+ synchronized (this) {
+ while (!isCompleted()) {
+ wait();
+ }
+ }
+ return exitValue();
+ }
+
+ @Override
+ public boolean isCompleted() {
+ return fCompleted;
+ }
+
+ @Override
+ public void eventFired(EventObject event) {
+ if (event instanceof ProcessStateChangeEvent) {
+ ProcessStateChangeEvent pscEvent = (ProcessStateChangeEvent) event;
+ if (pscEvent.getEventId().equals(ProcessStateChangeEvent.EVENT_PROCESS_TERMINATED)) {
+ Object source = pscEvent.getSource();
+ if ((source instanceof ProcessContext)) {
+ ProcessContext context = (ProcessContext) fLauncher.getAdapter(ProcessContext.class);
+ if (context != null && ((ProcessContext) source).getID().equals(context.getID())) {
+ synchronized (this) {
+ fExitValue = pscEvent.getExitCode();
+ fCompleted = true;
+ notifyAll();
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFProcessBuilder.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFProcessBuilder.java
new file mode 100644
index 000000000..eb1dac6a0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFProcessBuilder.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core;
+
+import static java.text.MessageFormat.format;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.remote.core.AbstractRemoteProcessBuilder;
+import org.eclipse.remote.core.IRemoteFileManager;
+import org.eclipse.remote.core.IRemoteProcess;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessLauncher;
+import org.eclipse.tcf.te.tcf.processes.core.launcher.ProcessLauncher;
+import org.eclipse.tcf.te.tcf.remote.core.operation.TCFOperationStartProcess;
+
+public class TCFProcessBuilder extends AbstractRemoteProcessBuilder {
+ private final TCFConnection fConnection;
+ private Map<String, String> fEnv;
+
+ public TCFProcessBuilder(TCFConnection connection, List<String> command) {
+ super(command);
+ fConnection = connection;
+ }
+
+ public TCFProcessBuilder(TCFConnection connection, String... command) {
+ this(connection, Arrays.asList(command));
+ }
+
+ @Override
+ public IFileStore directory() {
+ IFileStore dir = super.directory();
+ if (dir == null) {
+ IRemoteFileManager fileMgr = fConnection.getFileManager();
+ if (fileMgr != null) {
+ dir = fileMgr.getResource(fConnection.getWorkingDirectory());
+ directory(dir);
+ }
+ }
+ return dir;
+ }
+
+ @Override
+ public Map<String, String> environment() {
+ if (fEnv == null) {
+ fEnv = new HashMap<String, String>(fConnection.getEnv());
+ }
+ return fEnv;
+ }
+
+ @Override
+ public int getSupportedFlags() {
+ return 0;
+ }
+
+ @Override
+ public IRemoteProcess start(int flags) throws IOException {
+ if (!fConnection.isOpen()) {
+ throw new IOException(format(Messages.TCFProcessBuilder_errorConnectionClosed, fConnection.getName()));
+ }
+ IFileStore dirStore = super.directory();
+ String dir;
+ if (dirStore instanceof TCFFileStore) {
+ dir = ((TCFFileStore) dirStore).getPath().toString();
+ } else {
+ dir = ""; //$NON-NLS-1$
+ }
+
+ List<String> cmd = command();
+ if (cmd.size() < 1)
+ throw new IOException(Messages.TCFProcessBuilder_errorNoCommand);
+
+ String process= cmd.get(0);
+ String[] args= cmd.subList(1, cmd.size()).toArray(new String[cmd.size()-1]);
+
+ IPropertiesContainer launcherProps = new PropertiesContainer();
+ launcherProps.setProperty(IProcessLauncher.PROP_PROCESS_CWD, dir);
+ launcherProps.setProperty(IProcessLauncher.PROP_PROCESS_PATH, process);
+ launcherProps.setProperty(IProcessLauncher.PROP_PROCESS_ARGS, args);
+ launcherProps.setProperty(IChannelManager.FLAG_FORCE_NEW, Boolean.FALSE);
+ launcherProps.setProperty(ProcessLauncher.PROCESS_LAUNCH_FAILED_MESSAGE, format("Failed to launch process {0}" , process)); //$NON-NLS-1$
+
+ TCFProcessStreams streamsProxy = new TCFProcessStreams();
+ ProcessLauncher launcher = new ProcessLauncher(streamsProxy) {
+ @SuppressWarnings("synthetic-access")
+ @Override
+ protected void mergeEnvironment(Map<String,String> processEnv, Map<String,String> processEnvDiff) {
+ if (fEnv != null) {
+ processEnv.clear();
+ processEnv.putAll(fEnv);
+ }
+ }
+ };
+
+ TCFProcess remoteProcess = new TCFProcess(launcher);
+ boolean ok = false;
+ try {
+ new TCFOperationStartProcess(fConnection.getPeerNode().getPeer(),
+ launcher, launcherProps).execute(SubMonitor.convert(null));
+ remoteProcess.connectStreams(streamsProxy, redirectErrorStream());
+ ok = true;
+ return remoteProcess;
+ } catch (OperationCanceledException e) {
+ return null;
+ } catch (CoreException e) {
+ throw new IOException(Messages.TCFProcessBuilder_errorLaunchingProcess, e);
+ } finally {
+ if (!ok)
+ remoteProcess.destroy();
+ }
+ }
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFProcessStreams.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFProcessStreams.java
new file mode 100644
index 000000000..175ceac2e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFProcessStreams.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tcf.te.tcf.remote.core;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessStreamsProxy;
+
+public class TCFProcessStreams implements IProcessStreamsProxy {
+
+ private InputStream fRemoteStderr;
+ private OutputStream fRemoteStdin;
+ private InputStream fRemoteStdout;
+
+ @Override
+ public void connectOutputStreamMonitor(InputStream stream) {
+ fRemoteStdout = stream;
+
+ }
+
+ @Override
+ public void connectInputStreamMonitor(OutputStream stream) {
+ fRemoteStdin = stream;
+ }
+
+ @Override
+ public void connectErrorStreamMonitor(InputStream stream) {
+ fRemoteStderr = stream;
+ }
+
+ @Override
+ public void dispose(ICallback callback) {
+ }
+
+ public InputStream getStdout() {
+ return fRemoteStdout;
+ }
+
+ public InputStream getStderr() {
+ return fRemoteStderr;
+ }
+
+ public OutputStream getStdin() {
+ return fRemoteStdin;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFRemoteServices.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFRemoteServices.java
new file mode 100644
index 000000000..688426dff
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFRemoteServices.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.remote.core.AbstractRemoteServices;
+import org.eclipse.remote.core.IRemoteServicesDescriptor;
+
+public class TCFRemoteServices extends AbstractRemoteServices {
+ public static final String TCF_ID = "org.eclipse.tcf.te.tcf.remote.core.TCFService"; //$NON-NLS-1$
+
+ private final TCFConnectionManager fConnectionManager = new TCFConnectionManager(this);
+
+ public TCFRemoteServices(IRemoteServicesDescriptor descriptor) {
+ super(descriptor);
+ }
+
+ @Override
+ public TCFConnectionManager getConnectionManager() {
+ return fConnectionManager;
+ }
+
+ @Override
+ public boolean initialize(IProgressMonitor monitor) {
+ fConnectionManager.initialize();
+ return true;
+ }
+
+ @Override
+ public int getCapabilities() {
+ return 0;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFServicesFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFServicesFactory.java
new file mode 100644
index 000000000..43a9a3284
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/TCFServicesFactory.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core;
+
+import org.eclipse.remote.core.IRemoteServices;
+import org.eclipse.remote.core.IRemoteServicesDescriptor;
+import org.eclipse.remote.core.IRemoteServicesFactory;
+
+public class TCFServicesFactory implements IRemoteServicesFactory {
+ @Override
+ public IRemoteServices getServices(IRemoteServicesDescriptor descriptor) {
+ return new TCFRemoteServices(descriptor);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/Messages.java
new file mode 100644
index 000000000..c55e6e325
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/Messages.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core.operation;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.remote.core.operation.Messages"; //$NON-NLS-1$
+ public static String PeerInfo_errorCannotOpenChannel;
+ public static String PeerInfo_errorNoFileSystemService;
+ public static String PeerInfo_errorPeerNotConnected;
+ public static String TCFFileStoreOperation_errorNotConnected;
+ public static String TCFOperationGetEnvironment_errorNoChannel;
+ public static String TCFOperationGetEnvironment_errorNoProcessesService;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/Messages.properties
new file mode 100644
index 000000000..31eb8ed01
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/Messages.properties
@@ -0,0 +1,16 @@
+################################################################################
+# Copyright (c) 2014 Wind River Systems, Inc.
+# 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:
+# Markus Schorn - initial API and implementation
+################################################################################
+PeerInfo_errorCannotOpenChannel=Cannot open channel to {0}
+PeerInfo_errorNoFileSystemService=Cannot obtain file system service for {0}
+PeerInfo_errorPeerNotConnected={0} is currently not connected
+TCFFileStoreOperation_errorNotConnected={0} is not connected
+TCFOperationGetEnvironment_errorNoChannel=Cannot obtain shared channel for {0}
+TCFOperationGetEnvironment_errorNoProcessesService=Cannot obtain processes service for {0}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/PeerInfo.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/PeerInfo.java
new file mode 100644
index 000000000..88163b19f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/PeerInfo.java
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tcf.te.tcf.remote.core.operation;
+
+import static java.text.MessageFormat.format;
+import static java.util.Collections.emptyList;
+import static java.util.Collections.singletonList;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IChannel.IChannelListener;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneUser;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.core.interfaces.IConnectable;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
+import org.eclipse.tcf.te.tcf.remote.core.Activator;
+
+public final class PeerInfo implements IChannelListener {
+ private IFileSystem fFileSystem;
+ private boolean fPendingOpen;
+ private List<DoneGetFileSystem> fCallbacks = emptyList();
+ private User fUser;
+
+ public interface DoneGetFileSystem {
+ void done(IFileSystem fileSystem, IStatus status);
+ }
+
+ public void getFileSystem(final IPeerNode peerNode, final DoneGetFileSystem callback) {
+ assert Protocol.isDispatchThread();
+
+ if (peerNode.getConnectState() != IConnectable.STATE_CONNECTED) {
+ callback.done(null, errorStatus(format(Messages.PeerInfo_errorPeerNotConnected, peerNode.getName()), null));
+ } else if (fFileSystem != null) {
+ callback.done(fFileSystem, Status.OK_STATUS);
+ } else {
+ openChannel(peerNode, callback);
+ }
+ }
+
+ public void openChannel(final IPeerNode peerNode, final DoneGetFileSystem callback) {
+ if (fCallbacks.isEmpty()) {
+ fCallbacks = singletonList(callback);
+ } else {
+ if (fCallbacks.size() == 1) {
+ fCallbacks = new ArrayList<DoneGetFileSystem>(fCallbacks);
+ }
+ fCallbacks.add(callback);
+ }
+ if (fPendingOpen)
+ return;
+
+ // Open the channel
+ fPendingOpen = true;
+ final IPeer peer = peerNode.getPeer();
+ Map<String, Boolean> flags = new HashMap<String, Boolean>();
+ flags.put(IChannelManager.FLAG_NO_PATH_MAP, Boolean.TRUE);
+ flags.put(IChannelManager.FLAG_FORCE_NEW, Boolean.TRUE);
+ Tcf.getChannelManager().openChannel(peer, flags, new DoneOpenChannel() {
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void doneOpenChannel(Throwable error, IChannel channel) {
+ fPendingOpen = false;
+ IStatus fsStatus = Status.OK_STATUS;
+ if (error != null) {
+ fsStatus = errorStatus(format(Messages.PeerInfo_errorCannotOpenChannel, peer.getName()), error);
+ } else {
+ channel.addChannelListener(PeerInfo.this);
+ fFileSystem = channel.getRemoteService(IFileSystem.class);
+ if (fFileSystem == null) {
+ fsStatus = errorStatus(format(Messages.PeerInfo_errorNoFileSystemService, peer.getName()), null);
+ }
+ }
+ for (DoneGetFileSystem callback : fCallbacks) {
+ callback.done(fFileSystem, fsStatus);
+ }
+ }
+ });
+ }
+
+ private IStatus errorStatus(String msg, Throwable cause) {
+ return new Status(IStatus.ERROR, Activator.ID, msg, cause);
+ }
+
+ @Override
+ public void congestionLevel(int level) {
+ }
+
+ @Override
+ public void onChannelOpened() {
+ }
+
+ @Override
+ public void onChannelClosed(Throwable error) {
+ // Connection was closed, next time we attempt to open a channel again.
+ fFileSystem = null;
+ fCallbacks = emptyList();
+ }
+
+ public interface DoneGetUser {
+ void done(User user, IStatus status);
+ }
+
+ public final class User {
+ public final int fEffectiveGID;
+ public final int fEffectiveUID;
+
+ User(int effectiveUID, int effectiveGID) {
+ fEffectiveUID = effectiveUID;
+ fEffectiveGID = effectiveGID;
+ }
+ }
+
+ public void getUser(final IFileSystem fs, final DoneGetUser callback) {
+ assert Protocol.isDispatchThread();
+ if (fUser != null) {
+ callback.done(fUser, Status.OK_STATUS);
+ return;
+ }
+ fs.user(new DoneUser() {
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void doneUser(IToken token, FileSystemException error, int realUID, int effectiveUID, int realGID, int effectiveGID, String home) {
+ if (error != null) {
+ callback.done(null, errorStatus(error.getMessage(), error));
+ } else {
+ fUser = new User(effectiveUID, effectiveGID);
+ callback.done(fUser, Status.OK_STATUS);
+ }
+ }
+ });
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFFileStoreOperation.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFFileStoreOperation.java
new file mode 100644
index 000000000..93641907c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFFileStoreOperation.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tcf.te.tcf.remote.core.operation;
+
+import static java.text.MessageFormat.format;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneStat;
+import org.eclipse.tcf.services.IFileSystem.FileAttrs;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
+import org.eclipse.tcf.te.tcf.remote.core.TCFFileStore;
+import org.eclipse.tcf.te.tcf.remote.core.operation.PeerInfo.DoneGetFileSystem;
+import org.eclipse.tcf.te.tcf.remote.core.operation.PeerInfo.DoneGetUser;
+
+public abstract class TCFFileStoreOperation<T> extends TCFOperation<T> {
+ private static final Map<String, PeerInfo> fPeerInfos = new HashMap<String, PeerInfo>();
+
+ private final TCFFileStore fFileStore;
+
+ protected TCFFileStoreOperation(TCFFileStore fileStore) {
+ fFileStore = fileStore;
+ }
+
+ protected final TCFFileStore getFileStore() {
+ return fFileStore;
+ }
+
+ protected final String getPath() {
+ return fFileStore.getPath().toString();
+ }
+
+ protected final IPeerNode getPeerNode() {
+ return fFileStore.getConnection().getPeerNode();
+ }
+
+ private final PeerInfo getPeerInfo(IPeerNode peerNode) {
+ String key = peerNode.getName();
+ PeerInfo result = fPeerInfos.get(key);
+ if (result == null) {
+ result = new PeerInfo();
+ fPeerInfos.put(key, result);
+ }
+ return result;
+ }
+
+ protected final void getFileSystem(DoneGetFileSystem callback) {
+ IPeerNode peerNode = getPeerNode();
+ if (peerNode == null) {
+ setError(createStatus(format(Messages.TCFFileStoreOperation_errorNotConnected, fFileStore.getConnection().getName()), null));
+ } else {
+ getPeerInfo(peerNode).getFileSystem(peerNode, callback);
+ }
+ }
+
+ protected final void getUser(IFileSystem fileSystem, DoneGetUser callback) {
+ IPeerNode peerNode = getPeerNode();
+ if (peerNode == null) {
+ setError(createStatus(format(Messages.TCFFileStoreOperation_errorNotConnected, fFileStore.getConnection().getName()), null));
+ } else {
+ getPeerInfo(peerNode).getUser(fileSystem, callback);
+ }
+ }
+
+ protected final void stat(IFileSystem fileSystem, TCFFileStore fileStore, DoneStat doneStat) {
+ FileAttrs attrs = fileStore.getAttributes();
+ if (attrs != null) {
+ doneStat.doneStat(null, null, attrs);
+ } else {
+ fileSystem.stat(fileStore.getPath().toString(), doneStat);
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperation.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperation.java
new file mode 100644
index 000000000..bfaf8dac6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperation.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core.operation;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.remote.core.Activator;
+
+public abstract class TCFOperation <R> {
+ private IStatus fError;
+ private R fResult;
+ private boolean fDone;
+
+
+ protected final boolean shallAbort(IStatus status) {
+ synchronized (this) {
+ if (fDone)
+ return true;
+ if (!status.isOK()) {
+ setError(status);
+ return true;
+ }
+ return false;
+ }
+ }
+
+ protected final boolean shallAbort(Throwable error) {
+ synchronized (this) {
+ if (fDone)
+ return true;
+ if (error != null) {
+ setError(error);
+ return true;
+ }
+ return false;
+ }
+ }
+
+ protected final void setError(Throwable error) {
+ setError(createStatus(error.getMessage(), error));
+ }
+
+ protected final Status createStatus(String msg, Throwable error) {
+ return new Status(IStatus.ERROR, Activator.ID, msg, error);
+ }
+
+ protected final void setError(IStatus error) {
+ synchronized (this) {
+ fError = error;
+ fDone = true;
+ notifyAll();
+ }
+ }
+
+ protected void setResult(R result) {
+ synchronized (this) {
+ fResult = result;
+ fDone = true;
+ notifyAll();
+ }
+ }
+
+ protected R waitForResult(SubMonitor sm) throws CoreException, InterruptedException, OperationCanceledException {
+ synchronized (this) {
+ while (!fDone) {
+ if (sm.isCanceled()) {
+ fDone = true;
+ throw new OperationCanceledException();
+ }
+ wait(1000);
+ }
+ if (fError != null) {
+ throw new CoreException(fError);
+ }
+ return fResult;
+ }
+ }
+
+ public final R execute(SubMonitor sm) throws CoreException, OperationCanceledException {
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ doExecute();
+ }
+ });
+ try {
+ return waitForResult(sm);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw new OperationCanceledException();
+ }
+ }
+
+ protected abstract void doExecute();
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationChildStores.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationChildStores.java
new file mode 100644
index 000000000..f2caa6342
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationChildStores.java
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core.operation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DirEntry;
+import org.eclipse.tcf.services.IFileSystem.DoneClose;
+import org.eclipse.tcf.services.IFileSystem.DoneOpen;
+import org.eclipse.tcf.services.IFileSystem.DoneReadDir;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.services.IFileSystem.IFileHandle;
+import org.eclipse.tcf.te.tcf.remote.core.TCFFileStore;
+import org.eclipse.tcf.te.tcf.remote.core.operation.PeerInfo.DoneGetFileSystem;
+
+public class TCFOperationChildStores extends TCFFileStoreOperation<IFileStore[]> {
+
+ private final List<IFileStore> fFileStores = new ArrayList<IFileStore>();
+ private IFileSystem fFileSystem;
+ private IFileHandle fFileHandle;
+
+ public TCFOperationChildStores(TCFFileStore filestore) {
+ super(filestore);
+ }
+
+ protected void setResult() {
+ setResult(fFileStores.toArray(new IFileStore[fFileStores.size()]));
+ }
+
+ protected final void setFileSystem(IFileSystem fileSystem) {
+ fFileSystem = fileSystem;
+ }
+
+ protected final void setFileHandle(IFileHandle fileHandle) {
+ fFileHandle = fileHandle;
+ }
+
+ @Override
+ protected IFileStore[] waitForResult(SubMonitor sm) throws CoreException, InterruptedException, OperationCanceledException {
+ return super.waitForResult(sm);
+ }
+
+ @Override
+ protected void doExecute() {
+ getFileSystem(new DoneGetFileSystem() {
+ @Override
+ public void done(final IFileSystem fileSystem, IStatus status) {
+ if (shallAbort(status))
+ return;
+
+ setFileSystem(fileSystem);
+ fileSystem.opendir(getPath(), new DoneOpen() {
+ @Override
+ public void doneOpen(IToken token, FileSystemException error, IFileHandle handle) {
+ if (shallAbort(error))
+ return;
+
+ setFileHandle(handle);
+ readDir();
+ }
+ });
+ }
+ });
+ }
+
+ protected void readDir() {
+ fFileSystem.readdir(fFileHandle, new DoneReadDir() {
+ @Override
+ public void doneReadDir(IToken token, FileSystemException error, DirEntry[] entries, boolean eof) {
+ if (shallAbort(error)) {
+ closeHandle();
+ return;
+ }
+
+ for (DirEntry dirEntry : entries) {
+ createFileStore(dirEntry);
+ }
+ if (eof) {
+ closeHandle();
+ setResult();
+ } else {
+ readDir();
+ }
+ }
+ });
+ }
+
+ protected void createFileStore(DirEntry dirEntry) {
+ IFileStore child = getFileStore().getChild(dirEntry.filename);
+ if (child instanceof TCFFileStore) {
+ ((TCFFileStore) child).setAttributes(dirEntry.attrs);
+ }
+ fFileStores.add(child);
+ }
+
+ protected void closeHandle() {
+ if (fFileSystem != null && fFileHandle != null) {
+ fFileSystem.close(fFileHandle, new DoneClose() {
+ @Override
+ public void doneClose(IToken token, FileSystemException error) {
+ }
+ });
+ fFileSystem = null;
+ fFileHandle = null;
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationDelete.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationDelete.java
new file mode 100644
index 000000000..b5f2617b1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationDelete.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core.operation;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneRemove;
+import org.eclipse.tcf.services.IFileSystem.DoneStat;
+import org.eclipse.tcf.services.IFileSystem.FileAttrs;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.tcf.remote.core.TCFFileStore;
+import org.eclipse.tcf.te.tcf.remote.core.operation.PeerInfo.DoneGetFileSystem;
+
+public final class TCFOperationDelete extends TCFFileStoreOperation<Object> {
+
+ public TCFOperationDelete(TCFFileStore filestore) {
+ super(filestore);
+ }
+
+ @Override
+ protected void doExecute() {
+ getFileSystem(new DoneGetFileSystem() {
+ @Override
+ public void done(final IFileSystem fileSystem, IStatus status) {
+ if (shallAbort(status))
+ return;
+ stat(fileSystem, getFileStore(), new DoneStat() {
+ @Override
+ public void doneStat(IToken token, FileSystemException error, FileAttrs attrs) {
+ if (shallAbort(error))
+ return;
+ DoneRemove callback = new DoneRemove() {
+ @Override
+ public void doneRemove(IToken token, FileSystemException error) {
+ if (shallAbort(error))
+ return;
+ setResult(null);
+ }
+ };
+ getFileStore().setAttributes(null);
+ if (attrs.isDirectory()) {
+ fileSystem.rmdir(getPath(), callback);
+ } else {
+ fileSystem.remove(getPath(), callback);
+ }
+ }
+ });
+ }
+ });
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationFetchInfo.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationFetchInfo.java
new file mode 100644
index 000000000..1817e1f2b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationFetchInfo.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core.operation;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.filesystem.provider.FileInfo;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneStat;
+import org.eclipse.tcf.services.IFileSystem.FileAttrs;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.tcf.remote.core.TCFFileStore;
+import org.eclipse.tcf.te.tcf.remote.core.operation.PeerInfo.DoneGetFileSystem;
+import org.eclipse.tcf.te.tcf.remote.core.operation.PeerInfo.DoneGetUser;
+import org.eclipse.tcf.te.tcf.remote.core.operation.PeerInfo.User;
+
+public final class TCFOperationFetchInfo extends TCFFileStoreOperation<IFileInfo> {
+
+ public TCFOperationFetchInfo(TCFFileStore filestore) {
+ super(filestore);
+ }
+
+ @Override
+ protected void doExecute() {
+ getFileSystem(new DoneGetFileSystem() {
+ @Override
+ public void done(final IFileSystem fileSystem, IStatus status) {
+ if (shallAbort(status))
+ return;
+ getUser(fileSystem, new DoneGetUser() {
+ @Override
+ public void done(final User user, IStatus status) {
+ if (shallAbort(status))
+ return;
+
+ stat(fileSystem, getFileStore(), new DoneStat() {
+ @Override
+ public void doneStat(IToken token, FileSystemException error, FileAttrs attrs) {
+ if (error != null) {
+ if (error.getStatus() == IFileSystem.STATUS_NO_SUCH_FILE) {
+ FileInfo result = new FileInfo(getFileStore().getName());
+ result.setExists(false);
+ setResult(result);
+ } else {
+ setError(error);
+ }
+ } else {
+ getFileStore().setAttributes(attrs);
+ setResult(user, attrs);
+ }
+ }
+ });
+ }
+ });
+ }
+ });
+ }
+
+ protected final void setResult(final User user, FileAttrs attrs) {
+ FileInfo result = new FileInfo(getFileStore().getName());
+ result.setExists(true);
+ int flags= attrs.flags;
+ if ((flags & IFileSystem.ATTR_SIZE) != 0) {
+ result.setLength(attrs.size);
+ }
+ if ((flags & IFileSystem.ATTR_ACMODTIME) != 0) {
+ result.setLastModified(attrs.mtime);
+ }
+ if ((flags & IFileSystem.ATTR_PERMISSIONS) != 0) {
+ int p = attrs.permissions;
+ boolean writable =
+ (attrs.uid == user.fEffectiveUID && (p & IFileSystem.S_IWUSR) != 0) ||
+ (attrs.gid == user.fEffectiveGID && (p & IFileSystem.S_IWGRP) != 0) ||
+ (p & IFileSystem.S_IWOTH) != 0;
+
+ result.setAttribute(EFS.ATTRIBUTE_READ_ONLY, !writable);
+ result.setAttribute(EFS.ATTRIBUTE_OWNER_READ, (p & IFileSystem.S_IRUSR) != 0);
+ result.setAttribute(EFS.ATTRIBUTE_OWNER_WRITE, (p & IFileSystem.S_IWUSR) != 0);
+ result.setAttribute(EFS.ATTRIBUTE_OWNER_EXECUTE, (p & IFileSystem.S_IXUSR) != 0);
+ result.setAttribute(EFS.ATTRIBUTE_GROUP_READ, (p & IFileSystem.S_IRGRP) != 0);
+ result.setAttribute(EFS.ATTRIBUTE_GROUP_WRITE, (p & IFileSystem.S_IWGRP) != 0);
+ result.setAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE, (p & IFileSystem.S_IXGRP) != 0);
+ result.setAttribute(EFS.ATTRIBUTE_OTHER_READ, (p & IFileSystem.S_IROTH) != 0);
+ result.setAttribute(EFS.ATTRIBUTE_OTHER_WRITE, (p & IFileSystem.S_IWOTH) != 0);
+ result.setAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE, (p & IFileSystem.S_IXOTH) != 0);
+ result.setDirectory((p & IFileSystem.S_IFMT) == IFileSystem.S_IFDIR);
+ }
+ setResult(result);
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationGetEnvironment.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationGetEnvironment.java
new file mode 100644
index 000000000..dbad15519
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationGetEnvironment.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core.operation;
+
+import static java.text.MessageFormat.format;
+
+import java.util.Map;
+
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IProcesses;
+import org.eclipse.tcf.services.IProcesses.DoneGetEnvironment;
+import org.eclipse.tcf.services.IProcessesV1;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+
+
+public class TCFOperationGetEnvironment extends TCFOperation<Map<String,String>> {
+
+ private final IPeer fPeer;
+
+ public TCFOperationGetEnvironment(IPeer peer) {
+ fPeer = peer;
+ }
+
+ @Override
+ protected void doExecute() {
+ IChannel channel = Tcf.getChannelManager().getChannel(fPeer);
+ if (channel == null) {
+ setError(createStatus(format(Messages.TCFOperationGetEnvironment_errorNoChannel, fPeer.getName()), null));
+ return;
+ }
+
+ IProcesses psvc = channel.getRemoteService(IProcessesV1.class);
+ if (psvc == null) {
+ psvc = channel.getRemoteService(IProcesses.class);
+ }
+ if (psvc == null) {
+ setError(createStatus(format(Messages.TCFOperationGetEnvironment_errorNoProcessesService, fPeer.getName()), null));
+ return;
+ }
+
+ psvc.getEnvironment(new DoneGetEnvironment() {
+ @Override
+ public void doneGetEnvironment(IToken token, Exception error, Map<String, String> environment) {
+ if (shallAbort(error))
+ return;
+ setResult(environment);
+ }
+ });
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationMkDir.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationMkDir.java
new file mode 100644
index 000000000..c336a2bd9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationMkDir.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.core.operation;
+
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneMkDir;
+import org.eclipse.tcf.services.IFileSystem.DoneStat;
+import org.eclipse.tcf.services.IFileSystem.FileAttrs;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.tcf.remote.core.TCFFileStore;
+import org.eclipse.tcf.te.tcf.remote.core.operation.PeerInfo.DoneGetFileSystem;
+
+public final class TCFOperationMkDir extends TCFFileStoreOperation<Object> {
+
+ protected final boolean fShallow;
+
+ public TCFOperationMkDir(TCFFileStore filestore, boolean shallow) {
+ super(filestore);
+ fShallow = shallow;
+ }
+
+ @Override
+ protected void doExecute() {
+ getFileSystem(new DoneGetFileSystem() {
+ @Override
+ public void done(final IFileSystem fileSystem, IStatus status) {
+ if (shallAbort(status))
+ return;
+
+ DoneMkDir callback = new DoneMkDir() {
+ @Override
+ public void doneMkDir(IToken token, FileSystemException error) {
+ if (shallAbort(error))
+ return;
+ setResult(null);
+ }
+ };
+ mkdir(fileSystem, getFileStore(), callback);
+ }
+ });
+ }
+
+ protected void mkdir(final IFileSystem fs, final TCFFileStore fileStore, final DoneMkDir callback) {
+ stat(fs, fileStore, new DoneStat() {
+ @Override
+ public void doneStat(IToken token, FileSystemException error, FileAttrs attrs) {
+ if (error == null) {
+ fileStore.setAttributes(attrs);
+ }
+ if (error == null && attrs.isDirectory()) {
+ // Directory exists, ok.
+ callback.doneMkDir(token, error);
+ } else if (error != null && error.getStatus() != IFileSystem.STATUS_NO_SUCH_FILE) {
+ // Error and file exists
+ callback.doneMkDir(token, error);
+ } else {
+ // Directory does not exist
+ final IFileStore parent = fShallow ? null : fileStore.getParent();
+ if (parent instanceof TCFFileStore) {
+ mkdir(fs, (TCFFileStore) parent, new DoneMkDir() {
+ @Override
+ public void doneMkDir(IToken token, FileSystemException error) {
+ if (error != null) {
+ callback.doneMkDir(token, error);
+ } else {
+ fs.mkdir(fileStore.getPath().toString(), null, callback);
+ }
+ }
+ });
+ } else {
+ fs.mkdir(fileStore.getPath().toString(), null, callback);
+ }
+ }
+ }
+ });
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationOpenInputStream.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationOpenInputStream.java
new file mode 100644
index 000000000..8452fef87
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationOpenInputStream.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tcf.te.tcf.remote.core.operation;
+
+import java.io.InputStream;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneOpen;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.services.IFileSystem.IFileHandle;
+import org.eclipse.tcf.te.tcf.remote.core.TCFFileStore;
+import org.eclipse.tcf.te.tcf.remote.core.operation.PeerInfo.DoneGetFileSystem;
+import org.eclipse.tcf.util.TCFFileInputStream;
+
+public class TCFOperationOpenInputStream extends TCFFileStoreOperation<InputStream> {
+
+ public TCFOperationOpenInputStream(TCFFileStore filestore) {
+ super(filestore);
+ }
+
+ @Override
+ protected void doExecute() {
+ getFileSystem(new DoneGetFileSystem() {
+ @Override
+ public void done(final IFileSystem fileSystem, IStatus status) {
+ if (shallAbort(status))
+ return;
+
+ fileSystem.open(getPath(), IFileSystem.TCF_O_READ, null, new DoneOpen() {
+ @SuppressWarnings("resource")
+ @Override
+ public void doneOpen(IToken token, FileSystemException error, IFileHandle handle) {
+ if (shallAbort(error))
+ return;
+ setResult(new TCFFileInputStream(handle));
+ }
+ });
+ }
+ });
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationOpenOutputStream.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationOpenOutputStream.java
new file mode 100644
index 000000000..3cd73b767
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationOpenOutputStream.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tcf.te.tcf.remote.core.operation;
+
+import java.io.OutputStream;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneOpen;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.services.IFileSystem.IFileHandle;
+import org.eclipse.tcf.te.tcf.remote.core.TCFFileStore;
+import org.eclipse.tcf.te.tcf.remote.core.operation.PeerInfo.DoneGetFileSystem;
+import org.eclipse.tcf.util.TCFFileOutputStream;
+
+public class TCFOperationOpenOutputStream extends TCFFileStoreOperation<OutputStream> {
+ private final boolean fAppend;
+
+ public TCFOperationOpenOutputStream(TCFFileStore filestore, boolean append) {
+ super(filestore);
+ fAppend = append;
+ }
+
+ public boolean isAppend() {
+ return fAppend;
+ }
+
+ @Override
+ protected void doExecute() {
+ getFileSystem(new DoneGetFileSystem() {
+ @Override
+ public void done(final IFileSystem fileSystem, IStatus status) {
+ if (shallAbort(status))
+ return;
+
+ int flags = IFileSystem.TCF_O_WRITE | IFileSystem.TCF_O_CREAT;
+ flags |= isAppend() ? IFileSystem.TCF_O_APPEND : IFileSystem.TCF_O_TRUNC;
+
+ fileSystem.open(getPath(), flags, null, new DoneOpen() {
+ @SuppressWarnings("resource")
+ @Override
+ public void doneOpen(IToken token, FileSystemException error, IFileHandle handle) {
+ if (shallAbort(error))
+ return;
+ setResult(new TCFFileOutputStream(handle));
+ }
+ });
+ }
+ });
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationPutInfo.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationPutInfo.java
new file mode 100644
index 000000000..8fe082117
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationPutInfo.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tcf.te.tcf.remote.core.operation;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneSetStat;
+import org.eclipse.tcf.services.IFileSystem.DoneStat;
+import org.eclipse.tcf.services.IFileSystem.FileAttrs;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.tcf.remote.core.TCFFileStore;
+import org.eclipse.tcf.te.tcf.remote.core.operation.PeerInfo.DoneGetFileSystem;
+
+public final class TCFOperationPutInfo extends TCFFileStoreOperation<Object> {
+
+ private final boolean fSetAttribs;
+ private final boolean fSetLastModified;
+ private final IFileInfo fFileInfo;
+
+ public TCFOperationPutInfo(TCFFileStore fileStore, IFileInfo info, boolean setAttribs, boolean setLastModified) {
+ super(fileStore);
+ fFileInfo = info;
+ fSetAttribs = setAttribs;
+ fSetLastModified = setLastModified;
+ }
+
+ protected IFileInfo getFileInfo() {
+ return fFileInfo;
+ }
+
+ protected boolean isSetAttribs() {
+ return fSetAttribs;
+ }
+
+ protected boolean isSetLastModified() {
+ return fSetLastModified;
+ }
+
+ @Override
+ protected void doExecute() {
+ getFileSystem(new DoneGetFileSystem() {
+ @Override
+ public void done(final IFileSystem fileSystem, IStatus status) {
+ if (shallAbort(status))
+ return;
+ stat(fileSystem, getFileStore(), new DoneStat() {
+ @Override
+ public void doneStat(IToken token, FileSystemException error, FileAttrs attrs) {
+ if (shallAbort(error))
+ return;
+ int p = attrs.permissions;
+ long mtime = attrs.mtime;
+ IFileInfo i = getFileInfo();
+ if (isSetAttribs()) {
+ boolean ro = i.getAttribute(EFS.ATTRIBUTE_READ_ONLY);
+ p = set(p, IFileSystem.S_IRUSR, i.getAttribute(EFS.ATTRIBUTE_OWNER_READ));
+ p = set(p, IFileSystem.S_IWUSR, !ro && i.getAttribute(EFS.ATTRIBUTE_OWNER_WRITE));
+ p = set(p, IFileSystem.S_IXUSR, i.getAttribute(EFS.ATTRIBUTE_OWNER_EXECUTE));
+ p = set(p, IFileSystem.S_IRGRP, i.getAttribute(EFS.ATTRIBUTE_GROUP_READ));
+ p = set(p, IFileSystem.S_IWGRP, !ro && i.getAttribute(EFS.ATTRIBUTE_GROUP_WRITE));
+ p = set(p, IFileSystem.S_IXGRP, i.getAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE));
+ p = set(p, IFileSystem.S_IROTH, i.getAttribute(EFS.ATTRIBUTE_OTHER_READ));
+ p = set(p, IFileSystem.S_IWOTH, !ro && i.getAttribute(EFS.ATTRIBUTE_OTHER_WRITE));
+ p = set(p, IFileSystem.S_IXOTH, i.getAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE));
+ }
+ if (isSetLastModified()) {
+ mtime = i.getLastModified();
+ }
+
+ getFileStore().setAttributes(null);
+ FileAttrs newAttrs = new FileAttrs(attrs.flags, attrs.size, attrs.uid, attrs.gid,
+ p, attrs.atime, mtime, attrs.attributes);
+ fileSystem.setstat(getPath(), newAttrs, new DoneSetStat() {
+ @Override
+ public void doneSetStat(IToken token, FileSystemException error) {
+ if (shallAbort(error))
+ return;
+ setResult(null);
+ }
+ });
+ }
+
+ private int set(int p, int flag, boolean set) {
+ return set ? p | flag : p & ~flag;
+ }
+ });
+ }
+ });
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationStartProcess.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationStartProcess.java
new file mode 100644
index 000000000..5f0bbdf01
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.core/src/org/eclipse/tcf/te/tcf/remote/core/operation/TCFOperationStartProcess.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tcf.te.tcf.remote.core.operation;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.tcf.processes.core.launcher.ProcessLauncher;
+
+
+public class TCFOperationStartProcess extends TCFOperation<Object> {
+
+ private final ProcessLauncher fLauncher;
+ private final IPeer fPeer;
+ private final IPropertiesContainer fProps;
+
+ public TCFOperationStartProcess(IPeer peer, ProcessLauncher launcher, IPropertiesContainer launcherProps) {
+ fPeer = peer;
+ fLauncher = launcher;
+ fProps = launcherProps;
+ }
+
+ @Override
+ protected void doExecute() {
+ fLauncher.launch(fPeer, fProps, new Callback() {
+ @Override
+ protected void internalDone(Object caller, IStatus status) {
+ if (shallAbort(status))
+ return;
+ TCFOperationStartProcess.this.setResult(null);
+ }
+ });
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.classpath
new file mode 100644
index 000000000..ad32c83a7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.classpath
@@ -0,0 +1,7 @@
+<?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 kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.project
new file mode 100644
index 000000000..732c0a727
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.remote.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/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..242feb7e3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,362 @@
+#Fri Oct 07 16:14:24 CEST 2011
+eclipse.preferences.version=1
+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.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=100
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..88bb9570e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,56 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Target Explorer Java STD
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.settings/org.eclipse.pde.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.settings/org.eclipse.pde.prefs
new file mode 100644
index 000000000..cf80c8bc5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,32 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=1
+compilers.p.missing-version-require-bundle=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..2f68d7ee0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.remote.ui;singleton:=true
+Bundle-Version: 1.3.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.remote.ui.Activator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
+ org.eclipse.remote.ui;bundle-version="1.1.0",
+ org.eclipse.remote.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.remote.core;bundle-version="1.3.0",
+ org.eclipse.swt;bundle-version="3.103.0",
+ org.eclipse.jface;bundle-version="3.10.0",
+ org.eclipse.core.filesystem;bundle-version="1.4.0",
+ org.eclipse.ui.ide;bundle-version="3.10.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.3.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.tcf.remote.ui
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/about.html b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/about.html
new file mode 100644
index 000000000..0f07cf034
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/about.html
@@ -0,0 +1,28 @@
+<!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>May 24, 2012</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/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/build.properties
new file mode 100644
index 000000000..221a2d955
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/build.properties
@@ -0,0 +1,16 @@
+###############################################################################
+# 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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ plugin.xml,\
+ about.html
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/plugin.properties
new file mode 100644
index 000000000..fba51a5a3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/plugin.properties
@@ -0,0 +1,12 @@
+##################################################################################
+# Copyright (c) 2014 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, TCF Remote UI Plug-in
+providerName = Eclipse.org - Target Explorer
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/plugin.xml
new file mode 100644
index 000000000..f2c9ed343
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/plugin.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.remote.ui.remoteUIServices">
+ <remoteUIServices
+ class="org.eclipse.tcf.te.tcf.remote.ui.TCFUIServicesFactory"
+ id="org.eclipse.tcf.te.tcf.remote.core.TCFService"
+ name="TCF">
+ </remoteUIServices>
+ </extension>
+ <extension
+ point="org.eclipse.ui.ide.filesystemSupport">
+ <filesystemContributor
+ class="org.eclipse.tcf.te.tcf.remote.ui.TCFFileSystemContributor"
+ label="TCF"
+ scheme="tcf">
+ </filesystemContributor>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/pom.xml
new file mode 100644
index 000000000..3ba7aa6ee
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.3.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.remote.ui</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/Activator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/Activator.java
new file mode 100644
index 000000000..5c50c86f9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/Activator.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.ui;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ public static final String ID = "org.eclipse.tcf.te.tcf.remote.ui"; //$NON-NLS-1$
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ }
+
+ public static void logError(String msg, Throwable th) {
+ Platform.getLog(Platform.getBundle(ID)).log(new Status(IStatus.ERROR, ID, msg, th));
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/Messages.java
new file mode 100644
index 000000000..5c88d0aab
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/Messages.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.ui.remote.ui.messages"; //$NON-NLS-1$
+ public static String TCFFileSystemContributor_browseFileSystem_title;
+ public static String TCFFileSystemContributor_errorCreateURIForPath;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/Messages.properties
new file mode 100644
index 000000000..c04e2da7a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/Messages.properties
@@ -0,0 +1,12 @@
+################################################################################
+# Copyright (c) 2014 Wind River Systems, Inc.
+# 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:
+# Markus Schorn - initial API and implementation
+################################################################################
+TCFFileSystemContributor_browseFileSystem_title=Browse File System
+TCFFileSystemContributor_errorCreateURIForPath=Cannot create URI for path: {0}, {1}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFFileSystemContributor.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFFileSystemContributor.java
new file mode 100644
index 000000000..83afcb8d8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFFileSystemContributor.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.ui;
+
+import static java.text.MessageFormat.format;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.remote.core.IRemoteConnection;
+import org.eclipse.remote.core.IRemotePreferenceConstants;
+import org.eclipse.remote.core.IRemoteServices;
+import org.eclipse.remote.core.RemoteServices;
+import org.eclipse.remote.ui.IRemoteUIFileManager;
+import org.eclipse.remote.ui.IRemoteUIServices;
+import org.eclipse.remote.ui.RemoteUIServices;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.tcf.remote.core.TCFConnection;
+import org.eclipse.tcf.te.tcf.remote.core.TCFEclipseFileSystem;
+import org.eclipse.tcf.te.tcf.remote.core.TCFRemoteServices;
+import org.eclipse.ui.ide.fileSystem.FileSystemContributor;
+
+public class TCFFileSystemContributor extends FileSystemContributor {
+ private static final String REMOTE_CORE_PLUGIN_ID = "org.eclipse.remote.core"; //$NON-NLS-1$
+
+ @Override
+ public URI browseFileSystem(String initialPath, Shell shell) {
+ IRemoteServices services = RemoteServices.getRemoteServices(TCFRemoteServices.TCF_ID);
+ IRemoteUIServices uiServices = RemoteUIServices.getRemoteUIServices(services);
+ IRemoteUIFileManager uiFileMgr = uiServices.getUIFileManager();
+ uiFileMgr.showConnections(true);
+ String original = setPreferredService(TCFRemoteServices.TCF_ID);
+ try {
+ String path = uiFileMgr.browseDirectory(shell, Messages.TCFFileSystemContributor_browseFileSystem_title, initialPath, 0);
+ if (path != null) {
+ IRemoteConnection conn = uiFileMgr.getConnection();
+ if (conn instanceof TCFConnection) {
+ TCFConnection tcfConn = (TCFConnection) conn;
+ try {
+ return TCFEclipseFileSystem.getURIFor(tcfConn, path);
+ } catch (URISyntaxException e) {
+ Activator.logError(format(Messages.TCFFileSystemContributor_errorCreateURIForPath, conn.getName(), path), e);
+ }
+ }
+ }
+ } finally {
+ setPreferredService(original);
+ }
+ return null;
+ }
+
+ private String setPreferredService(String id) {
+ IEclipsePreferences node = InstanceScope.INSTANCE.getNode(REMOTE_CORE_PLUGIN_ID);
+ String key = IRemotePreferenceConstants.PREF_REMOTE_SERVICES_ID;
+ String old = node.get(key, null);
+ if (id == null) {
+ node.remove(key);
+ } else {
+ node.put(key, id);
+ }
+ return old;
+ }
+
+ @Override
+ public URI getURI(String string) {
+ try {
+ return new URI(string);
+ } catch (URISyntaxException e) {
+ // Ignore
+ }
+ return null;
+ }
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFUIFileManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFUIFileManager.java
new file mode 100644
index 000000000..bba243f09
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFUIFileManager.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2014 IBM Corporation 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:
+ * IBM Corporation - Initial API and implementation
+ * Markus Schorn - Adapted for TCF remote service
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.ui;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.jface.window.Window;
+import org.eclipse.remote.core.IRemoteConnection;
+import org.eclipse.remote.ui.IRemoteUIFileManager;
+import org.eclipse.remote.ui.dialogs.RemoteResourceBrowser;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+
+public class TCFUIFileManager implements IRemoteUIFileManager {
+ private IRemoteConnection fConnection = null;
+ private boolean fShowConnections = false;
+
+ @Override
+ public String browseDirectory(Shell shell, String message, String filterPath, int flags) {
+ RemoteResourceBrowser browser = new RemoteResourceBrowser(shell, SWT.SINGLE);
+ browser.setType(RemoteResourceBrowser.DIRECTORY_BROWSER);
+ browser.setInitialPath(filterPath);
+ browser.setTitle(message);
+ browser.showConnections(fShowConnections);
+ browser.setConnection(fConnection);
+ if (browser.open() == Window.CANCEL) {
+ return null;
+ }
+ fConnection = browser.getConnection();
+ IFileStore resource = browser.getResource();
+ if (resource == null) {
+ return null;
+ }
+ return resource.toURI().getPath();
+ }
+
+ @Override
+ public String browseFile(Shell shell, String message, String filterPath, int flags) {
+ RemoteResourceBrowser browser = new RemoteResourceBrowser(shell, SWT.SINGLE);
+ browser.setType(RemoteResourceBrowser.FILE_BROWSER);
+ browser.setInitialPath(filterPath);
+ browser.setTitle(message);
+ browser.showConnections(fShowConnections);
+ browser.setConnection(fConnection);
+ if (browser.open() == Window.CANCEL) {
+ return null;
+ }
+ fConnection = browser.getConnection();
+ IFileStore resource = browser.getResource();
+ if (resource == null) {
+ return null;
+ }
+ return resource.toURI().getPath();
+ }
+
+ @Override
+ public List<String> browseFiles(Shell shell, String message, String filterPath, int flags) {
+ RemoteResourceBrowser browser = new RemoteResourceBrowser(shell, SWT.MULTI);
+ browser.setType(RemoteResourceBrowser.FILE_BROWSER);
+ browser.setInitialPath(filterPath);
+ browser.setTitle(message);
+ browser.showConnections(fShowConnections);
+ browser.setConnection(fConnection);
+ if (browser.open() == Window.CANCEL) {
+ return null;
+ }
+ fConnection = browser.getConnection();
+ List<String> paths = new ArrayList<String>();
+ for (IFileStore store : browser.getResources()) {
+ paths.add(store.toURI().getPath());
+ }
+ return paths;
+ }
+
+ @Override
+ public IRemoteConnection getConnection() {
+ return fConnection;
+ }
+
+ @Override
+ public void setConnection(IRemoteConnection connection) {
+ this.fConnection = connection;
+ }
+
+ @Override
+ public void showConnections(boolean enable) {
+ fShowConnections = enable;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFUIServices.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFUIServices.java
new file mode 100644
index 000000000..3f5adb57d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFUIServices.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2013 IBM Corporation 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:
+ * IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.ui;
+
+import org.eclipse.remote.core.IRemoteServices;
+import org.eclipse.remote.ui.IRemoteUIConnectionManager;
+import org.eclipse.remote.ui.IRemoteUIFileManager;
+import org.eclipse.remote.ui.IRemoteUIServices;
+import org.eclipse.tcf.te.tcf.remote.core.TCFRemoteServices;
+
+
+public class TCFUIServices implements IRemoteUIServices {
+
+ private TCFRemoteServices fServices;
+
+ public TCFUIServices(IRemoteServices services) {
+ fServices = (TCFRemoteServices) services;
+ }
+
+ @Override
+ public String getId() {
+ return fServices.getId();
+ }
+
+ @Override
+ public String getName() {
+ return fServices.getName();
+ }
+
+ @Override
+ public IRemoteUIConnectionManager getUIConnectionManager() {
+ return null;
+ }
+
+ @Override
+ public IRemoteUIFileManager getUIFileManager() {
+ return new TCFUIFileManager();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFUIServicesFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFUIServicesFactory.java
new file mode 100644
index 000000000..2160797c5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.remote.ui/src/org/eclipse/tcf/te/tcf/remote/ui/TCFUIServicesFactory.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc.
+ * 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:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.remote.ui;
+
+import org.eclipse.remote.core.IRemoteServices;
+import org.eclipse.remote.ui.IRemoteUIServices;
+import org.eclipse.remote.ui.IRemoteUIServicesFactory;
+
+public class TCFUIServicesFactory implements IRemoteUIServicesFactory {
+ @Override
+ public IRemoteUIServices getServices(IRemoteServices services) {
+ return new TCFUIServices(services);
+ }
+}

Back to the top