Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2011-11-16 08:59:51 +0000
committerUwe Stieber2011-11-16 08:59:51 +0000
commit8706fb04b6c1417ed8d5ece83bc9fca64ddfc3ce (patch)
tree35ff2855e92a05029eb1a01455c6018c573c7175 /target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui
parent67449886c09c8ec4da4f39082373ab62ccc3d978 (diff)
downloadorg.eclipse.tcf-8706fb04b6c1417ed8d5ece83bc9fca64ddfc3ce.tar.gz
org.eclipse.tcf-8706fb04b6c1417ed8d5ece83bc9fca64ddfc3ce.tar.xz
org.eclipse.tcf-8706fb04b6c1417ed8d5ece83bc9fca64ddfc3ce.zip
Target Explorer: Refactor name space from org.eclipse.tm.te.* to org.eclipse.tcf.te.*
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.settings/org.eclipse.jdt.core.prefs362
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/META-INF/MANIFEST.MF27
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/build.properties6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/process.gifbin0 -> 887 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml79
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/activator/UIPlugin.java101
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeContentProvider.java371
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeControl.java136
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeLabelProvider.java92
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeNode.java119
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/dialogs/ProcessSelectionDialog.java201
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/interfaces/ImageConsts.java31
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/LaunchObjectDialog.java393
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/explorer/ProcessExplorerEditorPage.java140
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/AbstractChannelCommandHandler.java215
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/LaunchProcessesCommandHandler.java113
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/help/IContextHelpIds.java43
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.java55
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.properties28
25 files changed, 2591 insertions, 0 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.options b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.options
new file mode 100644
index 000000000..3ced5ff13
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.tcf.processes.ui/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.project
new file mode 100644
index 000000000..f1a0d1ea0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.processes.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..7bca72a82
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,362 @@
+#Fri Oct 07 08:24:23 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=100
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..445e149dd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Fri Oct 07 08:15:45 CEST 2011
+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.processes.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..ff02de989
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,27 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.processes.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.processes.ui.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.ui.forms;bundle-version="3.5.100",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.statushandler;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0",
+ org.eclipse.tcf.te.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.forms;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.views;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.filesystem;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.processes.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.ui;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/build.properties
new file mode 100644
index 000000000..73a5119ed
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ plugin.xml
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/process.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/process.gif
new file mode 100644
index 000000000..8f1fc1ac9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/process.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties
new file mode 100644
index 000000000..b6921ad9e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties
@@ -0,0 +1,22 @@
+##################################################################################
+# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+pluginName = Target Explorer, TCF Processes Extensions UI
+providerName = Eclipse.org
+
+# ***** Editor Pages *****
+
+ProcessExplorerEditorPage.name=Processes
+
+# ***** Command Contributions *****
+
+Processes.command.launch.name=Run Remote Process Command
+Processes.command.launch.label=&Run Remote Process...
+Processes.command.launch.tooltip=Execute the specified process image on the selected peer.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
new file mode 100644
index 000000000..5e07ee342
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Target Explorer Details Editor page contributions -->
+ <extension point="org.eclipse.tcf.te.ui.views.editorPages">
+ <editorPage
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.explorer.ProcessExplorerEditorPage"
+ name="%ProcessExplorerEditorPage.name"
+ id="org.eclipse.tcf.te.tcf.processes.ui.ProcessExplorerEditorPage">
+ </editorPage>
+ </extension>
+
+<!-- Target Explorer Details Editor page binding contributions -->
+ <extension point="org.eclipse.tcf.te.ui.views.editorPageBindings">
+ <editorPageBinding
+ id="org.eclipse.tcf.te.tcf.processes.ui.binding.ProcessExplorerEditorPage"
+ pageId="org.eclipse.tcf.te.tcf.processes.ui.ProcessExplorerEditorPage">
+ <enablement>
+ <with variable="activeEditorInput">
+ <and>
+ <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ <test property="org.eclipse.tcf.te.tcf.locator.hasRemoteService" value="Processes"/>
+ </adapt>
+ </and>
+ </with>
+ </enablement>
+ </editorPageBinding>
+ </extension>
+
+<!-- Processes menu contributions -->
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.TargetExplorer#Popup?after=group.launch">
+ <command
+ commandId="org.eclipse.tcf.te.tcf.processes.ui.command.launch"
+ helpContextId="org.eclipse.tcf.te.tcf.processes.ui.command_Launch"
+ icon="platform:/plugin/org.eclipse.debug.ui/icons/full/obj16/lrun_obj.gif"
+ id="org.eclipse.tcf.te.tcf.processes.ui.commands.launch"
+ label="%Processes.command.launch.label"
+ style="push"
+ tooltip="%Processes.command.launch.tooltip">
+ <visibleWhen checkEnabled="false">
+ <and>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate operator="and" ifEmpty="false">
+ <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ <test
+ property="org.eclipse.tcf.te.tcf.locator.hasRemoteService"
+ value="Processes">
+ </test>
+ </adapt>
+ </iterate>
+ </with>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+
+<!-- Processes command contributions -->
+ <extension point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.tcf.te.tcf.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.tcf.processes.ui.command_Launch"
+ id="org.eclipse.tcf.te.tcf.processes.ui.command.launch"
+ name="%Processes.command.launch.name">
+ </command>
+ </extension>
+
+<!-- Processes handler contributions -->
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.handler.LaunchProcessesCommandHandler"
+ commandId="org.eclipse.tcf.te.tcf.processes.ui.command.launch">
+ </handler>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/pom.xml
new file mode 100644
index 000000000..5d7219f65
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.processes.ui</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/activator/UIPlugin.java
new file mode 100644
index 000000000..f807845ee
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/activator/UIPlugin.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.activator;
+
+import java.net.URL;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.tcf.processes.ui.interfaces.ImageConsts;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class UIPlugin extends AbstractUIPlugin {
+ // The shared instance
+ private static UIPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public UIPlugin() {
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static UIPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getDefault() != null && getDefault().getBundle() != null) {
+ return getDefault().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /* (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);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
+ */
+ @Override
+ protected void initializeImageRegistry(ImageRegistry registry) {
+ URL url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ + "process.gif"); //$NON-NLS-1$
+ registry.put(ImageConsts.OBJ_Process, ImageDescriptor.createFromURL(url));
+ }
+
+ /**
+ * Loads the image registered under the specified key from the image
+ * registry and returns the <code>Image</code> object instance.
+ *
+ * @param key The key the image is registered with.
+ * @return The <code>Image</code> object instance or <code>null</code>.
+ */
+ public static Image getImage(String key) {
+ return getDefault().getImageRegistry().get(key);
+ }
+
+ /**
+ * Loads the image registered under the specified key from the image
+ * registry and returns the <code>ImageDescriptor</code> object instance.
+ *
+ * @param key The key the image is registered with.
+ * @return The <code>ImageDescriptor</code> object instance or <code>null</code>.
+ */
+ public static ImageDescriptor getImageDescriptor(String key) {
+ return getDefault().getImageRegistry().getDescriptor(key);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeContentProvider.java
new file mode 100644
index 000000000..7a271405a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeContentProvider.java
@@ -0,0 +1,371 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.controls;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ISysMonitor;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.ui.nls.Messages;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Processes tree control content provider implementation.
+ */
+public class ProcessesTreeContentProvider implements ITreeContentProvider {
+ /**
+ * Static reference to the return value representing no elements.
+ */
+ protected final static Object[] NO_ELEMENTS = new Object[0];
+
+ /* default */ IPeerModel peerNode = null;
+ private ProcessesTreeNode rootNode = null;
+
+ private IChannel channel = null;
+ private ISysMonitor service = null;
+
+ /* default */ Viewer viewer = null;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ this.viewer = viewer;
+ if (oldInput != null && newInput == null) {
+ closeOpenChannel();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ @Override
+ public void dispose() {
+ closeOpenChannel();
+ }
+
+ /**
+ * Close the open communication channel and set back the node references.
+ */
+ protected void closeOpenChannel() {
+ if (channel != null) {
+ final IChannel finChannel = channel;
+ if (Protocol.isDispatchThread()) {
+ finChannel.close();
+ } else {
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ finChannel.close();
+ }
+ });
+ }
+ channel = null;
+ service = null;
+ }
+
+ peerNode = null;
+ rootNode = null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
+ */
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ */
+ @Override
+ public Object getParent(Object element) {
+ if (element instanceof ProcessesTreeNode) {
+ return ((ProcessesTreeNode)element).parent;
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ Assert.isNotNull(parentElement);
+
+ Object[] children = NO_ELEMENTS;
+
+ // For the file system, we need the peer node
+ if (parentElement instanceof IPeerModel) {
+ // Is it the same peer node we have seen before?
+ if (peerNode == null || peerNode != null && !peerNode.equals(parentElement)) {
+ // Remember the peer node
+ peerNode = (IPeerModel)parentElement;
+
+ // If we still have a channel open, for now, we just close the old channel
+ if (channel != null) {
+ final IChannel finChannel = channel;
+ if (Protocol.isDispatchThread()) {
+ finChannel.close();
+ } else {
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ finChannel.close();
+ }
+ });
+ }
+ channel = null;
+ }
+
+ IPeer peer = peerNode.getPeer();
+ final int[] state = new int[1];
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ state[0] = peerNode.getIntProperty(IPeerModelProperties.PROP_STATE);
+ }
+ });
+ if (peer != null && IPeerModelProperties.STATE_ERROR != state[0] && IPeerModelProperties.STATE_NOT_REACHABLE != state[0]) {
+ ProcessesTreeNode pendingNode = new ProcessesTreeNode();
+ pendingNode.name = Messages.PendingOperation_label;
+ pendingNode.type ="ProcPendingNode"; //$NON-NLS-1$
+
+ children = new Object[] { pendingNode };
+
+ Tcf.getChannelManager().openChannel(peer, new IChannelManager.DoneOpenChannel() {
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void doneOpenChannel(Throwable error, IChannel channel) {
+ Assert.isTrue(Protocol.isDispatchThread());
+
+ if (channel != null) {
+ ProcessesTreeContentProvider.this.channel = channel;
+
+ service = channel.getRemoteService(ISysMonitor.class);
+ if (service != null) {
+ rootNode = new ProcessesTreeNode();
+ rootNode.type = "ProcRootNode"; //$NON-NLS-1$
+ rootNode.childrenQueried = false;
+ rootNode.childrenQueryRunning = true;
+
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ service.getChildren(null, new ISysMonitor.DoneGetChildren() {
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.services.ISysMonitor.DoneGetChildren#doneGetChildren(org.eclipse.tcf.protocol.IToken, java.lang.Exception, java.lang.String[])
+ */
+ @Override
+ public void doneGetChildren(IToken token, Exception error, String[] context_ids) {
+ if (rootNode != null) {
+ if (error == null && context_ids != null && context_ids.length > 0) {
+ for (String contextId : context_ids) {
+ service.getContext(contextId, new ISysMonitor.DoneGetContext() {
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.services.ISysMonitor.DoneGetContext#doneGetContext(org.eclipse.tcf.protocol.IToken, java.lang.Exception, org.eclipse.tcf.services.ISysMonitor.SysMonitorContext)
+ */
+ @Override
+ public void doneGetContext(IToken token, Exception error, ISysMonitor.SysMonitorContext context) {
+ if (error == null && context != null) {
+ ProcessesTreeNode node = createNodeFromSysMonitorContext(context);
+ if (node != null) {
+ node.parent = rootNode;
+ rootNode.children.add(node);
+ }
+ }
+ }
+ });
+ }
+ }
+
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ // Reset the children query marker
+ rootNode.childrenQueryRunning = false;
+ rootNode.childrenQueried = true;
+
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ if (viewer != null) viewer.refresh();
+ }
+ });
+ }
+ });
+ }
+ }
+ });
+ }
+ });
+ } else {
+ // TCF file system service is not available, close the just opened channel
+ closeOpenChannel();
+ }
+ }
+ }
+ });
+ } else {
+ dispose();
+ }
+ } else if (rootNode != null && rootNode.childrenQueried) {
+ children = rootNode.children.toArray();
+ }
+ } else if (parentElement instanceof ProcessesTreeNode) {
+ ProcessesTreeNode node = (ProcessesTreeNode)parentElement;
+ // Get possible children
+ children = node.children.toArray();
+ // No children -> check for "childrenQueried" property. If false, trigger the query.
+ if (children.length == 0 && !node.childrenQueried) {
+ ProcessesTreeNode pendingNode = new ProcessesTreeNode();
+ pendingNode.name = Messages.PendingOperation_label;
+ pendingNode.type ="ProcPendingNode"; //$NON-NLS-1$
+
+ children = new Object[] { pendingNode };
+ doGetChildrenForProcessContext(node);
+ }
+ }
+
+ return children;
+ }
+
+ /**
+ * Query the children of the given process context.
+ *
+ * @param node The process context node. Must be not <code>null</code>.
+ */
+ protected void doGetChildrenForProcessContext(ProcessesTreeNode node) {
+ Assert.isNotNull(node);
+
+ if (!node.childrenQueryRunning) {
+ final ProcessesTreeNode parentNode = node;
+
+ final String parentId = node.id;
+ if (parentId != null && service != null) {
+ parentNode.childrenQueryRunning = true;
+
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void run() {
+ service.getChildren(parentId, new ISysMonitor.DoneGetChildren() {
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.services.IProcesses.DoneGetChildren#doneGetChildren(org.eclipse.tcf.protocol.IToken, java.lang.Exception, java.lang.String[])
+ */
+ @Override
+ public void doneGetChildren(IToken token, Exception error, String[] context_ids) {
+ if (error == null && context_ids != null && context_ids.length > 0) {
+ for (String contextId : context_ids) {
+ service.getContext(contextId, new ISysMonitor.DoneGetContext() {
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.services.ISysMonitor.DoneGetContext#doneGetContext(org.eclipse.tcf.protocol.IToken, java.lang.Exception, org.eclipse.tcf.services.ISysMonitor.SysMonitorContext)
+ */
+ @Override
+ public void doneGetContext(IToken token, Exception error, ISysMonitor.SysMonitorContext context) {
+ if (error == null && context != null) {
+ ProcessesTreeNode node = createNodeFromSysMonitorContext(context);
+ if (node != null) {
+ node.parent = parentNode;
+ parentNode.children.add(node);
+ }
+ }
+ }
+ });
+ }
+ }
+
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ // Reset the children query marker
+ parentNode.childrenQueryRunning = false;
+ parentNode.childrenQueried = true;
+
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ if (viewer instanceof StructuredViewer) ((StructuredViewer)viewer).refresh(parentNode);
+ }
+ });
+ }
+ });
+ }
+ });
+ }
+ });
+ }
+ }
+
+ }
+
+ /**
+ * Creates a node from the given system monitor context.
+ *
+ * @param context The system monitor context. Must be not <code>null</code>.
+ *
+ * @return The node.
+ */
+ protected ProcessesTreeNode createNodeFromSysMonitorContext(ISysMonitor.SysMonitorContext context) {
+ Assert.isTrue(Protocol.isDispatchThread());
+ Assert.isNotNull(context);
+
+ ProcessesTreeNode node = new ProcessesTreeNode();
+
+ node.childrenQueried = false;
+ node.childrenQueryRunning = false;
+ node.context = context;
+ node.name = context.getFile();
+ node.type = "ProcNode"; //$NON-NLS-1$
+ node.id = context.getID();
+ node.pid = context.getPID();
+ node.ppid = context.getPPID();
+ node.parentId = context.getParentID();
+ node.state = context.getState();
+ node.username = context.getUserName();
+
+ doGetChildrenForProcessContext(node);
+
+ return node;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ @Override
+ public boolean hasChildren(Object element) {
+ Assert.isNotNull(element);
+
+ boolean hasChildren = false;
+
+ // No children yet and the element is a process node
+ if (element instanceof ProcessesTreeNode) {
+ ProcessesTreeNode node = (ProcessesTreeNode)element;
+ if (!node.childrenQueried || node.childrenQueryRunning) {
+ hasChildren = true;
+ } else if (node.childrenQueried) {
+ hasChildren = node.children.size() > 0;
+ }
+ }
+
+ return hasChildren;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeControl.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeControl.java
new file mode 100644
index 000000000..aad439108
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeControl.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.controls;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.trees.AbstractTreeControl;
+import org.eclipse.tcf.te.ui.trees.TreeViewerComparator;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * Processes tree control.
+ */
+public class ProcessesTreeControl extends AbstractTreeControl {
+
+ /**
+ * Constructor.
+ */
+ public ProcessesTreeControl() {
+ super();
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parentPart The parent workbench part this control is embedded in or <code>null</code>.
+ */
+ public ProcessesTreeControl(IWorkbenchPart parentPart) {
+ super(parentPart);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#configureTreeViewer(org.eclipse.jface.viewers.TreeViewer)
+ */
+ @Override
+ protected void configureTreeViewer(TreeViewer viewer) {
+ super.configureTreeViewer(viewer);
+
+ Tree tree = viewer.getTree();
+ if (hasColumns()) {
+ TreeColumn column = new TreeColumn(tree, SWT.LEFT);
+ column.setText(Messages.ProcessesTreeControl_column_name_label);
+ column.setWidth(250);
+
+ column = new TreeColumn(tree, SWT.RIGHT);
+ column.setText(Messages.ProcessesTreeControl_column_pid_label);
+ column.setWidth(50);
+
+ column = new TreeColumn(tree, SWT.RIGHT);
+ column.setText(Messages.ProcessesTreeControl_column_ppid_label);
+ column.setWidth(50);
+
+ column = new TreeColumn(tree, SWT.RIGHT);
+ column.setText(Messages.ProcessesTreeControl_column_state_label);
+ column.setWidth(50);
+
+ column = new TreeColumn(tree, SWT.RIGHT);
+ column.setText(Messages.ProcessesTreeControl_column_user_label);
+ column.setWidth(100);
+ }
+ tree.setHeaderVisible(hasColumns());
+ }
+
+ /**
+ * Returns if or if not to show the tree columns.
+ *
+ * @return <code>True</code> to show the tree columns, <code>false</code> otherwise.
+ */
+ protected boolean hasColumns() {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#doCreateTreeViewerContentProvider(org.eclipse.jface.viewers.TreeViewer)
+ */
+ @Override
+ protected ITreeContentProvider doCreateTreeViewerContentProvider(TreeViewer viewer) {
+ return new ProcessesTreeContentProvider();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#doCreateTreeViewerLabelProvider(org.eclipse.jface.viewers.TreeViewer)
+ */
+ @Override
+ protected ILabelProvider doCreateTreeViewerLabelProvider(TreeViewer viewer) {
+ return new ProcessesTreeLabelProvider();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#doCreateTreeViewerSelectionChangedListener(org.eclipse.jface.viewers.TreeViewer)
+ */
+ @Override
+ protected ISelectionChangedListener doCreateTreeViewerSelectionChangedListener(TreeViewer viewer) {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#doCreateTreeViewerComparator(org.eclipse.jface.viewers.TreeViewer)
+ */
+ @Override
+ protected ViewerComparator doCreateTreeViewerComparator(TreeViewer viewer) {
+ return new TreeViewerComparator(viewer, (ILabelProvider) viewer.getLabelProvider());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#getAutoExpandLevel()
+ */
+ @Override
+ protected int getAutoExpandLevel() {
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#getContextMenuId()
+ */
+ @Override
+ protected String getContextMenuId() {
+ return IUIConstants.ID_CONTROL_MENUS_BASE + ".menu.processes"; //$NON-NLS-1$;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeLabelProvider.java
new file mode 100644
index 000000000..eb8296d41
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeLabelProvider.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.controls;
+
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.tcf.processes.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.processes.ui.interfaces.ImageConsts;
+
+/**
+ * Processes tree control label provider implementation.
+ */
+public class ProcessesTreeLabelProvider extends LabelProvider implements ITableLabelProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof ProcessesTreeNode) {
+ return ((ProcessesTreeNode) element).name;
+ }
+ return super.getText(element);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof ProcessesTreeNode) {
+ return UIPlugin.getImage(ImageConsts.OBJ_Process);
+ }
+
+ return super.getImage(element);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+ */
+ @Override
+ public Image getColumnImage(Object element, int columnIndex) {
+ if (columnIndex == 0) return getImage(element);
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+ */
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ if (columnIndex == 0) return getText(element);
+
+ if (element instanceof ProcessesTreeNode) {
+ ProcessesTreeNode node = (ProcessesTreeNode) element;
+
+ // Pending nodes does not have column texts at all
+ if (node.type.endsWith("PendingNode")) return ""; //$NON-NLS-1$ //$NON-NLS-2$
+
+ switch (columnIndex) {
+ case 1:
+ String id = Long.toString(node.pid);
+ if (id == null) id = node.id;
+ if (id != null) return id.startsWith("P") ? id.substring(1) : id; //$NON-NLS-1$
+ break;
+ case 2:
+ String ppid = Long.toString(node.ppid);
+ if (ppid != null) return ppid;
+ break;
+ case 3:
+ String state = node.state;
+ if (state != null) return state;
+ break;
+ case 4:
+ String username = node.username;
+ if (username != null) return username;
+ break;
+ }
+ }
+
+ return ""; //$NON-NLS-1$
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeNode.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeNode.java
new file mode 100644
index 000000000..f382d1acd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessesTreeNode.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.controls;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.tcf.services.ISysMonitor;
+
+/**
+ * Representation of a file system tree node.
+ */
+public final class ProcessesTreeNode extends PlatformObject {
+ private final UUID uuid = UUID.randomUUID();
+
+ /**
+ * The tree node name.
+ */
+ public String name = null;
+
+ /**
+ * The tree node type.
+ */
+ public String type = null;
+
+ /**
+ * The process context object
+ */
+ public ISysMonitor.SysMonitorContext context;
+
+ /**
+ * The internal process id
+ */
+ public String id = null;
+
+ /**
+ * The internal parent process id.
+ */
+ public String parentId = null;
+
+ /**
+ * The native process id.
+ */
+ public long pid = 0L;
+
+ /**
+ * The native parent process id.
+ */
+ public long ppid = 0L;
+
+ /**
+ * The process state
+ */
+ public String state = null;
+
+ /**
+ * The process owner/creator
+ */
+ public String username = null;
+
+ /**
+ * The tree node parent.
+ */
+ public ProcessesTreeNode parent = null;
+
+ /**
+ * The tree node children.
+ */
+ public List<ProcessesTreeNode> children = new ArrayList<ProcessesTreeNode>();
+
+ /**
+ * Flag to mark once the children of the node got queried
+ */
+ public boolean childrenQueried = false;
+
+ /**
+ * Flag to mark once the children query is running
+ */
+ public boolean childrenQueryRunning = false;
+
+ /*
+ * (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public final int hashCode() {
+ return uuid.hashCode();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public final boolean equals(Object obj) {
+ if (obj instanceof ProcessesTreeNode) {
+ return uuid.equals(((ProcessesTreeNode) obj).uuid);
+ }
+ return super.equals(obj);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return name != null ? name : super.toString();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/dialogs/ProcessSelectionDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/dialogs/ProcessSelectionDialog.java
new file mode 100644
index 000000000..5a19be3a4
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/dialogs/ProcessSelectionDialog.java
@@ -0,0 +1,201 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.dialogs;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWT;
+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.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.tcf.processes.ui.controls.ProcessesTreeControl;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
+import org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.editor.IFormPage;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * Process selection dialog.
+ */
+public class ProcessSelectionDialog extends CustomTrayDialog {
+ // Reference to the subcontrol
+ private final ProcessesTreeControl control;
+ // Reference to the current selection within the file system tree
+ private ISelection selection;
+
+ protected class ProcessSelectionTreeControl extends ProcessesTreeControl {
+
+ /**
+ * Constructor.
+ */
+ public ProcessSelectionTreeControl() {
+ super();
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parentPage The parent form page this control is embedded in or <code>null</code>
+ * if the control is not embedded within a form page.
+ */
+ public ProcessSelectionTreeControl(FormPage parentPage) {
+ super(parentPage);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.processes.ui.controls.ProcessesTreeControl#hasColumns()
+ */
+ @Override
+ protected boolean hasColumns() {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.processes.ui.controls.ProcessesTreeControl#doCreateTreeViewerSelectionChangedListener(org.eclipse.jface.viewers.TreeViewer)
+ */
+ @Override
+ protected ISelectionChangedListener doCreateTreeViewerSelectionChangedListener(TreeViewer viewer) {
+ return new ProcessSelectionTreeControlSelectionChangedListener();
+ }
+ }
+
+ protected class ProcessSelectionTreeControlSelectionChangedListener implements ISelectionChangedListener {
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void selectionChanged(SelectionChangedEvent event) {
+ selection = event.getSelection();
+ updateButtons();
+ }
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param shell The parent shell or <code>null</code>.
+ */
+ public ProcessSelectionDialog(Shell shell) {
+ this(shell, null);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param shell The parent shell or <code>null</code>.
+ * @param contextHelpId The dialog context help id or <code>null</code>.
+ */
+ public ProcessSelectionDialog(Shell shell, String contextHelpId) {
+ this(null, shell, contextHelpId);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parentPage The parent form page this control is embedded in or <code>null</code> if
+ * the control is not embedded within a form page.
+ * @param shell The parent shell or <code>null</code>.
+ * @param contextHelpId The dialog context help id or <code>null</code>.
+ */
+ public ProcessSelectionDialog(FormPage parentPage, Shell shell, String contextHelpId) {
+ super(shell, contextHelpId);
+
+ control = new ProcessSelectionTreeControl(parentPage);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#isResizable()
+ */
+ @Override
+ protected boolean isResizable() {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite) super.createDialogArea(parent);
+
+ setDialogTitle(Messages.ProcessSelectionDialog_title);
+
+ Composite panel = new Composite(composite, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ panel.setLayout(layout);
+ GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ layoutData.heightHint = convertHeightInCharsToPixels(25);
+ layoutData.widthHint = convertWidthInCharsToPixels(50);
+ panel.setLayoutData(layoutData);
+
+ CustomFormToolkit toolkit = null;
+ if (control.getParentPart() instanceof IFormPage && ((IFormPage) control.getParentPart()).getManagedForm() != null) {
+ toolkit = new CustomFormToolkit(((IFormPage) control.getParentPart()).getManagedForm().getToolkit());
+ }
+ if (toolkit == null) toolkit = new CustomFormToolkit(new FormToolkit(getShell().getDisplay()));
+
+ control.setupFormPanel(panel, toolkit);
+
+ return composite;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog#close()
+ */
+ @Override
+ public boolean close() {
+ if (control != null) {
+ control.dispose();
+ }
+
+ return super.close();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.TrayDialog#createButtonBar(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createButtonBar(Composite parent) {
+ Control control = super.createButtonBar(parent);
+ updateButtons();
+ return control;
+ }
+
+ /**
+ * Update the button enablement.
+ */
+ protected void updateButtons() {
+ Button okButton = getButton(IDialogConstants.OK_ID);
+ if (okButton != null) okButton.setEnabled(selection != null && !selection.isEmpty());
+ }
+
+ /**
+ * Returns the current file system control selection.
+ *
+ * @return
+ */
+ public ISelection getSelection() {
+ return selection;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/interfaces/ImageConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/interfaces/ImageConsts.java
new file mode 100644
index 000000000..1276ebed7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/interfaces/ImageConsts.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.interfaces;
+
+/**
+ * Image registry constants.
+ */
+public interface ImageConsts {
+ // ***** The directory structure constants *****
+
+ /**
+ * The root directory where to load the images from, relative to the bundle directory.
+ */
+ public final static String IMAGE_DIR_ROOT = "icons/"; //$NON-NLS-1$
+
+ /**
+ * The directory where to load model object images from, relative to the image root directory.
+ */
+ public final static String IMAGE_DIR_OBJ = "obj16/"; //$NON-NLS-1$
+
+ // ***** The image constants *****
+
+ public static final String OBJ_Process = "OBJ_Process"; //$NON-NLS-1$
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/LaunchObjectDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/LaunchObjectDialog.java
new file mode 100644
index 000000000..122028b02
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/LaunchObjectDialog.java
@@ -0,0 +1,393 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.dialogs;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+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.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.core.utils.text.StringUtil;
+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.tcf.filesystem.controls.FSTreeContentProvider;
+import org.eclipse.tcf.te.tcf.filesystem.dialogs.FSOpenFileDialog;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessLauncher;
+import org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.forms.editor.FormPage;
+
+/**
+ * Launch object at selected peer dialog.
+ */
+public class LaunchObjectDialog extends CustomTrayDialog {
+ private Text imagePath;
+ private Button imagePathBrowse;
+ private Text arguments;
+ /* default */ Button lineSeparatorDefault;
+ /* default */ Button lineSeparatorLF;
+ /* default */ Button lineSeparatorCRLF;
+ /* default */ Button lineSeparatorCR;
+
+ private Map<String, Object> launchAttributes = null;
+ /* default */ final IEditorPart part;
+
+ /**
+ * Constructor.
+ *
+ * @param parent The parent shell used to view the dialog.
+ */
+ public LaunchObjectDialog(Shell parent) {
+ this(null, parent);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parent The parent shell used to view the dialog.
+ */
+ public LaunchObjectDialog(IEditorPart part, Shell parent) {
+ this(part, parent, IContextHelpIds.LAUNCH_OBJECT_DIALOG);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param part The parent editor part or <code>null</code>.
+ * @param parent The parent shell used to view the dialog.
+ * @param contextHelpId The dialog context help id or <code>null</code>.
+ */
+ public LaunchObjectDialog(IEditorPart part, Shell parent, String contextHelpId) {
+ super(parent, contextHelpId);
+ this.part = part;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite) super.createDialogArea(parent);
+
+ configureTitles();
+
+ Composite panel = new Composite(composite, SWT.NONE);
+ panel.setLayout(new GridLayout(3, false));
+ panel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ // Add the controls
+ Label label = new Label(panel, SWT.NONE);
+ label.setText(Messages.LaunchObjectDialog_image_label);
+
+ imagePath = new Text(panel, SWT.SINGLE | SWT.BORDER);
+ GridData layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ layoutData.widthHint = SWTControlUtil.convertWidthInCharsToPixels(imagePath, 40);
+ imagePath.setLayoutData(layoutData);
+ imagePath.addModifyListener(new ModifyListener() {
+ @Override
+ public void modifyText(ModifyEvent e) {
+ validateDialog();
+ }
+ });
+
+ imagePathBrowse = new Button(panel, SWT.PUSH);
+ imagePathBrowse.setText(org.eclipse.tcf.te.ui.nls.Messages.EditBrowseTextControl_button_label);
+ imagePathBrowse.addSelectionListener(new SelectionAdapter() {
+ @SuppressWarnings("synthetic-access")
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ FSOpenFileDialog dialog = new FSOpenFileDialog(part instanceof FormPage ? (FormPage) part : null, getShell(), null);
+ if (dialog.open() == Window.OK) {
+ ISelection selection = dialog.getSelection();
+ if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
+ Object candidate = ((IStructuredSelection) selection).getFirstElement();
+ if (candidate instanceof FSTreeNode) {
+ String absPath = FSTreeContentProvider.getEntryAbsoluteName((FSTreeNode) candidate);
+ if (absPath != null) {
+ imagePath.setText(absPath);
+ }
+ }
+ }
+ }
+ }
+ });
+
+ label = new Label(panel, SWT.NONE);
+ label.setText(Messages.LaunchObjectDialog_arguments_label);
+
+ arguments = new Text(panel, SWT.SINGLE | SWT.BORDER);
+ layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ layoutData.horizontalSpan = 2;
+ arguments.setLayoutData(layoutData);
+ arguments.addModifyListener(new ModifyListener() {
+ @Override
+ public void modifyText(ModifyEvent e) {
+ validateDialog();
+ }
+ });
+
+ Group group = new Group(composite, SWT.NONE);
+ layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ group.setLayoutData(layoutData);
+ group.setText(Messages.LaunchObjectDialog_group_label);
+ group.setLayout(new GridLayout());
+
+ label = new Label(group, SWT.NONE);
+ label.setText(Messages.LaunchObjectDialog_lineseparator_label);
+ layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ label.setLayoutData(layoutData);
+
+ Composite panel2 = new Composite(group, SWT.NONE);
+ GridLayout layout = new GridLayout(4, false);
+ layout.marginLeft = 15; layout.marginHeight = 2;
+ panel2.setLayout(layout);
+ layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ panel2.setLayoutData(layoutData);
+
+ lineSeparatorDefault = new Button(panel2, SWT.RADIO);
+ lineSeparatorDefault.setText(Messages.LaunchObjectDialog_lineseparator_default);
+ lineSeparatorDefault.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (lineSeparatorDefault.getSelection()) {
+ SWTControlUtil.setSelection(lineSeparatorLF, false);
+ SWTControlUtil.setSelection(lineSeparatorCRLF, false);
+ SWTControlUtil.setSelection(lineSeparatorCR, false);
+ }
+ }
+ });
+
+ lineSeparatorLF = new Button(panel2, SWT.RADIO);
+ lineSeparatorLF.setText(Messages.LaunchObjectDialog_lineseparator_lf);
+ lineSeparatorLF.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (lineSeparatorDefault.getSelection()) {
+ SWTControlUtil.setSelection(lineSeparatorDefault, false);
+ SWTControlUtil.setSelection(lineSeparatorCRLF, false);
+ SWTControlUtil.setSelection(lineSeparatorCR, false);
+ }
+ }
+ });
+
+ lineSeparatorCRLF = new Button(panel2, SWT.RADIO);
+ lineSeparatorCRLF.setText(Messages.LaunchObjectDialog_lineseparator_crlf);
+ lineSeparatorCRLF.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (lineSeparatorDefault.getSelection()) {
+ SWTControlUtil.setSelection(lineSeparatorDefault, false);
+ SWTControlUtil.setSelection(lineSeparatorLF, false);
+ SWTControlUtil.setSelection(lineSeparatorCR, false);
+ }
+ }
+ });
+
+ lineSeparatorCR = new Button(panel2, SWT.RADIO);
+ lineSeparatorCR.setText(Messages.LaunchObjectDialog_lineseparator_cr);
+ lineSeparatorCR.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (lineSeparatorDefault.getSelection()) {
+ SWTControlUtil.setSelection(lineSeparatorDefault, false);
+ SWTControlUtil.setSelection(lineSeparatorLF, false);
+ SWTControlUtil.setSelection(lineSeparatorCRLF, false);
+ }
+ }
+ });
+
+ // Setup the control content
+ setupContent();
+
+ // Adjust the font
+ applyDialogFont(composite);
+
+ return composite;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.TrayDialog#createButtonBar(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createButtonBar(Composite parent) {
+ Control control = super.createButtonBar(parent);
+ validateDialog();
+ return control;
+ }
+
+ /**
+ * Configure the dialog title and the title area content. The method is called from
+ * {@link #createDialogArea(Composite)}.
+ */
+ protected void configureTitles() {
+ setDialogTitle(Messages.LaunchObjectDialog_title);
+ }
+
+ /**
+ * Setup the control content.
+ */
+ protected void setupContent() {
+ restoreWidgetValues();
+ }
+
+ /**
+ * Validates the dialog.
+ */
+ protected void validateDialog() {
+
+ boolean valid = !"".equals(imagePath.getText()); //$NON-NLS-1$
+
+ if (getButton(IDialogConstants.OK_ID) != null) getButton(IDialogConstants.OK_ID).setEnabled(valid);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#cancelPressed()
+ */
+ @Override
+ protected void cancelPressed() {
+ // Dispose the launch attributes
+ launchAttributes = null;
+
+ super.cancelPressed();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ @Override
+ protected void okPressed() {
+ // Create a new launch attributes map
+ launchAttributes = new HashMap<String, Object>();
+ // Update with the current control content
+ updateLaunchAttributes(launchAttributes);
+
+ super.okPressed();
+ }
+
+ /**
+ * Updates the given attributes map with the current control content.
+ */
+ protected void updateLaunchAttributes(Map<String, Object> launchAttributes) {
+ Assert.isNotNull(launchAttributes);
+
+ launchAttributes.put(IProcessLauncher.PROP_PROCESS_PATH, imagePath.getText());
+
+ String argumentsString = arguments.getText();
+ String[] args = argumentsString != null && !"".equals(argumentsString.trim()) ? StringUtil.tokenize(argumentsString, 0, true) : null; //$NON-NLS-1$
+ launchAttributes.put(IProcessLauncher.PROP_PROCESS_ARGS, args);
+
+ // Local Echo is OFF.
+ launchAttributes.put(ITerminalsConnectorConstants.PROP_LOCAL_ECHO, Boolean.FALSE);
+
+ String lineSeparator = null;
+ if (SWTControlUtil.getSelection(lineSeparatorLF)) {
+ lineSeparator = ILineSeparatorConstants.LINE_SEPARATOR_LF;
+ }
+ else if (SWTControlUtil.getSelection(lineSeparatorCRLF)) {
+ lineSeparator = ILineSeparatorConstants.LINE_SEPARATOR_CRLF;
+ }
+ else if (SWTControlUtil.getSelection(lineSeparatorCR)) {
+ lineSeparator = ILineSeparatorConstants.LINE_SEPARATOR_CR;
+ }
+ launchAttributes.put(ITerminalsConnectorConstants.PROP_LINE_SEPARATOR, lineSeparator);
+ }
+
+ /**
+ * Returns the launch attributes.
+ *
+ * @return The launch attributes or <code>null</code> if canceled.
+ */
+ public final Map<String, Object> getLaunchAttributes() {
+ return launchAttributes;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog#dispose()
+ */
+ @Override
+ protected void dispose() {
+ super.dispose();
+ }
+
+ /**
+ * Saves the widget history to the dialog settings.
+ */
+ @Override
+ protected void saveWidgetValues() {
+ IDialogSettings settings = getDialogSettings();
+ if (settings != null) {
+ settings.put(IProcessLauncher.PROP_PROCESS_PATH, imagePath.getText());
+ settings.put(IProcessLauncher.PROP_PROCESS_ARGS, arguments.getText());
+
+ String lineSeparator = null;
+ if (SWTControlUtil.getSelection(lineSeparatorLF)) {
+ lineSeparator = ILineSeparatorConstants.LINE_SEPARATOR_LF;
+ }
+ else if (SWTControlUtil.getSelection(lineSeparatorCRLF)) {
+ lineSeparator = ILineSeparatorConstants.LINE_SEPARATOR_CRLF;
+ }
+ else if (SWTControlUtil.getSelection(lineSeparatorCR)) {
+ lineSeparator = ILineSeparatorConstants.LINE_SEPARATOR_CR;
+ }
+ settings.put(ITerminalsConnectorConstants.PROP_LINE_SEPARATOR, lineSeparator);
+ }
+ }
+
+ /**
+ * Restores the widget history from the dialog settings.
+ */
+ @Override
+ protected void restoreWidgetValues() {
+ IDialogSettings settings = getDialogSettings();
+ if (settings != null) {
+ String path = settings.get(IProcessLauncher.PROP_PROCESS_PATH);
+ if (path != null) imagePath.setText(path);
+ String args = settings.get(IProcessLauncher.PROP_PROCESS_ARGS);
+ if (args != null) arguments.setText(args);
+
+ String lineSeparator = settings.get(ITerminalsConnectorConstants.PROP_LINE_SEPARATOR);
+ if (lineSeparator == null) {
+ SWTControlUtil.setSelection(lineSeparatorDefault, true);
+ }
+ else if (ILineSeparatorConstants.LINE_SEPARATOR_LF.equals(lineSeparator)) {
+ SWTControlUtil.setSelection(lineSeparatorLF, true);
+ }
+ else if (ILineSeparatorConstants.LINE_SEPARATOR_CRLF.equals(lineSeparator)) {
+ SWTControlUtil.setSelection(lineSeparatorCRLF, true);
+ }
+ else if (ILineSeparatorConstants.LINE_SEPARATOR_CR.equals(lineSeparator)) {
+ SWTControlUtil.setSelection(lineSeparatorCR, true);
+ }
+ }
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/explorer/ProcessExplorerEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/explorer/ProcessExplorerEditorPage.java
new file mode 100644
index 000000000..acce52938
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/explorer/ProcessExplorerEditorPage.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.explorer;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tcf.te.tcf.processes.ui.controls.ProcessesTreeControl;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
+import org.eclipse.tcf.te.ui.views.editor.AbstractEditorPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+
+/**
+ * Processes editor page implementation.
+ */
+public class ProcessExplorerEditorPage extends AbstractEditorPage {
+ // The references to the pages subcontrol's (needed for disposal)
+ private ProcessesTreeControl treeControl;
+
+ // Reference to the form toolkit instance
+ private CustomFormToolkit toolkit = null;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormPage#dispose()
+ */
+ @Override
+ public void dispose() {
+ if (treeControl != null) { treeControl.dispose(); treeControl = null; }
+ super.dispose();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+ */
+ @Override
+ protected void createFormContent(IManagedForm managedForm) {
+ // Configure the managed form
+ configureManagedForm(managedForm);
+
+ // Get the form body
+ Composite body = managedForm.getForm().getBody();
+
+ // Create the toolkit instance
+ toolkit = new CustomFormToolkit(managedForm.getToolkit());
+
+ // Do create the content of the form now
+ doCreateFormContent(body, toolkit);
+
+ // Re-arrange the controls
+ managedForm.reflow(true);
+ }
+
+ /**
+ * Configure the managed form to be ready for usage.
+ *
+ * @param managedForm The managed form. Must be not <code>null</code>.
+ */
+ protected void configureManagedForm(IManagedForm managedForm) {
+ Assert.isNotNull(managedForm);
+
+ // Configure main layout
+ Composite body = managedForm.getForm().getBody();
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = 2; layout.marginWidth = 0;
+ body.setLayout(layout);
+ body.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
+
+ // Set context help id
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(managedForm.getForm(), IContextHelpIds.PROCESS_EXPLORER_EDITOR_PAGE);
+ }
+
+ /**
+ * Do create the managed form content.
+ *
+ * @param parent The parent composite. Must be not <code>null</code>
+ * @param toolkit The {@link CustomFormToolkit} instance. Must be not <code>null</code>.
+ */
+ protected void doCreateFormContent(Composite parent, CustomFormToolkit toolkit) {
+ Assert.isNotNull(parent);
+ Assert.isNotNull(toolkit);
+
+ Section section = toolkit.getFormToolkit().createSection(parent, ExpandableComposite.TITLE_BAR);
+ String title = Messages.ProcessExplorerTreeControl_section_title;
+ // Stretch to a length of 40 characters to make sure the title can be changed
+ // to hold and show text up to this length
+ while (title.length() < 40) {
+ title += " "; //$NON-NLS-1$
+ }
+ // Set the title to the section
+ section.setText(title);
+ section.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ // Create the client area
+ Composite client = toolkit.getFormToolkit().createComposite(section);
+ GridLayout layout = new GridLayout();
+ layout.marginWidth = 0; layout.marginHeight = 0;
+ client.setLayout(layout);
+ section.setClient(client);
+
+ // Setup the tree control
+ treeControl = doCreateTreeControl();
+ Assert.isNotNull(treeControl);
+ treeControl.setupFormPanel((Composite)section.getClient(), toolkit);
+
+ // Set the initial input
+ treeControl.getViewer().setInput(getEditorInputNode());
+ }
+
+ /**
+ * Creates and returns a tree control.
+ *
+ * @return The new tree control.
+ */
+ protected ProcessesTreeControl doCreateTreeControl() {
+ return new ProcessesTreeControl(this);
+ }
+
+ /**
+ * Returns the associated tree control.
+ *
+ * @return The associated tree control or <code>null</code>.
+ */
+ protected final ProcessesTreeControl getTreeControl() {
+ return treeControl;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/AbstractChannelCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/AbstractChannelCommandHandler.java
new file mode 100644
index 000000000..6075fd5ca
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/AbstractChannelCommandHandler.java
@@ -0,0 +1,215 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.handler;
+
+import java.util.Iterator;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.processes.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.statushandler.StatusHandlerManager;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.ui.swt.DisplayUtil;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Abstract channel command handler implementation.
+ */
+public abstract class AbstractChannelCommandHandler extends AbstractHandler {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+ // Get the active menu selection
+ ISelection activeSelection = HandlerUtil.getActiveMenuSelection(event);
+ // The selection is expected to be a structured exception
+ if (activeSelection instanceof IStructuredSelection && !activeSelection.isEmpty()) {
+ IStructuredSelection selection = (IStructuredSelection)activeSelection;
+ // Loop the selection
+ Iterator<?> iterator = selection.iterator();
+ while (iterator.hasNext()) {
+ Object element = iterator.next();
+ // The selected element is expected to be a peer node
+ if (element instanceof IPeerModel) {
+ final IPeerModel node = (IPeerModel)element;
+ IPeer peer = node.getPeer();
+ // If the peer is available, we can open a channel to the remote peer
+ if (peer != null) {
+ // Get the channel
+ Tcf.getChannelManager().openChannel(peer, new IChannelManager.DoneOpenChannel() {
+ @Override
+ public void doneOpenChannel(final Throwable error, final IChannel channel) {
+ if (error == null) {
+ // Invoke the execute within the UI thread again.
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ execute(event, channel, node, new DoneExecute() {
+ @Override
+ public void doneExecute(IStatus status, Object result) {
+ if (status.getSeverity() != IStatus.OK && status.getSeverity() != IStatus.CANCEL) {
+ handleException(channel, new CoreException(status));
+ } else {
+ // Close the channel
+ if (channel != null) {
+ final IChannel finChannel = channel;
+ if (Protocol.isDispatchThread()) {
+ finChannel.close();
+ } else {
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ finChannel.close();
+ }
+ });
+ }
+ }
+ }
+ }
+ });
+ }
+ };
+
+ DisplayUtil.safeAsyncExec(runnable);
+
+ } else {
+ handleException(channel, error);
+ }
+ }
+ });
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Executes the command handler logic.
+ *
+ * @param event The execution event. Must be not <code>null</code>.
+ * @param channel The channel. Must be not <code>null</code>.
+ * @param node The selected node. Must be not <code>null</code>.
+ * @param callback The callback to invoke if the execution finished. Must be not <code>null</code>.
+ */
+ protected abstract void execute(ExecutionEvent event, IChannel channel, IPeerModel node, DoneExecute callback);
+
+ /**
+ * Client call back interface for execute(...).
+ */
+ public static interface DoneExecute {
+ /**
+ * Called when execute(...) got finished.
+ *
+ * @param status The execution status. Must not be <code>null</code>.
+ * @param result The execution result or <code>null</code>.
+ */
+ public void doneExecute(IStatus status, Object result);
+ }
+
+ /**
+ * Closes the given channel and handle the given exception.
+ *
+ * @param channel The channel instance or <code>null</code>.
+ * @param exception The exception to handle. Must be not <code>null</code>.
+ */
+ protected void handleException(IChannel channel, Throwable exception) {
+ Assert.isNotNull(exception);
+
+ // Close the backend channel
+ if (channel != null) {
+ final IChannel finChannel = channel;
+ if (Protocol.isDispatchThread()) {
+ finChannel.close();
+ } else {
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ finChannel.close();
+ }
+ });
+ }
+ }
+
+ // Get the status handler
+ IStatusHandler[] handler = StatusHandlerManager.getInstance().getHandler(getClass());
+ if (handler != null && handler.length > 0) {
+ // If the exception is a core exception, we can pass on the status object to the handler
+ IStatus status = null;
+ if (exception instanceof CoreException) ((CoreException)exception).getStatus();
+ else {
+ // Construct the status from the exception
+ status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), 0, exception.getLocalizedMessage(), exception);
+ }
+
+ // Handle the status (Take the first status handler in the list)
+ if (status != null) {
+ IPropertiesContainer data = new PropertiesContainer();
+ data.setProperty(IStatusHandlerConstants.PROPERTY_TITLE, getStatusDialogTitle());
+ data.setProperty(IStatusHandlerConstants.PROPERTY_CONTEXT_HELP_ID, getStatusDialogContextHelpId());
+ data.setProperty(IStatusHandlerConstants.PROPERTY_DONT_ASK_AGAIN_ID, getStatusDialogDontAskAgainKey());
+ data.setProperty(IStatusHandlerConstants.PROPERTY_CALLER, this);
+
+ handler[0].handleStatus(status, data, null);
+ }
+ }
+ }
+
+ /**
+ * Returns the title to be used for the status dialog in case of
+ * an execution failure.
+ *
+ * @return The status dialog title.
+ */
+ protected String getStatusDialogTitle() {
+ return Messages.AbstractChannelCommandHandler_statusDialog_title;
+ }
+
+ /**
+ * Returns the context help id to be used for the status dialog in case
+ * of an execution failure.
+ *
+ * @return The context help id or <code>null</code>.
+ */
+ protected String getStatusDialogContextHelpId() {
+ return IContextHelpIds.CHANNEL_COMMAND_HANDLER_STATUS_DIALOG;
+ }
+
+ /**
+ * Returns the don't ask again key to be used for the status dialog in
+ * case of an execution failure.
+ *
+ * @return The don't ask again key or <code>null</code>.
+ */
+ protected String getStatusDialogDontAskAgainKey() {
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/LaunchProcessesCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/LaunchProcessesCommandHandler.java
new file mode 100644
index 000000000..6cf61bd46
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/LaunchProcessesCommandHandler.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.handler;
+
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.dialogs.LaunchObjectDialog;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.statushandler.StatusHandlerManager;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessLauncher;
+import org.eclipse.tcf.te.tcf.processes.core.launcher.ProcessLauncher;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Launch a process on the selected peer.
+ */
+public class LaunchProcessesCommandHandler extends AbstractChannelCommandHandler {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.processes.ui.internal.handler.AbstractChannelCommandHandler#execute(org.eclipse.core.commands.ExecutionEvent, org.eclipse.tcf.protocol.IChannel, org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel, org.eclipse.tcf.te.tcf.processes.ui.internal.handler.AbstractChannelCommandHandler.DoneExecute)
+ */
+ @Override
+ protected void execute(final ExecutionEvent event, final IChannel channel, final IPeerModel node, final DoneExecute callback) {
+ Assert.isNotNull(event);
+ Assert.isNotNull(channel);
+ Assert.isNotNull(node);
+ Assert.isNotNull(callback);
+
+ // Get the shell
+ Shell shell = HandlerUtil.getActiveShell(event);
+ // Get the parent editor part
+ IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
+ IEditorPart editorPart = activePart != null ? (IEditorPart)activePart.getAdapter(IEditorPart.class) : null;
+ // Open the dialog
+ LaunchObjectDialog dialog = doCreateDialog(editorPart, shell);
+ if (dialog.open() == Window.OK) {
+ // Get the new launch attributes
+ Map<String, Object> launchAttributes = dialog.getLaunchAttributes();
+ if (launchAttributes != null) {
+ // Construct the launcher object
+ ProcessLauncher launcher = new ProcessLauncher();
+
+ // Add some additional options
+ launchAttributes.put(IProcessLauncher.PROP_PROCESS_ASSOCIATE_CONSOLE, Boolean.TRUE);
+
+ // Launch the process
+ IPropertiesContainer container = new PropertiesContainer();
+ container.setProperties(launchAttributes);
+ launcher.launch(channel.getRemotePeer(), container, new Callback() {
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void internalDone(Object caller, IStatus status) {
+ if (!status.isOK() && status.getSeverity() != IStatus.CANCEL) {
+ // Launch failed, pass on to the user
+ IStatusHandler[] handler = StatusHandlerManager.getInstance().getHandler(LaunchProcessesCommandHandler.class);
+ if (handler != null && handler.length > 0) {
+ IPropertiesContainer data = new PropertiesContainer();
+ data.setProperty(IStatusHandlerConstants.PROPERTY_TITLE, Messages.LaunchProcessesCommandHandler_error_title);
+ data.setProperty(IStatusHandlerConstants.PROPERTY_CONTEXT_HELP_ID, IContextHelpIds.LAUNCH_PROCESS_ERROR_DIALOG);
+ data.setProperty(IStatusHandlerConstants.PROPERTY_CALLER, caller != null ? caller : LaunchProcessesCommandHandler.this);
+
+ // Take the first status handler in the list
+ handler[0].handleStatus(status, data, null);
+ }
+ }
+ // Invoke the outer callback
+ callback.doneExecute(Status.OK_STATUS, null);
+ }
+ });
+ // Callback will be invoked once the launch is done
+ return;
+ }
+ }
+ // Invoke the outer callback
+ callback.doneExecute(Status.OK_STATUS, null);
+ }
+
+ /**
+ * Create the dialog object.
+ *
+ * @param part The active editor part or <code>null</code>.
+ * @param shell The shell or <code>null</code>.
+ * @return The dialog.
+ */
+ protected LaunchObjectDialog doCreateDialog(IEditorPart part, Shell shell) {
+ return new LaunchObjectDialog(part, shell);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/help/IContextHelpIds.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/help/IContextHelpIds.java
new file mode 100644
index 000000000..bc72ff3b3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/help/IContextHelpIds.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.help;
+
+import org.eclipse.tcf.te.tcf.processes.ui.activator.UIPlugin;
+
+/**
+ * Plugin context help id definitions.
+ */
+public interface IContextHelpIds {
+
+ /**
+ * Common context help id prefix.
+ */
+ public final static String PREFIX = UIPlugin.getUniqueIdentifier() + "."; //$NON-NLS-1$
+
+ /**
+ * Error dialog: execution failure in TcfDiscoveryAbstractChannelCommandHandler
+ */
+ public final static String CHANNEL_COMMAND_HANDLER_STATUS_DIALOG = PREFIX + "ChannelCommandHandlerStatusDialog"; //$NON-NLS-1$
+
+ /**
+ * Target Explorer details editor page: Process explorer
+ */
+ public final static String PROCESS_EXPLORER_EDITOR_PAGE = PREFIX + "ProcessExplorerEditorPage"; //$NON-NLS-1$
+
+ /**
+ * Launch object dialog.
+ */
+ public final static String LAUNCH_OBJECT_DIALOG = PREFIX + "LaunchObjectDialog"; //$NON-NLS-1$
+
+ /**
+ * Error dialog: remote process launch failed.
+ */
+ public final static String LAUNCH_PROCESS_ERROR_DIALOG = PREFIX + "LaunchProcessErrorDialog"; //$NON-NLS-1$
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.java
new file mode 100644
index 000000000..5dcc4966b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.nls;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Target Explorer TCF processes extensions UI plug-in externalized strings management.
+ */
+public class Messages extends NLS {
+
+ // The plug-in resource bundle name
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.processes.ui.nls.Messages"; //$NON-NLS-1$
+
+ /**
+ * Static constructor.
+ */
+ static {
+ // Load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ // **** Declare externalized string id's down here *****
+
+ public static String ProcessExplorerTreeControl_section_title;
+
+ public static String ProcessesTreeControl_column_name_label;
+ public static String ProcessesTreeControl_column_pid_label;
+ public static String ProcessesTreeControl_column_ppid_label;
+ public static String ProcessesTreeControl_column_state_label;
+ public static String ProcessesTreeControl_column_user_label;
+
+ public static String ProcessSelectionDialog_title;
+
+ public static String LaunchObjectDialog_title;
+ public static String LaunchObjectDialog_image_label;
+ public static String LaunchObjectDialog_arguments_label;
+ public static String LaunchObjectDialog_group_label;
+ public static String LaunchObjectDialog_lineseparator_label;
+ public static String LaunchObjectDialog_lineseparator_default;
+ public static String LaunchObjectDialog_lineseparator_lf;
+ public static String LaunchObjectDialog_lineseparator_crlf;
+ public static String LaunchObjectDialog_lineseparator_cr;
+
+ public static String LaunchProcessesCommandHandler_error_title;
+
+ public static String AbstractChannelCommandHandler_statusDialog_title;
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.properties
new file mode 100644
index 000000000..0ceb07332
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.properties
@@ -0,0 +1,28 @@
+#
+# org.eclipse.tcf.te.tcf.processes.ui
+# Externalized Strings.
+#
+
+ProcessExplorerTreeControl_section_title=Exploring Processes
+
+ProcessesTreeControl_column_name_label=Name
+ProcessesTreeControl_column_pid_label=PID
+ProcessesTreeControl_column_ppid_label=PPID
+ProcessesTreeControl_column_state_label=State
+ProcessesTreeControl_column_user_label=User
+
+ProcessSelectionDialog_title=Select Process to Attach
+
+LaunchObjectDialog_title=Launch Process
+LaunchObjectDialog_image_label=Process Image:
+LaunchObjectDialog_arguments_label=Process Arguments:
+LaunchObjectDialog_group_label=Process Line Separator Settings
+LaunchObjectDialog_lineseparator_label=Please specify the line separator used by the launched process.
+LaunchObjectDialog_lineseparator_default=Default
+LaunchObjectDialog_lineseparator_lf=LF
+LaunchObjectDialog_lineseparator_crlf=CRLF
+LaunchObjectDialog_lineseparator_cr=CR
+
+AbstractChannelCommandHandler_statusDialog_title=Error
+
+LaunchProcessesCommandHandler_error_title=Process Launch Failed

Back to the top