Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnna Dushistova2012-11-09 03:10:10 -0500
committerUwe Stieber2012-11-09 03:10:10 -0500
commit3a532e8b3b384338bde9f0185a4e39b6818fd2ea (patch)
tree30adc3b5abeeae81565b08f95bba0b9ae757f146
parentd95607ecd8356d62786f7c415c971320a30340b6 (diff)
downloadorg.eclipse.tcf-3a532e8b3b384338bde9f0185a4e39b6818fd2ea.tar.gz
org.eclipse.tcf-3a532e8b3b384338bde9f0185a4e39b6818fd2ea.tar.xz
org.eclipse.tcf-3a532e8b3b384338bde9f0185a4e39b6818fd2ea.zip
Target Explorer: Added "C/C++ Remote Launch over TCF/TE" launch contribution
-rw-r--r--.gitignore169
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.settings/org.eclipse.jdt.core.prefs361
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.settings/org.eclipse.pde.prefs32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/META-INF/MANIFEST.MF40
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/OSGI-INF/l10n/bundle.properties8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/about.html28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/about.ini27
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/about.mappings6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/about.properties25
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/build.properties6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/plugin.xml101
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/activator/Activator.java68
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/controls/TCFPeerSelector.java143
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/interfaces/IRemoteTEConfigurationConstants.java45
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbLaunchDelegate.java208
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java77
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/nls/Messages.java82
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/nls/Messages.properties55
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TECDSFMainTab.java400
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEDSFDebuggerTab.java92
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEDSFGDBDebuggerPage.java176
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/ProcessStreamsProxy.java92
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TEHelper.java320
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TERunProcess.java213
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/te-feature.pngbin0 -> 2423 bytes
29 files changed, 2665 insertions, 164 deletions
diff --git a/.gitignore b/.gitignore
index 1b09d57eb..ae45e2013 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,168 +5,9 @@
# .
workspace
debug-workspace
-artifacts/
-
-# examples/
-examples/org.eclipse.tcf.examples.daytime/bin
-examples/org.eclipse.tcf.examples.presentation/bin
-
-# features/
-features/build-directory
-features/build-workspace
-
-# features/org.eclipse.tcf.cdt.feature/
-features/org.eclipse.tcf.cdt.feature/target
-features/org.eclipse.tcf.cdt.sdk.feature/target
-
-# features/org.eclipse.tcf.core.feature/
-features/org.eclipse.tcf.core.feature/target
-features/org.eclipse.tcf.core.sdk.feature/target
-
-# features/org.eclipse.tcf.feature/
-features/org.eclipse.tcf.feature/target
-features/org.eclipse.tcf.sdk.feature/target
-
-# features/org.eclipse.tcf.repo/
-features/org.eclipse.tcf.repo/target
-
-# features/org.eclipse.tcf.rse.feature/
-features/org.eclipse.tcf.rse.feature/target
-features/org.eclipse.tcf.rse.sdk.feature/target
-
-# plugins/org.eclipse.tcf/
-plugins/org.eclipse.tcf/target
-plugins/org.eclipse.tcf/bin
-# plugins/org.eclipse.tcf.cdt.ui/
-plugins/org.eclipse.tcf.cdt.ui/target
-plugins/org.eclipse.tcf.cdt.ui/bin
-
-# plugins/org.eclipse.tcf.core/
-plugins/org.eclipse.tcf.core/target
-plugins/org.eclipse.tcf.core/bin
-
-# plugins/org.eclipse.tcf.debug/
-plugins/org.eclipse.tcf.debug/target
-plugins/org.eclipse.tcf.debug/bin
-
-# plugins/org.eclipse.tcf.debug.ui/
-plugins/org.eclipse.tcf.debug.ui/target
-plugins/org.eclipse.tcf.debug.ui/bin
-
-# plugins/org.eclipse.tcf.rse/
-plugins/org.eclipse.tcf.rse/target
-plugins/org.eclipse.tcf.rse/bin
-
-# Tests
-tests/plugins/org.eclipse.tcf.debug.test/bin
-
-# Target Explorer
-/target_explorer/coverage/
-/target_explorer/plugins/org.eclipse.tcf.te/target
-/target_explorer/plugins/org.eclipse.tcf.te/bin
-/target_explorer/plugins/org.eclipse.tcf.te.core/target
-/target_explorer/plugins/org.eclipse.tcf.te.core/bin
-/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/target
-/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/bin
-/target_explorer/plugins/org.eclipse.tcf.te.launch.core/target
-/target_explorer/plugins/org.eclipse.tcf.te.launch.core/bin
-/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/target
-/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/bin
-/target_explorer/plugins/org.eclipse.tcf.te.runtime/target
-/target_explorer/plugins/org.eclipse.tcf.te.runtime/bin
-/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/target
-/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/bin
-/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/target
-/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/bin
-/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/target
-/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/bin
-/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/target
-/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/bin
-/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/target
-/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/bin
-/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/target
-/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/target
-/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/bin
-/target_explorer/plugins/org.eclipse.tcf.te.tests/target
-/target_explorer/plugins/org.eclipse.tcf.te.tests/bin
-/target_explorer/plugins/org.eclipse.tcf.te.ui/target
-/target_explorer/plugins/org.eclipse.tcf.te.ui/bin
-/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/target
-/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/bin
-/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/target
-/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/bin
-/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/target
-/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/bin
-/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/target
-/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/bin
-/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/target
-/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/bin
-/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/target
-/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/bin
-/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/target
-/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/bin
-/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/target
-/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/bin
-/target_explorer/plugins/org.eclipse.tcf.te.ui.views/target
-/target_explorer/plugins/org.eclipse.tcf.te.ui.views/bin
-/target_explorer/features/org.eclipse.tcf.te.feature/target
-/target_explorer/features/org.eclipse.tcf.te.feature/bin
-/target_explorer/features/org.eclipse.tcf.te.sdk.feature/target
-/target_explorer/features/org.eclipse.tcf.te.sdk.feature/bin
-/target_explorer/features/org.eclipse.tcf.te.tcf.core.feature/target
-/target_explorer/features/org.eclipse.tcf.te.tcf.core.feature/bin
-/target_explorer/features/org.eclipse.tcf.te.tcf.core.sdk.feature/target
-/target_explorer/features/org.eclipse.tcf.te.tcf.core.sdk.feature/bin
-/target_explorer/features/org.eclipse.tcf.te.tcf.feature/target
-/target_explorer/features/org.eclipse.tcf.te.tcf.feature/bin
-/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/target
-/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/bin
-/target_explorer/features/org.eclipse.tcf.te.terminals.feature/target
-/target_explorer/features/org.eclipse.tcf.te.terminals.feature/bin
-/target_explorer/features/org.eclipse.tcf.te.terminals.sdk.feature/target
-/target_explorer/features/org.eclipse.tcf.te.terminals.sdk.feature/bin
-
-/target_explorer/experimental/plugins/org.eclipse.tcf.te.rcp/target
-/target_explorer/experimental/plugins/org.eclipse.tcf.te.rcp/bin
-/target_explorer/experimental/plugins/org.eclipse.tcf.te.rcp.application/target
-/target_explorer/experimental/plugins/org.eclipse.tcf.te.rcp.application/bin
-/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/target
-/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/bin
-/target_explorer/experimental/features/org.eclipse.tcf.te.rcp.feature/target
-/target_explorer/experimental/features/org.eclipse.tcf.te.rcp.feature/bin
-/target_explorer/experimental/features/org.eclipse.tcf.te.tcf.rcp.feature/target
-/target_explorer/experimental/features/org.eclipse.tcf.te.tcf.rcp.feature/bin
+# Ignored throughout the whole tree
+bin/
+target/
+coverage/
+artifacts/
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.classpath
new file mode 100644
index 000000000..ad32c83a7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.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.launch.cdt/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.project
new file mode 100644
index 000000000..a07a12831
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.launch.cdt</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.launch.cdt/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..ed6c703d1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,361 @@
+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.launch.cdt/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..83a709982
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+formatter_profile=_Target Explorer Java STD
+formatter_settings_version=12
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.settings/org.eclipse.pde.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.settings/org.eclipse.pde.prefs
new file mode 100644
index 000000000..f3edb44fa
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/.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=2
+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.launch.cdt/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..84831ad92
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/META-INF/MANIFEST.MF
@@ -0,0 +1,40 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.launch.cdt;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.launch.cdt.activator.Activator
+Require-Bundle: org.eclipse.cdt.launch;bundle-version="7.1.0",
+ org.eclipse.cdt.debug.mi.core;bundle-version="7.2.0",
+ org.eclipse.cdt.debug.core;bundle-version="7.2.0",
+ org.eclipse.cdt.core;bundle-version="5.4.1",
+ org.eclipse.debug.ui;bundle-version="3.8.1",
+ org.eclipse.ui;bundle-version="3.8.0",
+ org.eclipse.debug.core;bundle-version="3.7.100",
+ org.eclipse.core.runtime;bundle-version="3.8.0",
+ org.eclipse.cdt.debug.mi.ui;bundle-version="6.1.1",
+ org.eclipse.cdt.debug.ui;bundle-version="7.2.0",
+ org.eclipse.cdt.dsf.gdb;bundle-version="4.1.1",
+ org.eclipse.cdt.dsf.gdb.ui;bundle-version="2.3.1",
+ org.eclipse.cdt.dsf;bundle-version="2.3.0",
+ org.eclipse.core.variables;bundle-version="3.2.600",
+ org.eclipse.tcf.te.core;bundle-version="1.1.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.1.0",
+ org.eclipse.tcf.te.tcf.filesystem.ui;bundle-version="1.1.0",
+ org.eclipse.tcf.te.tcf.filesystem.core;bundle-version="1.1.0",
+ org.eclipse.tcf.te.runtime.concurrent;bundle-version="1.1.0",
+ org.eclipse.tcf.core;bundle-version="1.1.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.1.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.1.0",
+ org.eclipse.tcf.te.tcf.processes.core;bundle-version="1.1.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.1.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Vendor: %Vendor-Name
+Export-Package: org.eclipse.tcf.te.tcf.launch.cdt.activator;x-internal:=true,
+ org.eclipse.tcf.te.tcf.launch.cdt.controls,
+ org.eclipse.tcf.te.tcf.launch.cdt.interfaces,
+ org.eclipse.tcf.te.tcf.launch.cdt.launching,
+ org.eclipse.tcf.te.tcf.launch.cdt.nls;x-internal:=true,
+ org.eclipse.tcf.te.tcf.launch.cdt.tabs,
+ org.eclipse.tcf.te.tcf.launch.cdt.utils
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/OSGI-INF/l10n/bundle.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 000000000..381c21348
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,8 @@
+#Properties file for org.eclipse.tcf.te.tcf.launch.cdt
+Bundle-Name = Remote debug and launch over TE/TCF
+Vendor-Name = Eclipse.org - Target Explorer
+
+tedsfLaunchDelegate.name = GDB (DSF) Automatic Remote Debugging via TCF/TE
+tedsfLaunchDelegate.description = Automatically start and debug a new application on a remote system under control of GDB debugger integrated using the Debugger Services Framework (DSF) over TCF/TE.
+terunLaunchDelegate.name = Remote Launching via TCF/TE
+terunLaunchDelegate.description = Automatically start a new application on a remote system over TCF/TE. \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/about.html b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/about.html
new file mode 100644
index 000000000..d2da7a251
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/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>November 9, 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.launch.cdt/about.ini b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/about.ini
new file mode 100644
index 000000000..43c6061e1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=te_feature.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/about.mappings b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/about.mappings
new file mode 100644
index 000000000..bddaab431
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@ \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/about.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/about.properties
new file mode 100644
index 000000000..633488a6f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/about.properties
@@ -0,0 +1,25 @@
+###############################################################################
+# Copyright (c) 2006, 2009 PalmSource, 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:
+# PalmSource - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+#
+# Do not translate any values surrounded by {}
+
+blurb=C/C++ Remote (over TCF/TE) Run/Debug Launcher\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright PalmSource, Inc., Wind River Systems, Inc. and others 2006, 2012. All rights reserved.\n\
+Visit http://wiki.eclipse.org/TCF
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/build.properties
new file mode 100644
index 000000000..948f0bdf0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ OSGI-INF/,\
+ plugin.xml
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/plugin.xml
new file mode 100644
index 000000000..4b8d13aa1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/plugin.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2006, 2012 PalmSource, 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:
+Ewa Matejska (PalmSource) - initial API and implementation
+Martin Oberhuber (Wind River) - fix 158529: Migrate docs to HTML / TOC format
+Anna Dushistova (Mentor Graphics) - [314659] added launch delegate for dsf
+Anna Dushistova (Mentor Graphics) - code restructuring
+Anna Dushistova (MontaVista) - adapted from org.eclipse.cdt.launch.remote
+-->
+<?eclipse version="3.0"?>
+<plugin>
+ <extension point="org.eclipse.debug.core.launchDelegates">
+ <launchDelegate
+ id="org.eclipse.tcf.te.remotecdt.dsf.debug"
+ type="org.eclipse.cdt.launch.remoteApplicationLaunchType"
+ modes="debug"
+ delegate="org.eclipse.tcf.te.tcf.launch.cdt.launching.TEGdbLaunchDelegate"
+ name="%tedsfLaunchDelegate.name"
+ delegateDescription="%tedsfLaunchDelegate.description"
+ sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
+ sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
+ </launchDelegate>
+ <launchDelegate
+ id="org.eclipse.tcf.te.remotecdt.run"
+ type="org.eclipse.cdt.launch.remoteApplicationLaunchType"
+ modes="run"
+ delegate="org.eclipse.tcf.te.tcf.launch.cdt.launching.TERunLaunchDelegate"
+ name="%terunLaunchDelegate.name"
+ delegateDescription="%terunLaunchDelegate.description">
+ </launchDelegate>
+ </extension>
+
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTabs">
+ <tab
+ id="org.eclipse.tcf.te.remotecdt.dsf.gdb.mainTab"
+ group="org.eclipse.cdt.launch.remoteApplicationLaunchTabGroup"
+ name="Main"
+ class="org.eclipse.tcf.te.tcf.launch.cdt.tabs.TECDSFMainTab">
+ <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.dsf.debug"/>
+ </tab>
+ <tab
+ id="org.eclipse.tcf.te.remotecdt.run.mainTab"
+ group="org.eclipse.cdt.launch.remoteApplicationRunLaunchTabGroup"
+ name="Main"
+ class="org.eclipse.tcf.te.tcf.launch.cdt.tabs.TECDSFMainTab">
+ <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.run"/>
+ </tab>
+ <tab id="org.eclipse.tcf.te.remotecdt.dsf.debug.CArgumentsTab"
+ group="org.eclipse.cdt.launch.remoteApplicationLaunchTabGroup"
+ name="Arguments"
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CArgumentsTab">
+ <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.dsf.debug"/>
+ <placement after="org.eclipse.tcf.te.remotecdt.dsf.gdb.mainTab"/>
+ </tab>
+ <tab id="org.eclipse.tcf.te.remotecdt.run.CArgumentsTab"
+ group="org.eclipse.cdt.launch.remoteApplicationRunLaunchTabGroup"
+ name="Arguments"
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CArgumentsTab">
+ <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.run"/>
+ <placement after="org.eclipse.tcf.te.remotecdt.dsf.gdb.mainTab"/>
+ </tab>
+ <tab id="org.eclipse.tcf.te.remotecdt.dsf.debug.RemoteCDSFDebuggerTab"
+ group="org.eclipse.cdt.launch.remoteApplicationLaunchTabGroup"
+ name="Debugger"
+ class="org.eclipse.tcf.te.tcf.launch.cdt.tabs.TEDSFDebuggerTab">
+ <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.dsf.debug"/>
+ <placement after="org.eclipse.cdt.dsf.gdb.launch.argumentsTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.tcf.te.remotecdt.debug.dsf.SourceLookupTab"
+ group="org.eclipse.cdt.launch.remoteApplicationLaunchTabGroup"
+ name="Source"
+ class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab">
+ <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.dsf.debug"/>
+ <placement after="org.eclipse.tcf.te.remotecdt.dsf.debug.TEDSFDebuggerTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.tcf.te.remotecdt.debug.dsf.CommonTab"
+ group="org.eclipse.cdt.launch.remoteApplicationLaunchTabGroup"
+ name="Common"
+ class="org.eclipse.debug.ui.CommonTab">
+ <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.dsf.debug"/>
+ <placement after="org.eclipse.debug.ui.sourceLookupTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.tcf.te.remotecdt.CommonTab"
+ group="org.eclipse.cdt.launch.remoteApplicationRunLaunchTabGroup"
+ name="Common"
+ class="org.eclipse.debug.ui.CommonTab">
+ <associatedDelegate delegate="org.eclipse.tcf.te.remotecdt.run"/>
+ <placement after="org.eclipse.cdt.dsf.gdb.launch.argumentsTab"/>
+ </tab>
+ </extension>
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/pom.xml
new file mode 100644
index 000000000..025defa86
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/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.1.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.1.0-SNAPSHOT</version>
+ <artifactId>org.eclipse.tcf.te.tcf.launch.cdt</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/activator/Activator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/activator/Activator.java
new file mode 100644
index 000000000..3c7eedf45
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/activator/Activator.java
@@ -0,0 +1,68 @@
+package org.eclipse.tcf.te.tcf.launch.cdt.activator;
+
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.cdt.launch.remote.te"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ private boolean isTEInitialized = false;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ public void initializeTE() {
+ if(!isTEInitialized ){
+ IPeerModel[] peers = Model.getModel().getPeers();
+ if (peers.length == 0) {
+ // Sleep shortly
+ try {
+ Thread.sleep(300);
+ } catch (InterruptedException e) {
+ }
+ }
+ isTEInitialized = true;
+ }
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/controls/TCFPeerSelector.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/controls/TCFPeerSelector.java
new file mode 100644
index 000000000..322f61139
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/controls/TCFPeerSelector.java
@@ -0,0 +1,143 @@
+/********************************************************************************
+ * Copyright (c) 2012 MontaVista Software, LLC.
+ * 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:
+ * Anna Dushistova (MontaVista) - initial API and implementation
+ ********************************************************************************/
+package org.eclipse.tcf.te.tcf.launch.cdt.controls;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.tcf.te.tcf.launch.cdt.activator.Activator;
+import org.eclipse.tcf.te.tcf.launch.cdt.nls.Messages;
+import org.eclipse.tcf.te.tcf.launch.cdt.utils.TEHelper;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
+
+public class TCFPeerSelector {
+
+ protected Combo combo;
+ protected Label label;
+ protected IPeerModel[] peers = null;
+
+ private Composite composite;
+
+ public TCFPeerSelector(Composite parent, int style, int numberOfColumns) {
+ composite = new Composite(parent, style);
+ GridLayout layout = new GridLayout(numberOfColumns, false);
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ composite.setLayout(layout);
+
+ label = new Label(composite, SWT.NONE);
+ label.setText(Messages.TCFPeerSelector_0);
+ label.setLayoutData(new GridData(SWT.BEGINNING));
+
+ combo = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
+ combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ refreshCombo();
+
+ }
+
+ public void setEnabled(boolean enabled) {
+ composite.setEnabled(enabled);
+ label.setEnabled(enabled);
+ combo.setEnabled(enabled);
+ }
+
+ public boolean isDisposed() {
+ return composite == null || composite.isDisposed();
+ }
+
+ public void setLayoutData(Object layoutData) {
+ if (composite != null) {
+ composite.setLayoutData(layoutData);
+ }
+ }
+
+ public void addSelectionListener(SelectionListener listener) {
+ combo.addSelectionListener(listener);
+ }
+
+ public void removeSelectionListener(SelectionListener listener) {
+ combo.removeSelectionListener(listener);
+ }
+
+ public void addModifyListener(ModifyListener listener) {
+ combo.addModifyListener(listener);
+ }
+
+ public void removeModifyListener(ModifyListener listener) {
+ combo.removeModifyListener(listener);
+ }
+
+ /**
+ * Get the selected peer.
+ */
+ public IPeerModel getPeer() {
+ final String peerId = getPeerId();
+ return TEHelper.getPeer(peerId);
+ }
+
+ /**
+ * Get the selected peerId.
+ */
+ public String getPeerId() {
+ if (peers != null && !combo.isDisposed()) {
+ int selectionIndex = combo.getSelectionIndex();
+ if (selectionIndex >= 0 && selectionIndex < peers.length) {
+ return combo.getItem(selectionIndex);
+ }
+ }
+ return null;
+ }
+
+ public void updateSelectionFrom(IPeerModel peer) {
+ int newSelectedIndex = -1;
+ String[] peerIds = combo.getItems();
+ for (int i = 0; i < peerIds.length; i++) {
+ if (peerIds[i].equals(peer.getPeerId())) {
+ newSelectedIndex = i;
+ break;
+ }
+ }
+ if (newSelectedIndex >= 0) {
+ combo.select(newSelectedIndex);
+ }
+ }
+
+ public void updateSelectionFrom(String peerId) {
+ int newSelectedIndex = -1;
+ String[] peerIds = combo.getItems();
+ for (int i = 0; i < peerIds.length; i++) {
+ if (peerIds[i].equals(peerId)) {
+ newSelectedIndex = i;
+ break;
+ }
+ }
+ if (newSelectedIndex >= 0) {
+ combo.select(newSelectedIndex);
+ }
+ }
+
+ protected void refreshCombo() {
+ Activator.getDefault().initializeTE();
+ peers = Model.getModel().getPeers();
+ int newSelectedIndex = 0;
+ for (int i = 0; i < peers.length; i++) {
+ combo.add(peers[i].getPeerId());
+ }
+ combo.select(newSelectedIndex);
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/interfaces/IRemoteTEConfigurationConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/interfaces/IRemoteTEConfigurationConstants.java
new file mode 100644
index 000000000..a27b0c6f3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/interfaces/IRemoteTEConfigurationConstants.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2012 PalmSource, 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:
+ * Ewa Matejska (PalmSource) - Adapted from IGDBServerMILaunchConfigurationConstants
+ * Anna Dushistova (MontaVista) - [181517][usability] Specify commands to be run before remote application launch
+ * Anna Dushistova (MontaVista) - cloned from IRemoteConnectionConfigurationConstants
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.launch.cdt.interfaces;
+
+import org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants;
+import org.eclipse.debug.core.DebugPlugin;
+
+public interface IRemoteTEConfigurationConstants extends
+ IGDBServerMILaunchConfigurationConstants {
+
+ public static final String ATTR_REMOTE_CONNECTION = DebugPlugin
+ .getUniqueIdentifier() + ".REMOTE_TCP"; //$NON-NLS-1$
+
+ public static final String ATTR_GDBSERVER_PORT = DebugPlugin
+ .getUniqueIdentifier() + ".ATTR_GDBSERVER_PORT"; //$NON-NLS-1$
+ public static final String ATTR_GDBSERVER_COMMAND = DebugPlugin
+ .getUniqueIdentifier() + ".ATTR_GDBSERVER_COMMAND"; //$NON-NLS-1$
+
+ public static final String ATTR_GDBSERVER_PORT_DEFAULT = "2345"; //$NON-NLS-1$
+ public static final String ATTR_GDBSERVER_COMMAND_DEFAULT = "gdbserver"; //$NON-NLS-1$
+
+ /*
+ * Generic Remote Path and Download options ATTR_REMOTE_PATH: Path of the
+ * binary on the remote. ATTR_SKIP_DOWNLOAD_TO_TARGET: true if download to
+ * remote is not desired.
+ */
+ public static final String ATTR_REMOTE_PATH = DebugPlugin
+ .getUniqueIdentifier() + ".ATTR_TARGET_PATH"; //$NON-NLS-1$
+ public static final String ATTR_SKIP_DOWNLOAD_TO_TARGET = DebugPlugin
+ .getUniqueIdentifier() + ".ATTR_SKIP_DOWNLOAD_TO_TARGET"; //$NON-NLS-1$
+
+ public static final String ATTR_PRERUN_COMMANDS = DebugPlugin
+ .getUniqueIdentifier() + ".ATTR_PRERUN_CMDS"; //$NON-NLS-1$
+
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbLaunchDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbLaunchDelegate.java
new file mode 100644
index 000000000..34a0a9040
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbLaunchDelegate.java
@@ -0,0 +1,208 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2012 Mentor Graphics 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:
+ * Anna Dushistova (Mentor Graphics) - initial API and implementation
+ * Anna Dushistova (Mentor Graphics) - moved to org.eclipse.cdt.launch.remote.launching
+ * Anna Dushistova (MontaVista) - [318051][remote debug] Terminating when "Remote shell" process is selected doesn't work
+ * Anna Dushistova (MontaVista) - [368597][remote debug] if gdbserver fails to launch on target, launch doesn't get terminated
+ * Anna Dushistova (MontaVista) - adapted from RemoteGdbLaunchDelegate
+ *******************************************************************************/
+
+package org.eclipse.tcf.te.tcf.launch.cdt.launching;
+
+import java.util.concurrent.RejectedExecutionException;
+
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
+import org.eclipse.cdt.dsf.concurrent.ImmediateRequestMonitor;
+import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
+import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch;
+import org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.tcf.core.streams.StreamsDataReceiver;
+import org.eclipse.tcf.te.tcf.launch.cdt.activator.Activator;
+import org.eclipse.tcf.te.tcf.launch.cdt.interfaces.IRemoteTEConfigurationConstants;
+import org.eclipse.tcf.te.tcf.launch.cdt.nls.Messages;
+import org.eclipse.tcf.te.tcf.launch.cdt.utils.TEHelper;
+
+public class TEGdbLaunchDelegate extends GdbLaunchDelegate {
+
+ @Override
+ public void launch(ILaunchConfiguration config, String mode,
+ ILaunch launch, IProgressMonitor monitor) throws CoreException {
+ IPath exePath = checkBinaryDetails(config);
+ if (exePath != null) {
+ // -1. Initialize TE
+ Activator.getDefault().initializeTE();
+ // 0. Get the peer from the launch configuration
+ IPeer peer = TEHelper.getCurrentConnection(config).getPeer();
+ // 1.Download binary if needed
+ String remoteExePath = config.getAttribute(
+ IRemoteTEConfigurationConstants.ATTR_REMOTE_PATH, ""); //$NON-NLS-1$
+ monitor.setTaskName(Messages.RemoteRunLaunchDelegate_2);
+ boolean skipDownload = config
+ .getAttribute(
+ IRemoteTEConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET,
+ false);
+
+ if (!skipDownload) {
+ TEHelper.remoteFileTransfer(peer, exePath.toString(),
+ remoteExePath, new SubProgressMonitor(monitor, 80));
+ }
+ // 2.Launch gdbserver on target
+ String gdbserverPortNumber = config
+ .getAttribute(
+ IRemoteTEConfigurationConstants.ATTR_GDBSERVER_PORT,
+ IRemoteTEConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT);
+ String gdbserverCommand = config
+ .getAttribute(
+ IRemoteTEConfigurationConstants.ATTR_GDBSERVER_COMMAND,
+ IRemoteTEConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
+ String commandArguments = ":" + gdbserverPortNumber + " " //$NON-NLS-1$ //$NON-NLS-2$
+ + TEHelper.spaceEscapify(remoteExePath);
+ String arguments = getProgramArguments(config);
+ String prelaunchCmd = config.getAttribute(
+ IRemoteTEConfigurationConstants.ATTR_PRERUN_COMMANDS, ""); //$NON-NLS-1$
+
+ TEHelper.launchCmd(peer, prelaunchCmd, null,
+ new SubProgressMonitor(monitor, 2), new Callback());
+ if (arguments != null && !arguments.equals("")) //$NON-NLS-1$
+ commandArguments += " " + arguments; //$NON-NLS-1$
+ monitor.setTaskName(Messages.RemoteRunLaunchDelegate_9);
+
+ final GdbLaunch l = (GdbLaunch) launch;
+ final Callback callback = new Callback() {
+ @Override
+ protected void internalDone(Object caller, IStatus status) {
+ if (!status.isOK()) {
+ // Need to shutdown the DSF launch session because it is
+ // partially started already.
+ try {
+ l.getSession().getExecutor()
+ .execute(new DsfRunnable() {
+ @Override
+ public void run() {
+ l.shutdownSession(new ImmediateRequestMonitor());
+ }
+ });
+ } catch (RejectedExecutionException e) {
+ // Session disposed.
+ }
+
+ }
+ super.internalDone(caller, status);
+ }
+ };
+
+ // We cannot use a global variable because multiple launches
+ // could access them at the same time. We need a different
+ // variable for each launch, but we also need it be final.
+ // Use a final array to do that.
+ final boolean gdbServerReady[] = new boolean[1];
+ gdbServerReady[0] = false;
+
+ final Object lock = new Object();
+
+ StreamsDataReceiver.Listener listener = new StreamsDataReceiver.Listener() {
+
+ @Override
+ public void dataReceived(String data) {
+ if (data.contains("Listening on port")) { //$NON-NLS-1$
+ synchronized (lock) {
+ gdbServerReady[0] = true;
+ lock.notifyAll();
+ }
+ }
+
+ }
+ };
+
+ TEHelper.launchCmd(peer, gdbserverCommand, commandArguments,
+ listener, new SubProgressMonitor(monitor, 3), callback);
+
+ // Now wait until gdbserver is up and running on the remote host
+ synchronized (lock) {
+ while (gdbServerReady[0] == false) {
+ if (monitor.isCanceled()) {
+ // gdbserver launch failed
+ // Need to shutdown the DSF launch session because it is
+ // partially started already.
+ try {
+ l.getSession().getExecutor()
+ .execute(new DsfRunnable() {
+ @Override
+ public void run() {
+ l.shutdownSession(new ImmediateRequestMonitor());
+ }
+ });
+ } catch (RejectedExecutionException e) {
+ // Session disposed.
+ }
+
+ abort(Messages.RemoteGdbLaunchDelegate_gdbserverFailedToStartErrorMessage,
+ null,
+ ICDTLaunchConfigurationConstants.ERR_DEBUGGER_NOT_INSTALLED);
+ }
+ try {
+ lock.wait(300);
+ } catch (InterruptedException e) {
+ }
+ }
+ }
+
+ // 3. Let debugger know how gdbserver was started on the remote
+ ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
+ wc.setAttribute(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP,
+ true);
+ wc.setAttribute(IGDBLaunchConfigurationConstants.ATTR_HOST,
+ TEHelper.getCurrentConnection(config).getPeer()
+ .getAttributes().get(IPeer.ATTR_IP_HOST));
+ wc.setAttribute(IGDBLaunchConfigurationConstants.ATTR_PORT,
+ gdbserverPortNumber);
+ wc.doSave();
+ try {
+ super.launch(config, mode, launch, monitor);
+ } catch (CoreException ex) {
+ // TODO launch failed, need to kill gdbserver
+
+ // report failure further
+ throw ex;
+ } finally {
+ monitor.done();
+ }
+ }
+ }
+
+ protected String getProgramArguments(ILaunchConfiguration config)
+ throws CoreException {
+ String args = config.getAttribute(
+ ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
+ (String) null);
+ if (args != null) {
+ args = VariablesPlugin.getDefault().getStringVariableManager()
+ .performStringSubstitution(args);
+ }
+ return args;
+ }
+
+ @Override
+ protected String getPluginID() {
+ return Activator.PLUGIN_ID;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java
new file mode 100644
index 000000000..44b4e0c36
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java
@@ -0,0 +1,77 @@
+package org.eclipse.tcf.te.tcf.launch.cdt.launching;
+
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.debug.core.CDebugUtils;
+import org.eclipse.cdt.dsf.gdb.launching.LaunchUtils;
+import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.tcf.launch.cdt.activator.Activator;
+import org.eclipse.tcf.te.tcf.launch.cdt.interfaces.IRemoteTEConfigurationConstants;
+import org.eclipse.tcf.te.tcf.launch.cdt.nls.Messages;
+import org.eclipse.tcf.te.tcf.launch.cdt.utils.TEHelper;
+import org.eclipse.tcf.te.tcf.launch.cdt.utils.TERunProcess;
+
+public class TERunLaunchDelegate extends AbstractCLaunchDelegate {
+
+ @SuppressWarnings("unused")
+ @Override
+ public void launch(ILaunchConfiguration config, String mode,
+ ILaunch launch, IProgressMonitor monitor) throws CoreException {
+ IPath exePath = checkBinaryDetails(config);
+ if (exePath != null) {
+ // -1. Initialize TE
+ Activator.getDefault().initializeTE();
+ // 0. Get the peer from the launch configuration
+ IPeer peer = TEHelper.getCurrentConnection(config).getPeer();
+ // 1.Download binary if needed
+ String remoteExePath = config.getAttribute(
+ IRemoteTEConfigurationConstants.ATTR_REMOTE_PATH, ""); //$NON-NLS-1$
+ monitor.setTaskName(Messages.RemoteRunLaunchDelegate_2);
+ boolean skipDownload = config
+ .getAttribute(
+ IRemoteTEConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET,
+ false);
+
+ if (!skipDownload) {
+ TEHelper.remoteFileTransfer(peer, exePath.toString(),
+ remoteExePath, new SubProgressMonitor(monitor, 80));
+ }
+ // 2. Run the binary
+ monitor.setTaskName(Messages.RemoteRunLaunchDelegate_12);
+ String arguments = getProgramArguments(config);
+ String prelaunchCmd = config.getAttribute(
+ IRemoteTEConfigurationConstants.ATTR_PRERUN_COMMANDS, ""); //$NON-NLS-1$
+
+ TEHelper.launchCmd(peer, prelaunchCmd, null,
+ new SubProgressMonitor(monitor, 2), new Callback());
+ new TERunProcess(launch, remoteExePath, arguments,
+ renderProcessLabel(exePath.toOSString()), peer,
+ new SubProgressMonitor(monitor, 20));
+ }
+
+ }
+
+ protected IPath checkBinaryDetails(final ILaunchConfiguration config)
+ throws CoreException {
+ // First verify we are dealing with a proper project.
+ ICProject project = CDebugUtils.verifyCProject(config);
+ // Now verify we know the program to debug.
+ IPath exePath = LaunchUtils.verifyProgramPath(config, project);
+ // Finally, make sure the program is a proper binary.
+ LaunchUtils.verifyBinary(config, exePath);
+ return exePath;
+ }
+
+ @Override
+ protected String getPluginID() {
+ return Activator.PLUGIN_ID;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/nls/Messages.java
new file mode 100644
index 000000000..0e9f329f6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/nls/Messages.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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:
+ * Martin Oberhuber (Wind River) - initial API and implementation
+ * Ewa Matejska (PalmSource) - [158783] browse button for cdt remote path
+ * Johann Draschwandtner (Wind River) - [231827][remotecdt]Auto-compute default for Remote path
+ * Anna Dushistova (MontaVista) - [244173][remotecdt][nls] Externalize Strings in RemoteRunLaunchDelegate
+ * Anna Dushistova (MontaVista) - [181517][usability] Specify commands to be run before remote application launch
+ * Nikita Shulga (EmbeddedAlley) - [265236][remotecdt] Wait for RSE to initialize before querying it for host list
+ * Anna Dushistova (MontaVista) - [368597][remote debug] if gdbserver fails to launch on target, launch doesn't get terminated
+ * Anna Dushistova (MontaVista) - adapted from org.eclipse.cdt.launch.remote
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.launch.cdt.nls;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.launch.cdt.nls.Messages"; //$NON-NLS-1$
+
+ public static String Gdbserver_name_textfield_label;
+
+ public static String Gdbserver_Settings_Tab_Name;
+
+ public static String Port_number_textfield_label;
+
+ public static String Remote_GDB_Debugger_Options;
+
+ public static String RemoteCMainTab_Prerun;
+
+ public static String RemoteCMainTab_Program;
+
+ public static String RemoteCMainTab_Remote_Path_Browse_Button;
+
+ public static String RemoteCMainTab_Remote_Path_Browse_Button_Title;
+ public static String RemoteCMainTab_SkipDownload;
+ public static String RemoteCMainTab_ErrorNoProgram;
+ public static String RemoteCMainTab_ErrorNoConnection;
+ public static String RemoteCMainTab_Connection;
+ public static String RemoteCMainTab_New;
+ public static String RemoteCMainTab_Properties;
+ public static String RemoteCMainTab_Properties_title;
+ public static String RemoteCMainTab_Properties_Location;
+ public static String RemoteCMainTab_Properties_Skip_default;
+
+ public static String RemoteGdbLaunchDelegate_gdbserverFailedToStartErrorMessage;
+
+ public static String RemoteRunLaunchDelegate_0;
+
+ public static String RemoteRunLaunchDelegate_RemoteShell;
+ public static String RemoteRunLaunchDelegate_1;
+
+ public static String RemoteRunLaunchDelegate_10;
+
+ public static String RemoteRunLaunchDelegate_12;
+
+ public static String RemoteRunLaunchDelegate_13;
+
+ public static String RemoteRunLaunchDelegate_2;
+ public static String RemoteRunLaunchDelegate_3;
+ public static String RemoteRunLaunchDelegate_4;
+ public static String RemoteRunLaunchDelegate_5;
+ public static String RemoteRunLaunchDelegate_6;
+ public static String RemoteRunLaunchDelegate_7;
+ public static String RemoteRunLaunchDelegate_8;
+
+ public static String RemoteRunLaunchDelegate_9;
+
+ public static String TCFPeerSelector_0;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/nls/Messages.properties
new file mode 100644
index 000000000..981e9ede1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/nls/Messages.properties
@@ -0,0 +1,55 @@
+################################################################################
+# Copyright (c) 2006, 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:
+# Martin Oberhuber (Wind River) - externalized strings
+# Ewa Matejska (PalmSource) - [158783] browse button for cdt remote path
+# Johann Draschwandtner (Wind River) - [231827][remotecdt]Auto-compute default for Remote path
+# Anna Dushistova (MontaVista) - [244173][remotecdt][nls] Externalize Strings in RemoteRunLaunchDelegate
+# Anna Dushistova (MontaVista) - [181517][usability] Specify commands to be run before remote application launch
+# Nikita Shulga (EmbeddedAlley) - [265236][remotecdt] Wait for RSE to initialize before querying it for host list
+# Anna Dushistova (MontaVista) - [368597][remote debug] if gdbserver fails to launch on target, launch doesn't get terminated
+# Anna Dushistova (MontaVista) - adapted from org.eclipse.cdt.launch.remote
+################################################################################
+
+# NLS_MESSAGEFORMAT_VAR
+# NLS_ENCODING=UTF-8
+
+RemoteRunLaunchDelegate_0=Launching
+RemoteRunLaunchDelegate_RemoteShell=Remote Shell
+RemoteRunLaunchDelegate_1=Unidentified mode {0} passed to RemoteRunLaunchDelegate
+RemoteRunLaunchDelegate_10=Initializing RSE
+RemoteRunLaunchDelegate_12=Starting Debugger
+RemoteRunLaunchDelegate_13=Could not find the remote connection.
+RemoteRunLaunchDelegate_2=Downloading
+RemoteRunLaunchDelegate_3=Wrong service requested.
+RemoteRunLaunchDelegate_4=No subsystem found.\n
+RemoteRunLaunchDelegate_5=Could not connect to the remote system.
+RemoteRunLaunchDelegate_6=Error during file upload.
+RemoteRunLaunchDelegate_7=Could not create the hostShellProcess.\n
+RemoteRunLaunchDelegate_8=Executing {0} {1}
+RemoteRunLaunchDelegate_9=Starting Program
+
+RemoteCMainTab_Prerun=Commands to execute before application
+RemoteCMainTab_Program=Remote Absolute File Path for C/C++ Application:
+RemoteCMainTab_SkipDownload=Skip download to target path.
+Remote_GDB_Debugger_Options=Remote GDB Debugger Options
+RemoteCMainTab_ErrorNoProgram=Remote executable path is not specified.
+RemoteCMainTab_ErrorNoConnection=Remote Connection must be selected.
+RemoteCMainTab_Remote_Path_Browse_Button=Browse...
+RemoteCMainTab_Connection=Connection:
+RemoteCMainTab_New=New...
+Gdbserver_Settings_Tab_Name=Gdbserver Settings
+Gdbserver_name_textfield_label=Gdbserver name:
+Port_number_textfield_label=Port number:
+RemoteCMainTab_Remote_Path_Browse_Button_Title=Select Remote C/C++ Application File
+RemoteCMainTab_Properties=Properties...
+RemoteCMainTab_Properties_title=Properties
+RemoteCMainTab_Properties_Location=Remote workspace location:
+RemoteCMainTab_Properties_Skip_default=Skip download to target path by default
+RemoteGdbLaunchDelegate_gdbserverFailedToStartErrorMessage=Could not start gdbserver on the remote host. See console output for more details.
+TCFPeerSelector_0=Connection:
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TECDSFMainTab.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TECDSFMainTab.java
new file mode 100644
index 000000000..d6c506b4e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TECDSFMainTab.java
@@ -0,0 +1,400 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2012 PalmSource, 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:
+ * Ewa Matejska (PalmSource) - initial API and implementation
+ * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
+ * Martin Oberhuber (Wind River) - [196934] hide disabled system types in remotecdt combo
+ * Yu-Fen Kuo (MontaVista) - [190613] Fix NPE in Remotecdt when RSEUIPlugin has not been loaded
+ * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
+ * Johann Draschwandtner (Wind River) - [231827][remotecdt]Auto-compute default for Remote path
+ * Johann Draschwandtner (Wind River) - [233057][remotecdt]Fix button enablement
+ * Anna Dushistova (MontaVista) - [181517][usability] Specify commands to be run before remote application launch
+ * Anna Dushistova (MontaVista) - [223728] [remotecdt] connection combo is not populated until RSE is activated
+ * Anna Dushistova (MontaVista) - [267951] [remotecdt] Support systemTypes without files subsystem
+ * Anna Dushistova (Mentor Graphics) - adapted from RemoteCMainTab
+ * Anna Dushistova (Mentor Graphics) - moved to org.eclipse.cdt.launch.remote.tabs
+ * Anna Dushistova (Mentor Graphics) - [318052] [remote launch] Properties are not saved/used
+ * Anna Dushistova (MontaVista) - [375067] [remote] Automated remote launch does not support project-less debug
+ * Anna Dushistova (MontaVista) - adapted from RemoteCDSFMainTab
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.launch.cdt.tabs;
+
+import org.eclipse.cdt.dsf.gdb.internal.ui.launching.CMainTab;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.dialogs.FSOpenFileDialog;
+import org.eclipse.tcf.te.tcf.launch.cdt.controls.TCFPeerSelector;
+import org.eclipse.tcf.te.tcf.launch.cdt.interfaces.IRemoteTEConfigurationConstants;
+import org.eclipse.tcf.te.tcf.launch.cdt.nls.Messages;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+
+@SuppressWarnings("restriction")
+public class TECDSFMainTab extends CMainTab {
+
+ /* Labels and Error Messages */
+ private static final String REMOTE_PROG_LABEL_TEXT = Messages.RemoteCMainTab_Program;
+ private static final String SKIP_DOWNLOAD_BUTTON_TEXT = Messages.RemoteCMainTab_SkipDownload;
+ private static final String REMOTE_PROG_TEXT_ERROR = Messages.RemoteCMainTab_ErrorNoProgram;
+ private static final String CONNECTION_TEXT_ERROR = Messages.RemoteCMainTab_ErrorNoConnection;
+ private static final String PRE_RUN_LABEL_TEXT = Messages.RemoteCMainTab_Prerun;
+
+ /* Defaults */
+ private static final String REMOTE_PATH_DEFAULT = EMPTY_STRING;
+ private static final boolean SKIP_DOWNLOAD_TO_REMOTE_DEFAULT = false;
+
+ protected Button remoteBrowseButton;
+ protected TCFPeerSelector peerSelector;
+ protected Label remoteProgLabel;
+ protected Text remoteProgText;
+ protected Button skipDownloadButton;
+
+ private Text preRunText;
+ private Label preRunLabel;
+
+ public TECDSFMainTab() {
+ super(CMainTab.INCLUDE_BUILD_SETTINGS);
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ Composite comp = (Composite) getControl();
+ /* The TE Connection dropdown */
+ createVerticalSpacer(comp, 1);
+ createRemoteConnectionGroup(comp);
+ /* The remote binary location and skip download option */
+ createVerticalSpacer(comp, 1);
+ createTargetExePathGroup(comp);
+ createDownloadOption(comp);
+
+ /* If the local binary path changes, modify the remote binary location */
+ fProgText.addModifyListener(new ModifyListener() {
+
+ @SuppressWarnings("synthetic-access")
+ @Override
+ public void modifyText(ModifyEvent evt) {
+ setLocalPathForRemotePath();
+ }
+ });
+ }
+
+ /*
+ * isValid
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid
+ */
+ @Override
+ public boolean isValid(ILaunchConfiguration config) {
+ boolean retVal = super.isValid(config);
+ if (retVal == true) {
+ setErrorMessage(null);
+ if (peerSelector.getPeerId() == null) {
+ setErrorMessage(CONNECTION_TEXT_ERROR);
+ retVal = false;
+ }
+ if (retVal) {
+ String name = remoteProgText.getText().trim();
+ if (name.length() == 0) {
+ setErrorMessage(REMOTE_PROG_TEXT_ERROR);
+ retVal = false;
+ }
+ }
+ }
+ return retVal;
+ }
+
+ protected void createRemoteConnectionGroup(Composite parent) {
+ peerSelector = new TCFPeerSelector(parent, SWT.NONE, 2);
+ peerSelector.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ peerSelector.addModifyListener(new ModifyListener() {
+
+ @SuppressWarnings("synthetic-access")
+ @Override
+ public void modifyText(ModifyEvent e) {
+ setDirty(true);
+ updateLaunchConfigurationDialog();
+ }
+ });
+ }
+
+ /*
+ * createTargetExePath This creates the remote path user-editable textfield
+ * on the Main Tab.
+ */
+ protected void createTargetExePathGroup(Composite parent) {
+ Composite mainComp = new Composite(parent, SWT.NONE);
+ GridLayout mainLayout = new GridLayout();
+ mainLayout.numColumns = 2;
+ mainLayout.marginHeight = 0;
+ mainLayout.marginWidth = 0;
+ mainComp.setLayout(mainLayout);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ mainComp.setLayoutData(gd);
+
+ remoteProgLabel = new Label(mainComp, SWT.NONE);
+ remoteProgLabel.setText(REMOTE_PROG_LABEL_TEXT);
+ gd = new GridData();
+ gd.horizontalSpan = 2;
+ remoteProgLabel.setLayoutData(gd);
+
+ remoteProgText = new Text(mainComp, SWT.SINGLE | SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 1;
+ remoteProgText.setLayoutData(gd);
+ remoteProgText.addModifyListener(new ModifyListener() {
+
+ @SuppressWarnings("synthetic-access")
+ @Override
+ public void modifyText(ModifyEvent evt) {
+ updateLaunchConfigurationDialog();
+ }
+ });
+
+ remoteBrowseButton = createPushButton(mainComp,
+ Messages.RemoteCMainTab_Remote_Path_Browse_Button, null);
+ remoteBrowseButton.addSelectionListener(new SelectionAdapter() {
+
+ @SuppressWarnings("synthetic-access")
+ @Override
+ public void widgetSelected(SelectionEvent evt) {
+ handleRemoteBrowseSelected();
+ updateLaunchConfigurationDialog();
+ }
+ });
+
+ // Commands to run before execution
+ preRunLabel = new Label(mainComp, SWT.NONE);
+ preRunLabel.setText(PRE_RUN_LABEL_TEXT);
+ gd = new GridData();
+ gd.horizontalSpan = 2;
+ preRunLabel.setLayoutData(gd);
+
+ preRunText = new Text(mainComp, SWT.MULTI | SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ preRunText.setLayoutData(gd);
+ preRunText.addModifyListener(new ModifyListener() {
+
+ @SuppressWarnings("synthetic-access")
+ @Override
+ public void modifyText(ModifyEvent evt) {
+ updateLaunchConfigurationDialog();
+ }
+ });
+
+ }
+
+ /*
+ * createDownloadOption This creates the skip download check button.
+ */
+ protected void createDownloadOption(Composite parent) {
+ Composite mainComp = new Composite(parent, SWT.NONE);
+ GridLayout mainLayout = new GridLayout();
+ mainLayout.marginHeight = 0;
+ mainLayout.marginWidth = 0;
+ mainComp.setLayout(mainLayout);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ mainComp.setLayoutData(gd);
+
+ skipDownloadButton = createCheckButton(mainComp,
+ SKIP_DOWNLOAD_BUTTON_TEXT);
+ skipDownloadButton.addSelectionListener(new SelectionAdapter() {
+
+ @SuppressWarnings("synthetic-access")
+ @Override
+ public void widgetSelected(SelectionEvent evt) {
+ updateLaunchConfigurationDialog();
+ }
+ });
+ skipDownloadButton.setEnabled(true);
+ }
+
+ protected void handleRemoteBrowseSelected() {
+ IPeerModel connection = peerSelector.getPeer();
+ if (connection != null) {
+ FSOpenFileDialog dialog = new FSOpenFileDialog(getShell());
+ dialog.setInput(connection);
+ if (dialog.open() == Window.OK) {
+ Object candidate = dialog.getFirstResult();
+ if (candidate instanceof FSTreeNode) {
+ String absPath = ((FSTreeNode) candidate).getLocation();
+ if (absPath != null) {
+ remoteProgText.setText(absPath);
+ }
+ }
+ }
+ }
+ }
+
+ protected void updateTargetProgFromConfig(ILaunchConfiguration config) {
+ String targetPath = null;
+ try {
+ targetPath = config.getAttribute(
+ IRemoteTEConfigurationConstants.ATTR_REMOTE_PATH,
+ REMOTE_PATH_DEFAULT);
+ } catch (CoreException e) {
+ // Ignore
+ }
+ remoteProgText.setText(targetPath);
+
+ String prelaunchCmd = null;
+ try {
+ prelaunchCmd = config.getAttribute(
+ IRemoteTEConfigurationConstants.ATTR_PRERUN_COMMANDS, ""); //$NON-NLS-1$
+ } catch (CoreException e) {
+ // Ignore
+ }
+ preRunText.setText(prelaunchCmd);
+ }
+
+ protected void updateSkipDownloadFromConfig(ILaunchConfiguration config) {
+ boolean downloadToTarget = true;
+ try {
+ downloadToTarget = config
+ .getAttribute(
+ IRemoteTEConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET,
+ getDefaultSkipDownload());
+ } catch (CoreException e) {
+ // Ignore for now
+ }
+ skipDownloadButton.setSelection(downloadToTarget);
+ }
+
+ /*
+ * setLocalPathForRemotePath This function sets the remote path text field
+ * with the value of the local executable path.
+ */
+ private void setLocalPathForRemotePath() {
+ String programName = fProgText.getText().trim();
+ boolean bUpdateRemote = false;
+
+ String remoteName = remoteProgText.getText().trim();
+ String remoteWsRoot = getRemoteWSRoot();
+ if (remoteName.length() == 0) {
+ bUpdateRemote = true;
+ } else if (remoteWsRoot.length() != 0) {
+ bUpdateRemote = remoteName.equals(remoteWsRoot);
+ }
+
+ if (programName.length() != 0 && bUpdateRemote) {
+ IPath exePath = new Path(programName);
+ if (!exePath.isAbsolute()) {
+ IProject project = getCProject().getProject();
+ exePath = project.getFile(programName).getLocation();
+
+ IPath wsRoot = project.getWorkspace().getRoot().getLocation();
+ exePath = makeRelativeToWSRootLocation(exePath, remoteWsRoot,
+ wsRoot);
+ }
+ String path = exePath.toString();
+ remoteProgText.setText(path);
+ }
+ }
+
+ private IPath makeRelativeToWSRootLocation(IPath exePath,
+ String remoteWsRoot, IPath wsRoot) {
+ if (remoteWsRoot.length() != 0) {
+ // use remoteWSRoot instead of Workspace Root
+ if (wsRoot.isPrefixOf(exePath)) {
+ return new Path(remoteWsRoot).append(exePath
+ .removeFirstSegments(wsRoot.segmentCount()).setDevice(
+ null));
+ }
+ }
+ return exePath;
+ }
+
+ private String getRemoteWSRoot() {
+ // FIXME
+ return ""; //$NON-NLS-1$
+ }
+
+ private boolean getDefaultSkipDownload() {
+ // FIXME
+ return SKIP_DOWNLOAD_TO_REMOTE_DEFAULT;
+ }
+
+ @Override
+ public void initializeFrom(ILaunchConfiguration config) {
+ String remoteConnection = null;
+ try {
+ remoteConnection = config.getAttribute(
+ IRemoteTEConfigurationConstants.ATTR_REMOTE_CONNECTION, ""); //$NON-NLS-1$
+ } catch (CoreException ce) {
+ // Ignore
+ }
+
+ peerSelector.updateSelectionFrom(remoteConnection);
+ super.initializeFrom(config);
+
+ updateTargetProgFromConfig(config);
+ updateSkipDownloadFromConfig(config);
+ }
+
+ /*
+ * performApply
+ *
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply
+ */
+ @Override
+ public void performApply(ILaunchConfigurationWorkingCopy config) {
+
+ String currentSelection = peerSelector.getPeerId();
+ config.setAttribute(
+ IRemoteTEConfigurationConstants.ATTR_REMOTE_CONNECTION,
+ currentSelection != null ? currentSelection : null);
+ config.setAttribute(IRemoteTEConfigurationConstants.ATTR_REMOTE_PATH,
+ remoteProgText.getText());
+ config.setAttribute(
+ IRemoteTEConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET,
+ skipDownloadButton.getSelection());
+ config.setAttribute(
+ IRemoteTEConfigurationConstants.ATTR_PRERUN_COMMANDS,
+ preRunText.getText());
+ super.performApply(config);
+ }
+
+ @Override
+ public String getId() {
+ return "org.eclipse.tcf.te.remotecdt.dsf.gdb.mainTab"; //$NON-NLS-1$
+ }
+
+ @Override
+ public void setDefaults(ILaunchConfigurationWorkingCopy config) {
+ super.setDefaults(config);
+ config.setAttribute(
+ IRemoteTEConfigurationConstants.ATTR_REMOTE_CONNECTION,
+ EMPTY_STRING);
+ config.setAttribute(IRemoteTEConfigurationConstants.ATTR_REMOTE_PATH,
+ REMOTE_PATH_DEFAULT);
+ config.setAttribute(
+ IRemoteTEConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET,
+ SKIP_DOWNLOAD_TO_REMOTE_DEFAULT);
+ config.setAttribute(
+ IRemoteTEConfigurationConstants.ATTR_PRERUN_COMMANDS,
+ EMPTY_STRING);
+ }
+
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEDSFDebuggerTab.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEDSFDebuggerTab.java
new file mode 100644
index 000000000..7dbddcdf6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEDSFDebuggerTab.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Mentor Graphics 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:
+ * Anna Dushistova (Mentor Graphics) - initial API and implementation
+ * Anna Dushistova (Mentor Graphics) - moved to org.eclipse.cdt.launch.remote.tabs
+ * Anna Dushistova (MontaVista) - adapted from TEDSFDebuggerTab
+ *******************************************************************************/
+
+package org.eclipse.tcf.te.tcf.launch.cdt.tabs;
+
+import org.eclipse.cdt.debug.ui.ICDebuggerPage;
+import org.eclipse.cdt.dsf.gdb.internal.ui.launching.CDebuggerTab;
+import org.eclipse.cdt.dsf.gdb.service.SessionType;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+@SuppressWarnings("restriction")
+public class TEDSFDebuggerTab extends CDebuggerTab {
+
+ private final static String DEFAULTS_SET = "org.eclipse.cdt.launch.remote.te.TEDSFDebuggerTab.DEFAULTS_SET"; //$NON-NLS-1$
+
+ public TEDSFDebuggerTab() {
+ super(SessionType.REMOTE, false);
+ }
+
+ /*
+ * When the launch configuration is created for Run mode, this Debugger tab
+ * is not created because it is not used for Run mode but only for Debug
+ * mode. When we then open the same configuration in Debug mode, the launch
+ * configuration already exists and initializeFrom() is called instead of
+ * setDefaults(). We therefore call setDefaults() ourselves and update the
+ * configuration. If we don't then the user will be required to press Apply
+ * to get the default settings saved. Bug 281970
+ */
+ @Override
+ public void setDefaults(ILaunchConfigurationWorkingCopy config) {
+ config.setAttribute(DEFAULTS_SET, true);
+ super.setDefaults(config);
+ }
+
+ @Override
+ public void initializeFrom(ILaunchConfiguration config) {
+ try {
+ if (config.hasAttribute(DEFAULTS_SET) == false) {
+ ILaunchConfigurationWorkingCopy wc;
+ wc = config.getWorkingCopy();
+ setDefaults(wc);
+ wc.doSave();
+ }
+ } catch (CoreException e) {
+ }
+
+ super.initializeFrom(config);
+ }
+
+ @Override
+ protected void loadDynamicDebugArea() {
+ Composite dynamicTabHolder = getDynamicTabHolder();
+ // Dispose of any current child widgets in the tab holder area
+ Control[] children = dynamicTabHolder.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ children[i].dispose();
+ }
+ setDynamicTab(new TEDSFGDBDebuggerPage());
+
+ ICDebuggerPage debuggerPage = getDynamicTab();
+ if (debuggerPage == null) {
+ return;
+ }
+ // Ask the dynamic UI to create its Control
+ debuggerPage
+ .setLaunchConfigurationDialog(getLaunchConfigurationDialog());
+ debuggerPage.createControl(dynamicTabHolder);
+ debuggerPage.getControl().setVisible(true);
+ dynamicTabHolder.layout(true);
+ contentsChanged();
+ }
+
+ @Override
+ public String getId() {
+ return "org.eclipse.tcf.te.remotecdt.dsf.debug.TEDSFDebuggerTab"; //$NON-NLS-1$
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEDSFGDBDebuggerPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEDSFGDBDebuggerPage.java
new file mode 100644
index 000000000..9cd90dd7b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/tabs/TEDSFGDBDebuggerPage.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2012 PalmSource, 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:
+ * Ewa Matejska (PalmSource)
+ *
+ * Referenced GDBDebuggerPage code to write this.
+ * Anna Dushistova (Mentor Graphics) - adapted from RemoteGDBDebuggerPage
+ * Anna Dushistova (Mentor Graphics) - moved to org.eclipse.cdt.launch.remote.tabs
+ * Anna Dushistova (MontaVista) - adapted from TEDSFGDBDebuggerPage
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.launch.cdt.tabs;
+
+import org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbDebuggerPage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.tcf.te.tcf.launch.cdt.interfaces.IRemoteTEConfigurationConstants;
+import org.eclipse.tcf.te.tcf.launch.cdt.nls.Messages;
+
+@SuppressWarnings("restriction")
+public class TEDSFGDBDebuggerPage extends GdbDebuggerPage {
+
+ protected Text fGDBServerCommandText;
+
+ protected Text fGDBServerPortNumberText;
+
+ private boolean fIsInitializing = false;
+
+ public TEDSFGDBDebuggerPage() {
+ super();
+ }
+
+ @Override
+ public String getName() {
+ return Messages.Remote_GDB_Debugger_Options;
+ }
+
+ @Override
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ super.setDefaults(configuration);
+ configuration.setAttribute(
+ IRemoteTEConfigurationConstants.ATTR_GDBSERVER_COMMAND,
+ IRemoteTEConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
+ configuration.setAttribute(
+ IRemoteTEConfigurationConstants.ATTR_GDBSERVER_PORT,
+ IRemoteTEConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT);
+ }
+
+ @Override
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ setInitializing(true);
+ super.initializeFrom(configuration);
+
+ String gdbserverCommand = null;
+ String gdbserverPortNumber = null;
+ try {
+ gdbserverCommand = configuration
+ .getAttribute(
+ IRemoteTEConfigurationConstants.ATTR_GDBSERVER_COMMAND,
+ IRemoteTEConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
+ } catch (CoreException e) {
+ }
+ try {
+ gdbserverPortNumber = configuration
+ .getAttribute(
+ IRemoteTEConfigurationConstants.ATTR_GDBSERVER_PORT,
+ IRemoteTEConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT);
+ } catch (CoreException e) {
+ }
+ fGDBServerCommandText.setText(gdbserverCommand);
+ fGDBServerPortNumberText.setText(gdbserverPortNumber);
+ setInitializing(false);
+ }
+
+ @Override
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ super.performApply(configuration);
+ String str = fGDBServerCommandText.getText();
+ str.trim();
+ configuration.setAttribute(
+ IRemoteTEConfigurationConstants.ATTR_GDBSERVER_COMMAND, str);
+ str = fGDBServerPortNumberText.getText();
+ str.trim();
+ configuration.setAttribute(
+ IRemoteTEConfigurationConstants.ATTR_GDBSERVER_PORT, str);
+ }
+
+ protected void createGdbserverSettingsTab(TabFolder tabFolder) {
+ TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
+ tabItem.setText(Messages.Gdbserver_Settings_Tab_Name);
+
+ Composite comp = new Composite(tabFolder, SWT.NULL);
+ comp.setLayout(new GridLayout(1, true));
+ comp.setLayoutData(new GridData(GridData.FILL_BOTH));
+ ((GridLayout) comp.getLayout()).makeColumnsEqualWidth = false;
+ comp.setFont(tabFolder.getFont());
+ tabItem.setControl(comp);
+
+ Composite subComp = new Composite(comp, SWT.NULL);
+ subComp.setLayout(new GridLayout(2, true));
+ subComp.setLayoutData(new GridData(GridData.FILL_BOTH));
+ ((GridLayout) subComp.getLayout()).makeColumnsEqualWidth = false;
+ subComp.setFont(tabFolder.getFont());
+
+ Label label = new Label(subComp, SWT.LEFT);
+ label.setText(Messages.Gdbserver_name_textfield_label);
+ GridData gd = new GridData();
+ label.setLayoutData(gd);
+
+ fGDBServerCommandText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
+ GridData data = new GridData();
+ fGDBServerCommandText.setLayoutData(data);
+ fGDBServerCommandText.addModifyListener(new ModifyListener() {
+
+ @SuppressWarnings("synthetic-access")
+ @Override
+ public void modifyText(ModifyEvent evt) {
+ updateLaunchConfigurationDialog();
+ }
+ });
+ label = new Label(subComp, SWT.LEFT);
+ label.setText(Messages.Port_number_textfield_label);
+ gd = new GridData();
+ label.setLayoutData(gd);
+
+ fGDBServerPortNumberText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
+ data = new GridData();
+ fGDBServerPortNumberText.setLayoutData(data);
+ fGDBServerPortNumberText.addModifyListener(new ModifyListener() {
+
+ @SuppressWarnings("synthetic-access")
+ @Override
+ public void modifyText(ModifyEvent evt) {
+ updateLaunchConfigurationDialog();
+ }
+ });
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.cdt.debug.mi.internal.ui.GDBDebuggerPage#createTabs(org.eclipse
+ * .swt.widgets.TabFolder)
+ */
+ @Override
+ public void createTabs(TabFolder tabFolder) {
+ super.createTabs(tabFolder);
+ createGdbserverSettingsTab(tabFolder);
+ }
+
+ @Override
+ protected boolean isInitializing() {
+ return fIsInitializing;
+ }
+
+ private void setInitializing(boolean isInitializing) {
+ fIsInitializing = isInitializing;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/ProcessStreamsProxy.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/ProcessStreamsProxy.java
new file mode 100644
index 000000000..ddb6d4cfe
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/ProcessStreamsProxy.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.launch.cdt.utils;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.eclipse.core.runtime.Status;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.processes.ProcessOutputReaderThread;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessStreamsProxy;
+
+/**
+ * Process streams proxy implementation.
+ */
+public class ProcessStreamsProxy implements IProcessStreamsProxy {
+ public InputStream remoteStdout;
+ private InputStream remoteStderr;
+
+ private ProcessOutputReaderThread reader;
+ private OutputStream remoteStdin;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessStreamsProxy#connectOutputStreamMonitor(java.io.InputStream)
+ */
+ @Override
+ public void connectOutputStreamMonitor(InputStream stream) {
+ // Remember the stream only. Wait for connectErrorStreamMonitor(...)
+ // to attach the reader.
+ remoteStdout = stream;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessStreamsProxy#connectInputStreamMonitor(java.io.OutputStream)
+ */
+ @Override
+ public void connectInputStreamMonitor(OutputStream stream) {
+ // Ignore -> nothing to send to the remote process
+ remoteStdin = stream;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessStreamsProxy#connectErrorStreamMonitor(java.io.InputStream)
+ */
+ @Override
+ public void connectErrorStreamMonitor(InputStream stream) {
+ remoteStderr = stream;
+
+ reader = new ProcessOutputReaderThread(
+ ProcessStreamsProxy.class.getSimpleName(), new InputStream[] {
+ remoteStdout, remoteStderr });
+ reader.start();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessStreamsProxy#dispose(org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
+ */
+ @Override
+ public void dispose(ICallback callback) {
+ // The reader closes with the stream -> nothing to do here
+ // Close stdin
+ try {
+ if (remoteStdin != null)
+ remoteStdin.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ // If a callback is passed in, it needs to be invoked in any case
+ if (callback != null)
+ callback.done(this, Status.OK_STATUS);
+ }
+
+ /**
+ * Returns the process output reader.
+ *
+ * @return The process output reader or <code>null</code>.
+ */
+ public ProcessOutputReaderThread getOutputReader() {
+ return reader;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TEHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TEHelper.java
new file mode 100644
index 000000000..591a1f6c2
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TEHelper.java
@@ -0,0 +1,320 @@
+/*******************************************************************************
+ * 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
+ * Anna Dushistova (MontaVista)- adapted from org.eclipse.tcf.te.tcf.launch.core.steps.LaunchProcessStep
+ *******************************************************************************/
+
+package org.eclipse.tcf.te.tcf.launch.cdt.utils;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.core.utils.text.StringUtil;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.concurrent.util.ExecutorsUtil;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.processes.ProcessOutputReaderThread;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.filetransfer.FileTransferItem;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ILineSeparatorConstants;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
+import org.eclipse.tcf.te.runtime.services.interfaces.filetransfer.IFileTransferItem;
+import org.eclipse.tcf.te.runtime.utils.Host;
+import org.eclipse.tcf.te.runtime.utils.net.IPAddressUtil;
+import org.eclipse.tcf.te.tcf.core.interfaces.ITransportTypes;
+import org.eclipse.tcf.te.tcf.core.streams.StreamsDataReceiver;
+import org.eclipse.tcf.te.tcf.core.streams.StreamsDataReceiver.Listener;
+import org.eclipse.tcf.te.tcf.filesystem.core.services.FileTransferService;
+import org.eclipse.tcf.te.tcf.launch.cdt.activator.Activator;
+import org.eclipse.tcf.te.tcf.launch.cdt.interfaces.IRemoteTEConfigurationConstants;
+import org.eclipse.tcf.te.tcf.launch.cdt.nls.Messages;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessLauncher;
+import org.eclipse.tcf.te.tcf.processes.core.launcher.ProcessLauncher;
+
+public class TEHelper {
+
+ public static void remoteFileTransfer(IPeer peer, String localFilePath,
+ String remoteFilePath, SubProgressMonitor monitor) {
+ monitor.beginTask(Messages.RemoteRunLaunchDelegate_2 + " " //$NON-NLS-1$
+ + localFilePath + " to " + remoteFilePath, 100); //$NON-NLS-1$
+ FileTransferItem item = new FileTransferItem(new Path(localFilePath),
+ new Path(remoteFilePath));
+ item.setProperty(IFileTransferItem.PROPERTY_DIRECTION,
+ IFileTransferItem.HOST_TO_TARGET);
+ final Callback callback = new Callback();
+ FileTransferService.transfer(peer, null, item, monitor, callback);
+ // Wait till the step finished, an execution occurred or the
+ // user hit cancel on the progress monitor.
+ ExecutorsUtil.waitAndExecute(0, callback.getDoneConditionTester(null));
+ }
+
+ public static IPeerModel getPeer(final String peerId) {
+ if (peerId != null) {
+ final AtomicReference<IPeerModel> parent = new AtomicReference<IPeerModel>();
+ final Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ parent.set(Model.getModel()
+ .getService(ILocatorModelLookupService.class)
+ .lkupPeerModelById(peerId));
+ }
+ };
+ Protocol.invokeAndWait(runnable);
+ return parent.get();
+ }
+ return null;
+ }
+
+ public static IPeerModel getCurrentConnection(ILaunchConfiguration config)
+ throws CoreException {
+ String peerId = config.getAttribute(
+ IRemoteTEConfigurationConstants.ATTR_REMOTE_CONNECTION, ""); //$NON-NLS-1$
+ IPeerModel connection = getPeer(peerId);
+ if (connection == null) {
+ abort(Messages.RemoteRunLaunchDelegate_13, null,
+ ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+ }
+ return connection;
+ }
+
+ public static ProcessLauncher launchCmd(final IPeer peer, String command,
+ Listener listener, SubProgressMonitor monitor, ICallback callback)
+ throws CoreException {
+ if (command != null && !command.trim().equals("")) { //$NON-NLS-1$
+ String[] args = StringUtil.tokenize(command, 0, true);
+ if (args.length > 0) {
+ String cmd = args[0];
+ String[] arguments = null;
+ if (args.length > 1) {
+ arguments = Arrays.copyOfRange(args, 1, args.length);
+ }
+ return launchCmd(peer, cmd, arguments, listener, monitor,
+ callback);
+ }
+ }
+ return null;
+ }
+
+ public static ProcessLauncher launchCmd(final IPeer peer,
+ String remoteCommandPath, String arguments, Listener listener,
+ SubProgressMonitor monitor, ICallback callback)
+ throws CoreException {
+ String[] args = arguments != null && !"".equals(arguments.trim()) ? StringUtil.tokenize(arguments, 0, true) : null; //$NON-NLS-1$
+ return launchCmd(peer, remoteCommandPath, args, listener, monitor,
+ callback);
+ }
+
+ public static ProcessLauncher launchCmd(final IPeer peer,
+ String remoteCommandPath, String[] args, Listener listener,
+ SubProgressMonitor monitor, ICallback callback)
+ throws CoreException {
+ if (remoteCommandPath != null && !remoteCommandPath.trim().equals("")) { //$NON-NLS-1$
+ monitor.beginTask(NLS.bind(Messages.RemoteRunLaunchDelegate_8,
+ remoteCommandPath, args), 10);
+
+ // Construct the launcher object
+ ProcessLauncher launcher = new ProcessLauncher();
+
+ Map<String, Object> launchAttributes = new HashMap<String, Object>();
+
+ launchAttributes.put(IProcessLauncher.PROP_PROCESS_PATH,
+ spaceEscapify(remoteCommandPath));
+ launchAttributes.put(IProcessLauncher.PROP_PROCESS_ARGS, args);
+
+ launchAttributes.put(ITerminalsConnectorConstants.PROP_LOCAL_ECHO,
+ Boolean.FALSE);
+
+ boolean outputConsole = true;
+ if (outputConsole) {
+ launchAttributes.put(
+ IProcessLauncher.PROP_PROCESS_ASSOCIATE_CONSOLE,
+ Boolean.TRUE);
+ }
+
+ // Fill in the launch attributes
+ IPropertiesContainer container = new PropertiesContainer();
+ container.setProperties(launchAttributes);
+
+ // If the line separator setting is not set explicitly, try to
+ // determine
+ // it automatically (local host only).
+ if (container
+ .getProperty(ITerminalsConnectorConstants.PROP_LINE_SEPARATOR) == null) {
+ // Determine if the launch is on local host. If yes, we can
+ // preset
+ // the
+ // line ending character.
+ final AtomicBoolean isLocalhost = new AtomicBoolean();
+
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ if (ITransportTypes.TRANSPORT_TYPE_TCP.equals(peer
+ .getTransportName())
+ || ITransportTypes.TRANSPORT_TYPE_SSL
+ .equals(peer.getTransportName())) {
+ isLocalhost.set(IPAddressUtil.getInstance()
+ .isLocalHost(
+ peer.getAttributes().get(
+ IPeer.ATTR_IP_HOST)));
+ }
+ }
+ };
+
+ if (Protocol.isDispatchThread())
+ runnable.run();
+ else
+ Protocol.invokeAndWait(runnable);
+
+ if (isLocalhost.get()) {
+ container
+ .setProperty(
+ ITerminalsConnectorConstants.PROP_LINE_SEPARATOR,
+ Host.isWindowsHost() ? ILineSeparatorConstants.LINE_SEPARATOR_CRLF
+ : ILineSeparatorConstants.LINE_SEPARATOR_LF);
+ }
+ }
+
+ if (listener != null) {
+ container.setProperty(
+ IProcessLauncher.PROP_PROCESS_OUTPUT_LISTENER,
+ new StreamsDataReceiver.Listener[] { listener });
+ }
+ // Launch the process
+ launcher.launch(peer, container, new Callback(callback) {
+ @Override
+ protected void internalDone(Object caller, IStatus status) {
+ if (!status.isOK()) {
+ System.out.println(status.getMessage());
+ }
+ super.internalDone(caller, status);
+ }
+ });
+ monitor.done();
+ return launcher;
+ }
+ return null;
+ }
+
+ public static String launchCmdReadOutput(final IPeer peer,
+ String remoteCommandPath, String[] args,
+ final SubProgressMonitor monitor, ICallback callback)
+ throws CoreException {
+ String output = null;
+ if (remoteCommandPath != null && !remoteCommandPath.trim().equals("")) { //$NON-NLS-1$
+ monitor.beginTask(NLS.bind(Messages.RemoteRunLaunchDelegate_8,
+ remoteCommandPath, args), 10);
+
+ // Construct the launcher object
+ final ProcessStreamsProxy proxy = new ProcessStreamsProxy();
+ ProcessLauncher launcher = new ProcessLauncher(proxy);
+
+ Map<String, Object> launchAttributes = new HashMap<String, Object>();
+
+ launchAttributes.put(IProcessLauncher.PROP_PROCESS_PATH,
+ spaceEscapify(remoteCommandPath));
+ launchAttributes.put(IProcessLauncher.PROP_PROCESS_ARGS, args);
+
+ launchAttributes.put(ITerminalsConnectorConstants.PROP_LOCAL_ECHO,
+ Boolean.FALSE);
+ launchAttributes.put(
+ IProcessLauncher.PROP_PROCESS_ASSOCIATE_CONSOLE,
+ Boolean.TRUE);
+
+ // Fill in the launch attributes
+ IPropertiesContainer container = new PropertiesContainer();
+ container.setProperties(launchAttributes);
+ final boolean processDone[] = new boolean[1];
+ processDone[0] = false;
+
+ // Launch the process
+ launcher.launch(peer, container, new Callback(callback) {
+ @Override
+ protected void internalDone(Object caller, IStatus status) {
+ super.internalDone(caller, status);
+ processDone[0] = true;
+ }
+ });
+
+ final Object lock = new Object();
+
+ synchronized (lock) {
+ while (processDone[0] == false) {
+ if (monitor.isCanceled()) {
+ break;
+ }
+ }
+ try {
+ lock.wait(300);
+ } catch (InterruptedException e) {
+ }
+ }
+ ProcessOutputReaderThread reader = proxy.getOutputReader();
+ while (!reader.isFinished()) {
+ reader.waitForFinish();
+ }
+ output = reader.getOutput();
+ }
+ monitor.done();
+ return output;
+ }
+
+ /**
+ * Throws a core exception with an error status object built from the given
+ * message, lower level exception, and error code.
+ *
+ * @param message
+ * the status message
+ * @param exception
+ * lower level exception associated with the error, or
+ * <code>null</code> if none
+ * @param code
+ * error code
+ */
+ public static void abort(String message, Throwable exception, int code)
+ throws CoreException {
+ IStatus status;
+ if (exception != null) {
+ MultiStatus multiStatus = new MultiStatus(Activator.PLUGIN_ID,
+ code, message, exception);
+ multiStatus.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+ code, exception.getLocalizedMessage(), exception));
+ status = multiStatus;
+ } else {
+ status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, code,
+ message, null);
+ }
+ throw new CoreException(status);
+ }
+
+ public static String spaceEscapify(String inputString) {
+ if (inputString == null)
+ return null;
+
+ return inputString.replaceAll(" ", "\\\\ "); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TERunProcess.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TERunProcess.java
new file mode 100644
index 000000000..cb4280801
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TERunProcess.java
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2012 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
+ * Anna Dushistova (MontaVista) - adapted from org.eclipse.debug.core.model.RuntimeProcess
+ *******************************************************************************/
+
+package org.eclipse.tcf.te.tcf.launch.cdt.utils;
+
+import java.util.EventObject;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.core.model.IStreamsProxy;
+import org.eclipse.debug.internal.core.DebugCoreMessages;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.services.IProcesses.ProcessContext;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+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;
+
+@SuppressWarnings("restriction")
+public class TERunProcess extends PlatformObject implements IProcess,
+ IEventListener {
+
+ private ProcessLauncher prLauncher;
+ private String prName;
+ private boolean terminated;
+ private ILaunch launch;
+ private ProcessContext context;
+ private int exitValue;
+
+ public TERunProcess(ILaunch launch, String remoteExePath, String arguments,
+ String label, IPeer peer, SubProgressMonitor monitor) {
+ this.launch = launch;
+ // initializeAttributes(attributes);
+ prName = remoteExePath;
+ terminated = false;
+ launch.addProcess(this);
+ fireCreationEvent();
+ EventManager.getInstance().addEventListener(this,
+ ProcessStateChangeEvent.class);
+ try {
+ prLauncher = TEHelper.launchCmd(peer, remoteExePath, arguments,
+ null, monitor, new Callback());
+ } catch (CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (adapter.equals(IProcess.class)) {
+ return this;
+ }
+ if (adapter.equals(IDebugTarget.class)) {
+ ILaunch launch = getLaunch();
+ IDebugTarget[] targets = launch.getDebugTargets();
+ for (int i = 0; i < targets.length; i++) {
+ if (this.equals(targets[i].getProcess())) {
+ return targets[i];
+ }
+ }
+ return null;
+ }
+ if (adapter.equals(ILaunch.class)) {
+ return getLaunch();
+ }
+ // CONTEXTLAUNCHING
+ if (adapter.equals(ILaunchConfiguration.class)) {
+ return getLaunch().getLaunchConfiguration();
+ }
+ return super.getAdapter(adapter);
+ }
+
+ @Override
+ public boolean canTerminate() {
+ return !terminated;
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return terminated;
+ }
+
+ @Override
+ public void terminate() throws DebugException {
+ if (!isTerminated()) {
+ prLauncher.terminate();
+ terminated = true;
+ fireTerminateEvent();
+ }
+ }
+
+ @Override
+ public String getLabel() {
+ return prName;
+ }
+
+ @Override
+ public ILaunch getLaunch() {
+ return launch;
+ }
+
+ @Override
+ public IStreamsProxy getStreamsProxy() {
+ // NOT SUPPORTED
+ return null;
+ }
+
+ @Override
+ public void setAttribute(String key, String value) {
+ // NOT SUPPORTED FOR NOW
+
+ }
+
+ @Override
+ public String getAttribute(String key) {
+ // NOT SUPPORTED FOR NOW
+ return null;
+ }
+
+ @Override
+ public int getExitValue() throws DebugException {
+ if (isTerminated()) {
+ return exitValue;
+ }
+ throw new DebugException(
+ new Status(
+ IStatus.ERROR,
+ DebugPlugin.getUniqueIdentifier(),
+ DebugException.TARGET_REQUEST_FAILED,
+ DebugCoreMessages.RuntimeProcess_Exit_value_not_available_until_process_terminates__1,
+ null));
+ }
+
+ @Override
+ public void eventFired(EventObject event) {
+ if (event instanceof ProcessStateChangeEvent) {
+ ProcessStateChangeEvent pscEvent = (ProcessStateChangeEvent) event;
+ if (pscEvent.getEventId().equals(
+ ProcessStateChangeEvent.EVENT_PROCESS_CREATED)) {
+ if ((pscEvent.getSource() instanceof ProcessContext)) {
+ context = (ProcessContext) pscEvent.getSource();
+ }
+ } else if (pscEvent.getEventId().equals(
+ ProcessStateChangeEvent.EVENT_PROCESS_TERMINATED)) {
+ if ((pscEvent.getSource() instanceof ProcessContext)) {
+ if (((ProcessContext) pscEvent.getSource()).getID().equals(
+ context.getID())) {
+ exitValue = pscEvent.getExitCode();
+ terminated = true;
+ fireTerminateEvent();
+ }
+ }
+ }
+ }
+
+ }
+
+ /**
+ * Fires a creation event.
+ */
+ protected void fireCreationEvent() {
+ fireEvent(new DebugEvent(this, DebugEvent.CREATE));
+ }
+
+ /**
+ * Fires the given debug event.
+ *
+ * @param event
+ * debug event to fire
+ */
+ protected void fireEvent(DebugEvent event) {
+ DebugPlugin manager = DebugPlugin.getDefault();
+ if (manager != null) {
+ manager.fireDebugEventSet(new DebugEvent[] { event });
+ }
+ }
+
+ /**
+ * Fires a terminate event.
+ */
+ protected void fireTerminateEvent() {
+ fireEvent(new DebugEvent(this, DebugEvent.TERMINATE));
+ }
+
+ /**
+ * Fires a change event.
+ */
+ protected void fireChangeEvent() {
+ fireEvent(new DebugEvent(this, DebugEvent.CHANGE));
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/te-feature.png b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/te-feature.png
new file mode 100644
index 000000000..8e1143d7d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/te-feature.png
Binary files differ

Back to the top