Drop old attempt to use SWTBot
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.classpath b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.classpath
deleted file mode 100644
index 64c5e31..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.gitignore b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.gitignore
deleted file mode 100644
index ae3c172..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/bin/
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.options b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.options
deleted file mode 100644
index 8c5da2d..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.options
+++ /dev/null
@@ -1,4 +0,0 @@
-org.eclipse.dltk.tcl.ui.tests.swtbot/Interpreter = true
-org.eclipse.dltk.tcl.ui.tests.swtbot/Project = true
-org.eclipse.dltk.tcl.ui.tests.swtbot/ProjectContent = true
-org.eclipse.dltk.tcl.ui.tests.swtbot/Launch = true
\ No newline at end of file
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.project b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.project
deleted file mode 100644
index 96abbc7..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.dltk.tcl.ui.tests.swtbot</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/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.settings/org.eclipse.jdt.core.prefs b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 7c7f29d..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,280 +0,0 @@
-#Tue Nov 02 21:06:53 CET 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-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.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-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=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=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=false
-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=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-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.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-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_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=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_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=do not 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=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not 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_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_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_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_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_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=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=80
-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=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.settings/org.eclipse.jdt.ui.prefs b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index c726d22..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Tue Nov 02 21:06:53 CET 2010
-eclipse.preferences.version=1
-formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile
-formatter_settings_version=11
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/META-INF/MANIFEST.MF b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/META-INF/MANIFEST.MF
deleted file mode 100644
index 5653ede..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.dltk.tcl.ui.tests.swtbot;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.dltk.ui.tests.swtbot.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.junit,
- org.eclipse.dltk.core,
- org.eclipse.dltk.core.tests,
- org.eclipse.dltk.tcl.ui,
- org.eclipse.dltk.launching,
- org.eclipse.dltk.ui,
- org.eclipse.dltk.debug.ui,
- org.eclipse.dltk.tcl.activestatedebugger,
- org.eclipse.dltk.tcl.debug,
- org.eclipse.dltk.tcl.core,
- org.eclipse.core.resources,
- org.eclipse.ltk.ui.refactoring,
- org.hamcrest,
- org.apache.log4j,
- org.eclipse.swtbot.eclipse.finder,
- org.eclipse.swtbot.swt.finder
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Vendor: %pluginProvider
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/build.properties b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/build.properties
deleted file mode 100644
index 6ee4717..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- workspace/,\
- test.xml
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/plugin.properties b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/plugin.properties
deleted file mode 100644
index 0d0c6c1..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/plugin.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-
-###############################################################################
-pluginProvider=Eclipse.org
-pluginName=Dynamic Languages Toolkit Tcl UI SWTBot Tests (Incubation)
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/Activator.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/Activator.java
deleted file mode 100644
index 1cb7114..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/Activator.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.dltk.tcl.ui.tests.swtbot";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
- * )
- */
- 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
- * )
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/AllTests.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/AllTests.java
deleted file mode 100644
index 8b5ceb8..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/AllTests.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.dltk.core.environment.EnvironmentManager;
-import org.eclipse.dltk.ui.tests.swtbot.complex.EditorTests;
-import org.eclipse.dltk.ui.tests.swtbot.complex.InterpreterTests;
-import org.eclipse.dltk.ui.tests.swtbot.complex.ProjectContentTests;
-import org.eclipse.dltk.ui.tests.swtbot.complex.ProjectTests;
-
-public class AllTests {
-
- public static Test suite() {
- EnvironmentManager.getEnvironments();
- TestSuite suite = new TestSuite("SWTBot tests for "
- + Activator.PLUGIN_ID);
- // $JUnit-BEGIN$
-
- suite.addTestSuite(ProjectTests.class);
- suite.addTestSuite(ProjectContentTests.class);
- suite.addTestSuite(EditorTests.class);
- suite.addTestSuite(InterpreterTests.class);
- // suite.addTestSuite(LaunchTests.class);
-
- // suite.addTest(new
- // ProjectContentTests("testCreateFolderByContextMenu"));
- // suite.addTest(new ProjectTests("testCreateTclProject006"));
-
- // suite.addTest(new InterpreterTests("testRemoveFromProject"));
- // suite.addTest(new InterpreterTests("testRemoveInterpreters"));
- // suite.addTest(new ProjectTests("testCreateTclProject005"));
- // suite.addTest(new ProjectTests("testCreateTclProject006"));
-
- // $JUnit-END$
- return suite;
- }
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/DltkTestsHelper.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/DltkTestsHelper.java
deleted file mode 100644
index cac39a6..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/DltkTestsHelper.java
+++ /dev/null
@@ -1,895 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.dltk.core.DLTKCore;
-import org.eclipse.dltk.core.DLTKLanguageManager;
-import org.eclipse.dltk.core.IDLTKLanguageToolkit;
-import org.eclipse.dltk.core.IScriptFolder;
-import org.eclipse.dltk.core.IScriptProject;
-import org.eclipse.dltk.core.ISourceModule;
-import org.eclipse.dltk.core.ModelException;
-import org.eclipse.dltk.core.environment.EnvironmentManager;
-import org.eclipse.dltk.core.environment.IEnvironment;
-import org.eclipse.dltk.core.environment.IFileHandle;
-import org.eclipse.dltk.core.tests.model.AbstractModelTests;
-import org.eclipse.dltk.debug.ui.interpreters.InterpretersUpdater;
-import org.eclipse.dltk.launching.IInterpreterInstall;
-import org.eclipse.dltk.launching.IInterpreterInstallType;
-import org.eclipse.dltk.launching.ScriptRuntime;
-import org.eclipse.dltk.launching.ScriptRuntime.DefaultInterpreterEntry;
-import org.eclipse.dltk.tcl.core.TclNature;
-import org.eclipse.swtbot.eclipse.finder.SWTEclipseBot;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
-import org.eclipse.swtbot.swt.finder.results.BoolResult;
-import org.eclipse.swtbot.swt.finder.results.VoidResult;
-import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-public class DltkTestsHelper extends AbstractModelTests {
-
- public static int RESOURCE_REFRESH_TIMEOUT = 1000;
- public static int INTERPRETER_REFRESH_TIMEOUT = 1000;
-
- public static boolean DEBUG = false;
-
- /**
- * Name of etalon project (See workspace folder).
- *
- * @see #setUpProject(String)
- */
- public static final String ETALON_PROJECT = "EtalonTclProject";
- /**
- * Name of empty project with default interpreter (See workspace folder).
- *
- * @see #setUpProject(String)
- */
- public static final String EMPTY_PROJECT = "EmptyTclProject";
-
- /**
- * Name of empty project without Interpreter Library (See workspace folder).
- *
- * @see #setUpProject(String)
- */
- public static final String EMPTY_PROJECT_WITHOUT_LIB = "EmptyTclProjectWithoutLib";
-
- /**
- * Name of empty project with alternative interpreter (See workspace
- * folder).
- *
- * @see #setUpProject(String)
- */
- public static final String EMPTY_PROJECT_WITH_ALT_INTERPR = "EmptyProjectWithAltInterpreter";
-
- // TODO: ???
- private static final String TEMP_DIR;
-
- public static final String DEF_INTERPRETER_ID = "DefaultTclInterpreter";
- public static final String DEF_INTERPRETER_PATH = TestMessages.DltkTestsHelper_Def_interpreter_path;
-
- public static final String ALT_INTERPRETER_ID = "AltTclInterpreter";
- public static final String ALT_INTERPRETER_PATH = TestMessages.DltkTestsHelper_Alt_interpreter_path;
-
- public static final String ALT_2_INTERPRETER_PATH = TestMessages.DltkTestsHelper_Atl_2_interpreter_path;
-
- public static final String TCL_PERSPECTIVE_ID = "org.eclipse.dltk.tcl.ui.TclPerspective";
-
- private SWTEclipseBot bot;
-
- static {
- String tmpDir = null;
- try {
- tmpDir = File.createTempFile("test", null).getParentFile()
- .getAbsolutePath();
- } catch (IOException ioEx) {
- tmpDir = TestMessages.DltkTestsHelper_temp_dir;
- }
- TEMP_DIR = tmpDir;
- }
-
- public DltkTestsHelper(String name, SWTEclipseBot bot) {
- super(Activator.PLUGIN_ID, name);
- this.bot = bot;
- }
-
- /**
- *
- * @throws CoreException
- */
- // public void waitForProjectToBuild() throws CoreException {
- // long startTime = 0;
- // if (DEBUG) {
- // startTime = System.currentTimeMillis();
- // debug("Start build project");
- // }
- // waitUntilIndexesReady();
- // ResourcesPlugin.getWorkspace()
- // .build(IncrementalProjectBuilder.FULL_BUILD,
- // new NullProgressMonitor());
- // waitForAutoBuild();
- // if (DEBUG) {
- // long time = System.currentTimeMillis() - startTime;
- // debug("Build project complete (" + time / 1000 + " sec)");
- // }
- // }
- /**
- *
- */
- public void closeDialogs() {
- try {
- SWTBotShell[] shells = bot.shells();
- for (int index = shells.length - 1; index > 0; index--) {
- debug("Test finished but exist opened window. Try to close this window...");
- System.out.println("Try to close shell:"
- + shells[index].getText());
- // Thread.sleep(3000);
- if (shells[index].isOpen()) {
- shells[index].close();
- }
- }
-
- bot.waitUntil(new DefaultCondition() {
- public String getFailureMessage() {
- return null;
- }
-
- public boolean test() throws Exception {
- return bot.shells().length > 1;
- }
- });
-
- } catch (Throwable thIgnore) {
- debug("Fatal error. Can't close windows");
- throw new RuntimeException(ErrorMessages.Common_internalFatalError,
- thIgnore);
- }
- }
-
- public void closeEditors() {
- try {
- for (SWTBotEclipseEditor editor : bot.editors()) {
- editor.close();
- }
-
- /*
- * bot.waitUntil(new DefaultCondition() { public String
- * getFailureMessage() { return null; }
- *
- * public boolean test() throws Exception { return
- * (DltkTestsHelper.this.bot.editors().size() == 0) &&
- * (SWTBotEclipseEditor.findEditors().size() == 0); } });
- */
- } catch (Throwable thIgnore) {
- debug("Fatal error. Can't close editor");
- throw new RuntimeException(ErrorMessages.Common_internalFatalError,
- thIgnore);
- }
- }
-
- /**
- *
- * @param project
- * @param sourceFolder
- * @param fileName
- * @param perspectiveId
- * @return
- * @throws Exception
- */
- // public IEditorPart openSourceFileInEditor(String project,
- // String sourceFolder, String fileName, String perspectiveId)
- // throws Exception {
- // ISourceModule cu = getSourceModule(project, sourceFolder, fileName);
- //
- // IWorkbenchWindow[] ww = PlatformUI.getWorkbench().getWorkbenchWindows();
- // PlatformUI.getWorkbench().showPerspective(perspectiveId, ww[0]);
- //
- // SWTBotShell[] sh = bot.shells();
- // sh[0].activate();
- //
- // return EditorUtility.openInEditor(cu);
- // }
- public String createExternalProject() throws IOException {
- File targetProject = new File(TEMP_DIR + "/ExternalTclProject");
- File sourceProject = new File(getSourceWorkspacePath(), ETALON_PROJECT);
-
- copyDirectory(sourceProject, targetProject);
-
- return targetProject.getAbsolutePath();
- }
-
- public IScriptProject setUpScriptProject(final String projectName)
- throws CoreException, IOException {
- return super.setUpScriptProject(projectName);
- }
-
- public void deleteProject(String projectName) throws CoreException {
- super.deleteProject(projectName);
- }
-
- public static IProject getProject(String name) {
- return AbstractModelTests.getProject(name);
- }
-
- public String getNature() {
- return TclNature.NATURE_ID;
- }
-
- public boolean isTclProject(IProject project) {
- IScriptProject tclProject = DLTKCore.create(project);
- IDLTKLanguageToolkit toolkit = DLTKLanguageManager
- .getLanguageToolkit(tclProject);
- return getNature().equals(toolkit.getNatureId());
- }
-
- public void openTclPerspective() {
- BoolResult result = new BoolResult() {
- public Boolean run() {
- IWorkbenchWindow[] ww = PlatformUI.getWorkbench()
- .getWorkbenchWindows();
- try {
- PlatformUI.getWorkbench().showPerspective(
- TCL_PERSPECTIVE_ID, ww[0]);
- return true;
- } catch (Throwable th) {
- return false;
- }
- }
- };
-
- boolean error = UIThreadRunnable.syncExec(bot.getDisplay(), result);
- assertTrue(ErrorMessages.Common_errOpenPerspective, error);
- }
-
- public void openJavaPerspective() {
- BoolResult result = new BoolResult() {
- public Boolean run() {
- IWorkbenchWindow[] ww = PlatformUI.getWorkbench()
- .getWorkbenchWindows();
- try {
- PlatformUI.getWorkbench().showPerspective(
- "org.eclipse.jdt.ui.JavaPerspective", ww[0]);
- return true;
- } catch (Throwable th) {
- return false;
- }
- }
- };
-
- boolean error = UIThreadRunnable.syncExec(bot.getDisplay(), result);
- assertTrue(ErrorMessages.Common_errOpenPerspective, error);
- }
-
- public List<IInterpreterInstall> getInterpreters() {
- List<IInterpreterInstall> result = new ArrayList<IInterpreterInstall>();
- IInterpreterInstallType[] types = getInterpreterTypes();
- for (int i = 0; i < types.length; i++) {
- IInterpreterInstallType type = types[i];
- IInterpreterInstall[] installs = type.getInterpreterInstalls();
- if (installs != null) {
- for (int j = 0; j < installs.length; j++) {
- IInterpreterInstall install = installs[j];
- result.add(install);
- }
- }
- }
- return result;
- }
-
- protected IInterpreterInstall createDefaultInterpreter()
- throws CoreException {
- IInterpreterInstallType[] types = getInterpreterTypes();
- IInterpreterInstall interpreter = createInterpreterInstall(
- DEF_INTERPRETER_PATH, DEF_INTERPRETER_ID, types[0]);
- ScriptRuntime.setDefaultInterpreterInstall(interpreter, null, false);
- return interpreter;
- }
-
- protected IInterpreterInstall createAltInterpreter() {
- IInterpreterInstallType[] types = getInterpreterTypes();
- IInterpreterInstall interpreter = createInterpreterInstall(
- ALT_INTERPRETER_PATH, ALT_INTERPRETER_ID, types[0]);
- return interpreter;
- }
-
- protected IInterpreterInstall createInterpreter(IPath path) {
- IInterpreterInstallType[] types = getInterpreterTypes();
- String name = path.lastSegment();
- IInterpreterInstall interpreter = createInterpreterInstall(
- path.toOSString(), name, types[0]);
- return interpreter;
- }
-
- public void clearInterpreters() {
- IInterpreterInstallType[] types = getInterpreterTypes();
- for (int indexType = 0; indexType < types.length; indexType++) {
- IInterpreterInstallType type = types[indexType];
- IInterpreterInstall[] installs = type.getInterpreterInstalls();
- for (int index = 0; index < installs.length; index++) {
- type.disposeInterpreterInstall(installs[index].getId());
- }
- }
- }
-
- public IInterpreterInstall getInterpreter(String id) {
- IInterpreterInstallType[] types = getInterpreterTypes();
- return types[0].findInterpreterInstall(id);
- }
-
- public IInterpreterInstall getInterpreterByName(String name) {
- IInterpreterInstallType[] types = getInterpreterTypes();
- return types[0].findInterpreterInstallByName(name);
- }
-
- protected IInterpreterInstallType[] getInterpreterTypes() {
- return ScriptRuntime.getInterpreterInstallTypes(getNature());
- }
-
- protected IInterpreterInstall createInterpreterInstall(String path,
- String id, IInterpreterInstallType type) {
- IFileHandle file = EnvironmentManager.getLocalEnvironment().getFile(
- new Path(path));
- if (!file.exists()) {
- return null;
- }
- IInterpreterInstall install = type.findInterpreterInstall(id);
-
- if (install == null)
- install = type.createInterpreterInstall(id);
-
- install.setName(id);
- install.setInstallLocation(file);
- install.setLibraryLocations(null);
- install.setEnvironmentVariables(null);
- return install;
- }
-
- public boolean isDefaultInterpreter(IInterpreterInstall interpreter) {
- final IEnvironment env = interpreter.getEnvironment();
- if (env == null) {
- return false;
- }
- final String environmentId = env.getId();
- String nature = interpreter.getInterpreterInstallType().getNatureId();
- DefaultInterpreterEntry defaultInterpreterID = new DefaultInterpreterEntry(
- nature, environmentId);
-
- IInterpreterInstall defInterpr = ScriptRuntime
- .getDefaultInterpreterInstall(defaultInterpreterID);
- return (interpreter == defInterpr);
- }
-
- protected IInterpreterInstall getInterpreterByIdOrName(String interpr) {
- IInterpreterInstall interpreter = getInterpreter(interpr);
- if (interpreter == null) {
- interpreter = getInterpreterByName(interpr);
- }
- return interpreter;
- }
-
- protected void interpreterUpdate(final IInterpreterInstall[] interpreters,
- final IInterpreterInstall[] defaultInterpreters) {
- VoidResult result = new VoidResult() {
- public void run() {
- InterpretersUpdater updater = new InterpretersUpdater();
- updater.updateInterpreterSettings(getNature(), interpreters,
- defaultInterpreters);
- }
- };
-
- UIThreadRunnable.syncExec(bot.getDisplay(), result);
- }
-
- // /////////////////////////////////////////////////////////////////////////
- //
- // Initialize methods
- //
- // /////////////////////////////////////////////////////////////////////////
- public String initExternalProject() {
- try {
- return createExternalProject();
- } catch (Throwable th) {
- throw new RuntimeException(ErrorMessages.Common_initError, th);
- }
- }
-
- public IInterpreterInstall initOnlyDefInterpreter() {
- IInterpreterInstall defInterpreter = initDefInterpreter();
- assertDefInterpreterExist();
-
- IInterpreterInstall[] interpreters = new IInterpreterInstall[] { defInterpreter };
- interpreterUpdate(interpreters, interpreters);
- return defInterpreter;
- }
-
- public IInterpreterInstall[] initDefAndAltInterpreters() {
- IInterpreterInstall defInterpreter = initDefInterpreter();
- assertDefInterpreterExist();
-
- IInterpreterInstall altInterpreter = initAltInterpreter();
- assertAltInterpreterExist();
-
- IInterpreterInstall[] allInterpreters = new IInterpreterInstall[] {
- defInterpreter, altInterpreter };
- IInterpreterInstall[] defInterpreters = new IInterpreterInstall[] { defInterpreter };
-
- interpreterUpdate(allInterpreters, defInterpreters);
- return allInterpreters;
- }
-
- public IInterpreterInstall[] init3Interpreters() {
- IInterpreterInstall defInterpreter = initDefInterpreter();
- assertDefInterpreterExist();
-
- IInterpreterInstall altInterpreter = initAltInterpreter();
- assertAltInterpreterExist();
-
- IPath path = new Path(DltkTestsHelper.ALT_2_INTERPRETER_PATH);
- IInterpreterInstall interpr = createInterpreter(path);
-
- IInterpreterInstall[] allInterpreters = new IInterpreterInstall[] {
- defInterpreter, altInterpreter, interpr };
- IInterpreterInstall[] defInterpreters = new IInterpreterInstall[] { defInterpreter };
-
- interpreterUpdate(allInterpreters, defInterpreters);
- return allInterpreters;
- }
-
- protected IInterpreterInstall initDefInterpreter() {
- try {
- return createDefaultInterpreter();
- } catch (Throwable th) {
- throw new RuntimeException(ErrorMessages.Common_initError, th);
- }
- }
-
- protected IInterpreterInstall initAltInterpreter() {
- try {
- return createAltInterpreter();
- } catch (Throwable th) {
- throw new RuntimeException(ErrorMessages.Common_initError, th);
- }
- }
-
- protected boolean isScriptFolder(IScriptProject project, IFolder folder)
- throws ModelException {
- if (folder == null || !folder.exists()) {
- return false;
- }
-
- IScriptFolder[] folders = project.getScriptFolders();
- for (int index = 0; index < folders.length; index++) {
- IResource resource = folders[index].getResource();
- if (resource == null) {
- continue;
- }
- if (folder.equals(resource)) {
- return true;
- }
- }
- return false;
- }
-
- // /////////////////////////////////////////////////////////////////////////
- //
- // Asserts
- //
- // /////////////////////////////////////////////////////////////////////////
-
- public void assertDefInterpreterExist() {
- assertInterpreterByIdOrName(DltkTestsHelper.DEF_INTERPRETER_ID,
- ErrorMessages.Common_defInterprNotFound);
- }
-
- public void assertAltInterpreterExist() {
- assertInterpreterByIdOrName(DltkTestsHelper.ALT_INTERPRETER_ID,
- ErrorMessages.Common_altInterprNotFound);
- }
-
- public void assertInterpretersEmpty() {
- assertInterpretersCount(0);
- }
-
- public void assertInterpretersCount(final int count) {
- try {
- bot.waitUntil(new DefaultCondition() {
- private String message;
-
- public String getFailureMessage() {
- return message;
- }
-
- public boolean test() throws Exception {
- message = ErrorMessages.Common_invalidInterprCount;
- int realInterpreterCount = getInterpreters().size();
- message = ErrorMessages.format(message, new Integer[] {
- new Integer(count),
- new Integer(realInterpreterCount) });
- return (realInterpreterCount == count);
- }
- }, INTERPRETER_REFRESH_TIMEOUT);
- } catch (TimeoutException ex) {
- fail(ex.getLocalizedMessage());
- }
- }
-
- public void assertInterpreter(String projectName, String interprId) {
- IScriptProject tclProject = DLTKCore.create(getProject(projectName));
- assertInterpreter(tclProject, interprId);
- }
-
- public void assertInterpreter(IScriptProject project, String interprId) {
- String errorMessage = ErrorMessages.Common_prjInterprNotFound;
- errorMessage = ErrorMessages.format(errorMessage, interprId);
- try {
- IInterpreterInstall interpreter = ScriptRuntime
- .getInterpreterInstall(project);
- assertNotNull(errorMessage, interpreter);
- assertEquals(interprId, interpreter.getName());
- } catch (CoreException ex) {
- fail(ex.getLocalizedMessage());
- }
- }
-
- protected void assertInterpreterByIdOrName(final String interpr,
- final String message) {
- try {
- bot.waitUntil(new DefaultCondition() {
- public String getFailureMessage() {
- return message;
- }
-
- public boolean test() throws Exception {
- return getInterpreterByIdOrName(interpr) != null;
- }
- }, INTERPRETER_REFRESH_TIMEOUT);
- } catch (TimeoutException ex) {
- fail(ex.getLocalizedMessage());
- }
- }
-
- public void assertTclProject(final String name) {
- try {
- bot.waitUntil(new DefaultCondition() {
- private String message;
-
- public String getFailureMessage() {
- return message;
- }
-
- public boolean test() throws Exception {
- IProject project = getProject(name);
- if (!project.exists()) {
- message = ErrorMessages.Project_errNotFound;
- return false;
- }
-
- message = ErrorMessages.Project_errNotTclProject;
- return isTclProject(project);
- }
- }, INTERPRETER_REFRESH_TIMEOUT);
- } catch (TimeoutException ex) {
- fail(ex.getLocalizedMessage());
- }
- }
-
- public void assertProjectDoesNotExist(final String projectName) {
- try {
- bot.waitUntil(new DefaultCondition() {
- public String getFailureMessage() {
- return ErrorMessages.Project_errDelete;
- }
-
- public boolean test() throws Exception {
- IProject project = getProject(projectName);
- return !project.exists();
- }
- }, RESOURCE_REFRESH_TIMEOUT);
- } catch (TimeoutException ex) {
- fail(ex.getLocalizedMessage());
- }
- }
-
- public void assertScriptExists(final String projectName, String srcPath,
- String fullyQualifiedName) {
-
- IProject project = getWorkspaceRoot().getProject(projectName);
- IPath projectPath = project.getFullPath();
- final String rootPath = projectPath.toString() + "/" + srcPath;
- final IPath sourcePath = new Path(fullyQualifiedName);
-
- String msg = ErrorMessages.ProjectContent_errScriptNotExist;
- final String errorMessage = ErrorMessages.format(msg,
- fullyQualifiedName);
-
- try {
- bot.waitUntil(new DefaultCondition() {
- public String getFailureMessage() {
- return errorMessage;
- }
-
- public boolean test() throws Exception {
- ISourceModule file = getSourceModule(projectName, rootPath,
- sourcePath);
-
- return (file != null && file.exists());
- }
- }, RESOURCE_REFRESH_TIMEOUT);
- } catch (TimeoutException ex) {
- fail(ex.getLocalizedMessage());
- }
- }
-
- public void assertFileExists(String projectName, String fullyQualifiedName) {
- String msg = ErrorMessages.ProjectContent_errFileNotExist;
- final String errorMessage = ErrorMessages.format(msg,
- fullyQualifiedName);
-
- final IProject project = getWorkspaceRoot().getProject(projectName);
- final IPath sourcePath = new Path(fullyQualifiedName);
-
- try {
- bot.waitUntil(new DefaultCondition() {
- public String getFailureMessage() {
- return errorMessage;
- }
-
- public boolean test() throws Exception {
- IFile file = project.getFile(sourcePath);
- return (file != null && file.exists());
- }
- }, RESOURCE_REFRESH_TIMEOUT);
- } catch (TimeoutException ex) {
- fail(ex.getLocalizedMessage());
- }
- }
-
- public void assertFolderExists(String projectName,
- final String fullyQualifiedName) {
- IProject project = getWorkspaceRoot().getProject(projectName);
- final IPath projectPath = project.getFullPath();
- final IPath sourcePath = new Path(fullyQualifiedName);
-
- String msg = ErrorMessages.ProjectContent_errFolderNotExist;
- final String errorMessage = ErrorMessages.format(msg,
- fullyQualifiedName);
-
- try {
- bot.waitUntil(new DefaultCondition() {
-
- public String getFailureMessage() {
- return errorMessage;
- }
-
- public boolean test() throws Exception {
- IFolder folder = getFolder(projectPath.append(sourcePath));
- return (folder != null && folder.exists());
- }
- }, RESOURCE_REFRESH_TIMEOUT);
- } catch (TimeoutException ex) {
- fail(ex.getLocalizedMessage());
- }
- }
-
- public void assertSourceFolderExists(final IScriptProject project,
- final String fullyQualifiedName) {
- final IFolder folder = project.getProject().getFolder(
- fullyQualifiedName);
-
- String msg = ErrorMessages.ProjectContent_errSourceFolderNotExist;
- final String errorMessage = ErrorMessages.format(msg,
- fullyQualifiedName);
-
- try {
- bot.waitUntil(new DefaultCondition() {
- public String getFailureMessage() {
- return errorMessage;
- }
-
- public boolean test() throws Exception {
- return isScriptFolder(project, folder);
- }
- }, RESOURCE_REFRESH_TIMEOUT);
- } catch (TimeoutException ex) {
- fail(ex.getLocalizedMessage());
- }
- }
-
- public void assertTreeStructure(SWTBotTree tree, String treePath) {
- StringTokenizer tok = new StringTokenizer(treePath, "/\\");
-
- if (!tok.hasMoreTokens())
- return;
- String s = tok.nextToken();
-
- SWTBotTreeItem item;
- try {
- item = tree.getTreeItem(s);
- } catch (WidgetNotFoundException e) {
- item = null;
- }
-
- assertNotNull("Element \"" + s + "\" not found in tree", item);
- item.expand();
-
- while (tok.hasMoreTokens()) {
- s = tok.nextToken();
- item = item.getNode(s);
- assertNotNull("Element " + s + " not found in tree", item);
- item.expand();
-
- }
-
- }
-
- public void assertExternalProject(String name) {
- IProject project = getProject(name);
- assertTrue(ErrorMessages.Project_errNotFound, project.exists());
- assertTrue(ErrorMessages.Project_errNotTclProject,
- isTclProject(project));
- // TODO: add implementation for compare of file system structure
- }
-
- public void assertFileDoesNotExist(String projectName,
- String fullyQualifiedName) {
-
- final IProject project = getWorkspaceRoot().getProject(projectName);
- final IPath sourcePath = new Path(fullyQualifiedName);
-
- String msg = ErrorMessages.ProjectContent_errFileExist;
- final String errorMessage = ErrorMessages.format(msg,
- fullyQualifiedName);
-
- try {
- bot.waitUntil(new DefaultCondition() {
-
- public String getFailureMessage() {
- return errorMessage;
- }
-
- public boolean test() throws Exception {
- IFile file = project.getFile(sourcePath);
- return (file == null || !file.exists());
- }
- }, RESOURCE_REFRESH_TIMEOUT);
- } catch (TimeoutException ex) {
- fail(ex.getLocalizedMessage());
- }
- }
-
- public void assertSourceFolderDoesNotExist(final IScriptProject project,
- String fullyQualifiedName) {
- final IFolder folder = project.getProject().getFolder(
- fullyQualifiedName);
-
- String msg = ErrorMessages.ProjectContent_errSourceFolderExist;
- final String errorMessage = ErrorMessages.format(msg,
- fullyQualifiedName);
-
- try {
- bot.waitUntil(new DefaultCondition() {
-
- public String getFailureMessage() {
- return errorMessage;
- }
-
- public boolean test() throws Exception {
- return !isScriptFolder(project, folder);
- }
- }, RESOURCE_REFRESH_TIMEOUT);
- } catch (TimeoutException ex) {
- fail(ex.getLocalizedMessage());
- }
- }
-
- public void assertFolderDoesNotExist(final IScriptProject project,
- final String fullyQualifiedName) {
- String msg = ErrorMessages.ProjectContent_errFolderExist;
- final String errorMessage = ErrorMessages.format(msg,
- fullyQualifiedName);
-
- try {
- bot.waitUntil(new DefaultCondition() {
-
- public String getFailureMessage() {
- return errorMessage;
- }
-
- public boolean test() throws Exception {
- IFolder folder = project.getProject().getFolder(
- fullyQualifiedName);
- return !isScriptFolder(project, folder);
- }
- }, RESOURCE_REFRESH_TIMEOUT);
- } catch (TimeoutException ex) {
- fail(ex.getLocalizedMessage());
- }
- }
-
- public void assertPerspective(final String perspectiveId) {
- BoolResult result = new BoolResult() {
- public Boolean run() {
- try {
- String activePerspId = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage()
- .getPerspective().getId();
- return perspectiveId.equals(activePerspId);
- } catch (Throwable th) {
- return false;
- }
- }
- };
-
- boolean error = UIThreadRunnable.syncExec(bot.getDisplay(), result);
- assertTrue(ErrorMessages.Common_invalidPerspective, error);
- }
-
- public void assertProjectContentExist(final IPath path) {
- try {
- bot.waitUntil(new DefaultCondition() {
-
- public String getFailureMessage() {
- return ErrorMessages.Project_errContentNotExist;
- }
-
- public boolean test() throws Exception {
- // TODO: add compare of content
- return path.toFile().exists();
- }
- }, RESOURCE_REFRESH_TIMEOUT);
- } catch (TimeoutException ex) {
- fail(ex.getLocalizedMessage());
- }
- }
-
- public void assertProjectContentDoesNotExist(final IPath path) {
- try {
- bot.waitUntil(new DefaultCondition() {
-
- public String getFailureMessage() {
- return ErrorMessages.Project_errContentExist;
- }
-
- public boolean test() throws Exception {
- return !path.toFile().exists();
- }
- }, RESOURCE_REFRESH_TIMEOUT);
- } catch (TimeoutException ex) {
- fail(ex.getLocalizedMessage());
- }
- }
-
- public static void debug(String message) {
- if (DEBUG) {
- System.out.println(message);
- }
- }
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/ErrorMessages.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/ErrorMessages.java
deleted file mode 100644
index 10d2042..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/ErrorMessages.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot;
-
-import java.text.MessageFormat;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ErrorMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.dltk.ui.tests.swtbot.ErrorMessages"; //$NON-NLS-1$
-
- public static String Common_internalFatalError;
- public static String Common_initError;
- public static String Common_defInterprNotFound;
- public static String Common_altInterprNotFound;
- public static String Common_prjInterprNotFound;
- public static String Common_prjInterprFound;
- public static String Common_invalidInterprCount;
- public static String Common_errOpenPerspective;
- public static String Common_invalidPerspective;
-
- public static String Common_errChecked;
- public static String Common_errEnabled;
- public static String Common_errNotChecked;
- public static String Common_errColumnCount;
-
- public static String Common_errSetFocus;
-
- public static String Project_errNotTclProject;
- public static String Project_errNotFound;
- public static String Project_errDelete;
- public static String Project_errClose;
- public static String Project_errOpen;
- public static String Project_errContentExist;
- public static String Project_errContentNotExist;
-
- public static String ProjectContent_errFolderNotExist;
- public static String ProjectContent_errSourceFolderNotExist;
- public static String ProjectContent_errScriptNotExist;
- public static String ProjectContent_errFileNotExist;
-
- public static String ProjectContent_errFolderExist;
- public static String ProjectContent_errSourceFolderExist;
- public static String ProjectContent_errScriptExist;
- public static String ProjectContent_errFileExist;
-
- public static String Interpreter_errInterprLibFound;
- public static String Interpreter_errInterprLibNotFound;
- public static String Interpreter_errSeveralInterprLibFound;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, ErrorMessages.class);
- }
-
- private ErrorMessages() {
- }
-
- public static String format(String message, Object object) {
- return MessageFormat.format(message, new Object[] { object });
- }
-
- public static String format(String message, Object[] objects) {
- return MessageFormat.format(message, objects);
- }
-
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/ErrorMessages.properties b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/ErrorMessages.properties
deleted file mode 100644
index 3fd8023..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/ErrorMessages.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-Common_internalFatalError=Internal error. Result of all tests of this TestCase is wrong.
-Common_initError=Internal error. Can not prepare data for test.
-
-Common_defInterprNotFound=Default Tcl interpreter not found.
-Common_altInterprNotFound=Alternative Tcl interpreter not found.
-Common_prjInterprNotFound=Project do not contain "{0}" interpreter.
-Common_prjInterprFound=Project have interpreter.
-Common_invalidInterprCount=Invalid interpreter count. Expected {0} but found {1}.
-Common_errOpenPerspective=Can't open Tcl perspective.
-Common_invalidPerspective=Invalid perspective.
-
-Common_errEnabled=Expected Widget "{0}" to be not enabled.
-Common_errChecked=Expected CheckBox "{0}" to be not checked.
-Common_errNotChecked=Expected CheckBox "{0}" to be checked.
-Common_errColumnCount=Invalid column count.
-
-Common_errSetFocus=Can not set focus
-
-Project_errNotFound=Project not found.
-Project_errNotTclProject=Project have not Tcl nature.
-Project_errDelete=Project did not deleted.
-Project_errClose=Project did not closed.
-Project_errOpen=Project did not opened.
-Project_errContentExist=Project content did not deleted.
-Project_errContentNotExist=Project content was deleted.
-
-ProjectContent_errFolderNotExist=Folder {0} does not exist.
-ProjectContent_errSourceFolderNotExist=Folder {0} does not exist or is not Source folder.
-ProjectContent_errScriptNotExist=Script {0} does not exist.
-ProjectContent_errFileNotExist=File {0} does not exist.
-
-ProjectContent_errFolderExist=Folder {0} exists while it should not.
-ProjectContent_errSourceFolderExist=Source folder {0} exists while it should not.
-ProjectContent_errScriptExist=Script {0} exists while it should not.
-ProjectContent_errFileExist=File {0} exists while it should not.
-
-Interpreter_errInterprLibFound=Expected empty list of Interpreter Libraries.
-Interpreter_errInterprLibNotFound="{0}" Interpreter Library not found.
-Interpreter_errSeveralInterprLibFound=Several Interpreter Library founded. Expected only one Interpreter Libraries.
\ No newline at end of file
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/TestMessages.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/TestMessages.java
deleted file mode 100644
index 5ef81f4..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/TestMessages.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot;
-
-import org.eclipse.osgi.util.NLS;
-
-public class TestMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.dltk.ui.tests.swtbot.TestMessages"; //$NON-NLS-1$
- public static String DltkTestsHelper_Alt_interpreter_path;
- public static String DltkTestsHelper_Atl_2_interpreter_path;
- public static String DltkTestsHelper_Def_interpreter_path;
- public static String DltkTestsHelper_temp_dir;
- public static String LaunchTests_dbgp_tcldebug;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, TestMessages.class);
- }
-
- private TestMessages() {
- }
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/TestMessages.properties b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/TestMessages.properties
deleted file mode 100644
index 134f572..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/TestMessages.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-DltkTestsHelper_Alt_interpreter_path=/usr/bin/tclsh
-DltkTestsHelper_Atl_2_interpreter_path=/usr/bin/wish8.4
-DltkTestsHelper_Def_interpreter_path=/usr/bin/tclsh8.4
-DltkTestsHelper_temp_dir=/tmp
-
-LaunchTests_dbgp_tcldebug=/home/dltk/apps/tcl_debug/dbgp_tcldebug
-
-#DltkTestsHelper_Alt_interpreter_path=C:/Tcl/bin/tclsh.exe
-#DltkTestsHelper_Atl_2_interpreter_path=C:/Tcl/bin/wish84.exe
-#DltkTestsHelper_Def_interpreter_path=C:/Tcl/bin/tclsh84.exe
-#DltkTestsHelper_temp_dir=D:/Temp
-
-#LaunchTests_dbgp_tcldebug=C:/Tcl/Komodo-TclRemoteDebugging-4.4.1-20896-win32-x86/dbgp_tcldebug.exe
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/EditorTests.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/EditorTests.java
deleted file mode 100644
index 6c2f46e..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/EditorTests.java
+++ /dev/null
@@ -1,750 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot.complex;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.dltk.ui.tests.swtbot.DltkTestsHelper;
-import org.eclipse.dltk.ui.tests.swtbot.operations.EditorOperations;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
-
-public class EditorTests extends SWTBotEclipseTestCase {
-
- private static boolean DEBUG;
-
- static {
- String value = Platform
- .getDebugOption("org.eclipse.dltk.tcl.ui.tests.swtbot/Editor");
- DEBUG = Boolean.valueOf(value).booleanValue();
- }
-
- private static final String PROJECT_NAME = "EditorProject";
- private static final String SCRIPT_PATH = "SourceFolder";
- private static final String SCRIPT_NAME = "Script1.tcl";
-
- private static final String NAMESPACE_1 = "ns1";
- private static final String NAMESPACE_2 = "ns2";
-
- private static final String VAR_GLOBAL = "globalVar";
- private static final String VAR_NAMESPACE = "nsVar";
- private static final String VAR_LOCAL = "localVar";
- private static final String VAR_PARAM = "param1";
- private static final String VAR_UP = "upVar";
- private static final String VAR_UP_PARAM = "param2";
-
- private static final String PROC_1 = "proc1";
- private static final String PROC_2 = "proc2";
- private static final String PROC_3 = "proc3";
- private static final String PROC_4 = "proc4";
- private static final String PROC_GLOBAL = "globalProc";
-
- private static final String FULL_PROC_2 = NAMESPACE_1 + "::" + PROC_2;
- private static final String FULL_PROC_3 = PROC_3;
- private static final String FULL_PROC_4 = PROC_4;
- private static final String FULL_PROC_GLOBAL = PROC_GLOBAL;
-
- private static final String CALL_PROC_2 = NAMESPACE_1 + "::" + PROC_2;
- private static final String CALL_PROC_3 = NAMESPACE_1 + "::" + PROC_3;
- private static final String CALL_PROC_4 = PROC_4;
- private static final String CALL_PROC_GLOBAL = PROC_GLOBAL;
-
- private static final String PROC_1_DECLARE = "proc " + PROC_1
- + " { param1 param2 } {";
-
- private DltkTestsHelper helper;
-
- public EditorTests(String name) {
- super();
- setName(name);
- helper = new DltkTestsHelper(name, bot);
- DltkTestsHelper.DEBUG = DEBUG;
- }
-
- public void setUp() throws Exception {
- DltkTestsHelper.debug(getName() + " starting...");
- super.setUp();
- helper.setUpSuite();
- // Close welcome page.
- closeWelcome();
- helper.openTclPerspective();
- helper.setUpScriptProject(PROJECT_NAME);
- DltkTestsHelper.debug(getName() + " started");
- }
-
- public void tearDown() throws Exception {
- DltkTestsHelper.debug(getName() + " finishing...");
- helper.closeDialogs();
- helper.closeEditors();
- helper.deleteProject(PROJECT_NAME);
- helper.tearDownSuite();
-
- super.tearDown();
- DltkTestsHelper.debug(getName() + " finished");
- }
-
- private String getDeclareProc(String fullName) {
- return "proc " + fullName + " { } {";
- }
-
- private String getDeclareVar(String name) {
- return "set " + name + " 0";
- }
-
- private String getCallVar(String name) {
- return "$" + name;
- }
-
- protected EditorOperations createOperations() {
- try {
- return new EditorOperations(bot, PROJECT_NAME, SCRIPT_PATH,
- SCRIPT_NAME);
- } catch (TimeoutException ex) {
- throw new RuntimeException(ex);
- } catch (WidgetNotFoundException ex) {
- throw new RuntimeException(ex);
- }
- }
-
- // ///////////////////////////////////////////////////////////////
- //
- // Navigate to a Tcl element's declaration using F3 key button
- //
- // ///////////////////////////////////////////////////////////////
- /**
- * Navigate to a Tcl element (procedure in global namespace) declaration
- * using F3 key button (DLTK-580).
- *
- */
- public void testGotoDeclaration001() {
- String declare = getDeclareProc(FULL_PROC_GLOBAL);
- createOperations().gotoDeclarationByF3(CALL_PROC_GLOBAL,
- FULL_PROC_GLOBAL, declare);
- }
-
- /**
- * Navigate to a Tcl element (procedure in other namespace) declaration
- * using F3 key button (DLTK-719).
- *
- */
- public void testGotoDeclaration002() {
- String declare = getDeclareProc(FULL_PROC_2);
- createOperations().gotoDeclarationByF3(CALL_PROC_2, FULL_PROC_2,
- declare);
- }
-
- /**
- * Navigate to a Tcl element (procedure in other namespace) declaration
- * using F3 key button (DLTK-719).
- *
- */
- public void testGotoDeclaration003() {
- String declare = getDeclareProc(FULL_PROC_3);
- createOperations().gotoDeclarationByF3(CALL_PROC_3, FULL_PROC_3,
- declare);
- }
-
- /**
- * Navigate to a Tcl element (procedure in current namespace) declaration
- * using F3 key button (DLTK-720).
- *
- */
- public void testGotoDeclaration004() {
- String declare = getDeclareProc(FULL_PROC_4);
- createOperations().gotoDeclarationByF3(CALL_PROC_4, FULL_PROC_4,
- declare);
- }
-
- /**
- * Navigate to a Tcl element (variable in global namespace) declaration
- * using F3 key button (DLTK-721).
- *
- */
- public void testGotoDeclaration005() {
- String declare = getDeclareVar(VAR_GLOBAL);
- String call = getCallVar(VAR_GLOBAL);
- createOperations().gotoDeclarationByF3(call, VAR_GLOBAL, declare);
- }
-
- /**
- * Navigate to a Tcl element (variable in current namespace) declaration
- * using F3 key button (DLTK-722).
- *
- */
- public void testGotoDeclaration006() {
- String declare = getDeclareVar(VAR_NAMESPACE);
- String call = getCallVar(VAR_NAMESPACE);
- createOperations().gotoDeclarationByF3(call, VAR_NAMESPACE, declare);
- }
-
- /**
- * Navigate to a Tcl element (local variable in procedure) declaration using
- * F3 key button (DLTK-723).
- *
- */
- public void testGotoDeclaration007() {
- String declare = getDeclareVar(VAR_LOCAL);
- String call = getCallVar(VAR_LOCAL);
- createOperations().gotoDeclarationByF3(call, VAR_LOCAL, declare);
- }
-
- /**
- * [Test] Navigate to a Tcl element (variable - parameter of procedure)
- * declaration using F3 key button (DLTK-724). <br>
- * <br>
- * proc proc1 { param1 param2 } {<br>
- * puts $param1<br>
- * }<br>
- *
- */
- /*
- * public void testGotoDeclaration008() { String call =
- * getCallVar(VAR_PARAM); createOperations().gotoDeclarationByF3(call,
- * VAR_PARAM, PROC_1_DECLARE); }
- */
-
- /**
- * [Test] Navigate to a Tcl element (upvar variable) declaration using F3
- * key button (DLTK-725).
- *
- */
- public void testGotoDeclaration009() {
- String call = getCallVar(VAR_UP);
- createOperations().gotoDeclarationByF3(call, VAR_UP,
- "upvar $" + VAR_UP_PARAM + " " + VAR_UP);
- }
-
- /**
- * [Test] Navigate to a Tcl element (variable - parameter of procedure)
- * declaration using F3 key button (DLTK-724). <br>
- * <br>
- * proc proc1 { param1 param2 } {<br>
- * upvar $param2 upVar<br>
- * }<br>
- *
- */
- /*
- * public void testGotoDeclaration010() { String call =
- * getCallVar(VAR_UP_PARAM); createOperations().gotoDeclarationByF3(call,
- * VAR_UP_PARAM, PROC_1_DECLARE); }
- */
-
- // ///////////////////////////////////////////////////////////////
- //
- // Navigate to a Tcl element's declaration using context menu
- //
- // ///////////////////////////////////////////////////////////////
- /**
- * Navigate to a Tcl element (procedure in global namespace) declaration
- * using context menu. (DLTK-579).
- *
- */
- public void testGotoDeclarationByContextMenu001() {
- String declare = getDeclareProc(FULL_PROC_GLOBAL);
- createOperations().gotoDeclarationByContextMenu(CALL_PROC_GLOBAL,
- FULL_PROC_GLOBAL, declare);
- }
-
- /**
- * Navigate to a Tcl element (procedure in other namespace) declaration
- * using context menu. (DLTK-727).
- *
- */
- public void testGotoDeclarationByContextMenuByContextMenu002() {
- String declare = getDeclareProc(FULL_PROC_2);
- createOperations().gotoDeclarationByContextMenu(CALL_PROC_2,
- FULL_PROC_2, declare);
- }
-
- /**
- * Navigate to a Tcl element (procedure in other namespace) declaration
- * (DLTK-727).
- *
- */
- public void testGotoDeclarationByContextMenu003() {
- String declare = getDeclareProc(FULL_PROC_3);
- createOperations().gotoDeclarationByContextMenu(CALL_PROC_3,
- FULL_PROC_3, declare);
- }
-
- /**
- * Navigate to a Tcl element (procedure in current namespace) declaration
- * (DLTK-729).
- *
- */
- public void testGotoDeclarationByContextMenu004() {
- String declare = getDeclareProc(FULL_PROC_4);
- createOperations().gotoDeclarationByContextMenu(CALL_PROC_4,
- FULL_PROC_4, declare);
- }
-
- /**
- * Navigate to a Tcl element (variable in global namespace) declaration
- * (DLTK-731).
- *
- */
- public void testGotoDeclarationByContextMenu005() {
- String declare = getDeclareVar(VAR_GLOBAL);
- String call = getCallVar(VAR_GLOBAL);
- createOperations().gotoDeclarationByContextMenu(call, VAR_GLOBAL,
- declare);
- }
-
- /**
- * Navigate to a Tcl element (variable in current namespace) declaration
- * (DLTK-733).
- *
- */
- public void testGotoDeclarationByContextMenu006() {
- String declare = getDeclareVar(VAR_NAMESPACE);
- String call = getCallVar(VAR_NAMESPACE);
- createOperations().gotoDeclarationByContextMenu(call, VAR_NAMESPACE,
- declare);
- }
-
- /**
- * Navigate to a Tcl element (local variable in procedure) declaration using
- * F3 key button (DLTK-735).
- *
- */
- public void testGotoDeclarationByContextMenu007() {
- String declare = getDeclareVar(VAR_LOCAL);
- String call = getCallVar(VAR_LOCAL);
- createOperations().gotoDeclarationByContextMenu(call, VAR_LOCAL,
- declare);
- }
-
- /**
- * [Test] Navigate to a Tcl element (variable - parameter of procedure)
- * declaration (DLTK-737). <br>
- * <br>
- * proc proc1 { param1 param2 } {<br>
- * puts $param1<br>
- * }<br>
- *
- */
- /*
- * public void testGotoDeclarationByContextMenu008() { String call =
- * getCallVar(VAR_PARAM);
- * createOperations().gotoDeclarationByContextMenu(call, VAR_PARAM,
- * PROC_1_DECLARE); }
- */
-
- /**
- * [Test] Navigate to a Tcl element (upvar variable) declaration using F3
- * key button (DLTK-739).
- *
- */
- public void testGotoDeclarationByContextMenu009() {
- String call = getCallVar(VAR_UP);
- createOperations().gotoDeclarationByContextMenu(call, VAR_UP,
- "upvar $" + VAR_UP_PARAM + " " + VAR_UP);
- }
-
- /**
- * [Test] Navigate to a Tcl element (variable - parameter of procedure)
- * declaration (DLTK-737). <br>
- * <br>
- * proc proc1 { param1 param2 } {<br>
- * upvar $param2 upVar<br>
- * }<br>
- *
- */
- /*
- * public void testGotoDeclarationByContextMenu010() { String call =
- * getCallVar(VAR_UP_PARAM);
- * createOperations().gotoDeclarationByContextMenu(call, VAR_UP_PARAM,
- * PROC_1_DECLARE); }
- */
-
- // ///////////////////////////////////////////////////////////////
- //
- // Navigate to a Tcl element's declaration using main menu
- //
- // ///////////////////////////////////////////////////////////////
- /**
- * Navigate to a Tcl element (procedure in global namespace) declaration
- * using "Navigate" menu (DLTK-578).
- *
- */
- public void testGotoDeclarationByMainMenu001() {
- String declare = getDeclareProc(FULL_PROC_GLOBAL);
- createOperations().gotoDeclarationByMainMenu(CALL_PROC_GLOBAL,
- FULL_PROC_GLOBAL, declare);
- }
-
- /**
- * Navigate to a Tcl element (procedure in other namespace) declaration
- * using main menu. (DLTK-728).
- *
- */
- public void testGotoDeclarationByMainMenu002() {
- String declare = getDeclareProc(FULL_PROC_2);
- createOperations().gotoDeclarationByMainMenu(CALL_PROC_2, FULL_PROC_2,
- declare);
- }
-
- /**
- * Navigate to a Tcl element (procedure in other namespace) declaration
- * (DLTK-728).
- *
- */
- public void testGotoDeclarationByMainMenu003() {
- String declare = getDeclareProc(FULL_PROC_3);
- createOperations().gotoDeclarationByMainMenu(CALL_PROC_3, FULL_PROC_3,
- declare);
- }
-
- /**
- * Navigate to a Tcl element (procedure in current namespace) declaration
- * (DLTK-730).
- *
- */
- public void testGotoDeclarationByMainMenu004() {
- String declare = getDeclareProc(FULL_PROC_4);
- createOperations().gotoDeclarationByMainMenu(CALL_PROC_4, FULL_PROC_4,
- declare);
- }
-
- /**
- * Navigate to a Tcl element (variable in global namespace) declaration
- * (DLTK-732).
- *
- */
- public void testGotoDeclarationByMainMenu005() {
- String declare = getDeclareVar(VAR_GLOBAL);
- String call = getCallVar(VAR_GLOBAL);
- createOperations().gotoDeclarationByMainMenu(call, VAR_GLOBAL, declare);
- }
-
- /**
- * Navigate to a Tcl element (variable in current namespace) declaration
- * (DLTK-734).
- *
- */
- public void testGotoDeclarationByMainMenu006() {
- String declare = getDeclareVar(VAR_NAMESPACE);
- String call = getCallVar(VAR_NAMESPACE);
- createOperations().gotoDeclarationByMainMenu(call, VAR_NAMESPACE,
- declare);
- }
-
- /**
- * Navigate to a Tcl element (local variable in procedure) declaration using
- * F3 key button (DLTK-736).
- *
- */
- public void testGotoDeclarationByMainMenu007() {
- String declare = getDeclareVar(VAR_LOCAL);
- String call = getCallVar(VAR_LOCAL);
- createOperations().gotoDeclarationByMainMenu(call, VAR_LOCAL, declare);
- }
-
- /**
- * [Test] Navigate to a Tcl element (variable - parameter of procedure)
- * declaration (DLTK-738). <br>
- * <br>
- * proc proc1 { param1 param2 } {<br>
- * puts $param1<br>
- * }<br>
- *
- */
- /*
- * public void testGotoDeclarationByMainMenu008() { String call =
- * getCallVar(VAR_PARAM); createOperations().gotoDeclarationByMainMenu(call,
- * VAR_PARAM, PROC_1_DECLARE); }
- */
-
- /**
- * [Test] Navigate to a Tcl element (upvar variable) declaration using F3
- * key button (DLTK-740).
- *
- */
- public void testGotoDeclarationByMainMenu009() {
- String call = getCallVar(VAR_UP);
- createOperations().gotoDeclarationByMainMenu(call, VAR_UP,
- "upvar $" + VAR_UP_PARAM + " " + VAR_UP);
- }
-
- /**
- * [Test] Navigate to a Tcl element (variable - parameter of procedure)
- * declaration (DLTK-738). <br>
- * <br>
- * proc proc1 { param1 param2 } {<br>
- * upvar $param2 upVar<br>
- * }<br>
- *
- */
- /*
- * public void testGotoDeclarationByMainMenu010() { String call =
- * getCallVar(VAR_UP_PARAM);
- * createOperations().gotoDeclarationByMainMenu(call, VAR_UP_PARAM,
- * PROC_1_DECLARE); }
- */
-
- //
- // /**
- // * Open call hierarchy by main menu (DLTK-581)
- // *
- // * @throws Exception
- // */
- // public void testOpenCallHierarchyMainMenu() throws Exception {
- //
- // openFileInEditor(BUILDPATH_PROJECT, "src/" + BUILDPATH_FILE1);
- //
- // SWTBotEclipseEditor editor = operations.getEditor(BUILDPATH_FILE1);
- // operations.setCursorPosition(editor, operations.locatePattern(editor,
- // "aaa", 1));
- //
- // bot.menu("Navigate").menu("Open Call Hierarchy").click();
- // SWTBotView view = bot.view("Call Hierarchy");
- //
- // SWTBotTree tree = bot.tree();
- // assertNotNull("Call hierarchy tree not found", tree);
- //
- // helper.assertTreeStructure(tree, "aaa()/bbb()");
- // view.close();
- //
- // }
- //
- // /**
- // * Open call hierarchy by popup menu (DLTK-582)
- // *
- // * @throws Exception
- // */
- // public void testOpenCallHierarchyPopupMenu() throws Exception {
- //
- // openFileInEditor(BUILDPATH_PROJECT, "src/" + BUILDPATH_FILE1);
- //
- // SWTBotEclipseEditor editor = operations.getEditor(BUILDPATH_FILE1);
- // operations.setCursorPosition(editor, operations.locatePattern(editor,
- // "aaa", 1));
- //
- // editor.contextMenu("Open Call Hierarchy").click();
- // SWTBotView view = bot.view("Call Hierarchy");
- //
- // SWTBotTree tree = bot.tree();
- // assertNotNull("Call hierarchy tree not found", tree);
- //
- // helper.assertTreeStructure(tree, "aaa()/bbb()");
- // view.close();
- //
- // }
- //
- // /**
- // * Open callee hierarchy by popup menu (DLTK-584)
- // *
- // * @throws Exception
- // */
- // public void testOpenCalleeHierarchyPopupMenu() throws Exception {
- //
- // openFileInEditor(BUILDPATH_PROJECT, "src/" + BUILDPATH_FILE2);
- //
- // SWTBotEclipseEditor editor = operations.getEditor(BUILDPATH_FILE2);
- // operations.setCursorPosition(editor, operations.locatePattern(editor,
- // "bbb"));
- //
- // editor.contextMenu("Open Call Hierarchy").click();
- // SWTBotView view = bot.view("Call Hierarchy");
- // bot.toolbarButtonWithTooltip("Show Callee Hierarchy").click();
- //
- // SWTBotTree tree = bot.tree();
- // assertNotNull("Call hierarchy tree not found", tree);
- //
- // helper.assertTreeStructure(tree, "bbb()/aaa()");
- // view.close();
- //
- // }
- //
- // /**
- // * Open callee hierarchy by main menu (DLTK-583)
- // *
- // * @throws Exception
- // */
- // public void testOpenCalleeHierarchyMainMenu() throws Exception {
- //
- // openFileInEditor(BUILDPATH_PROJECT, "src/" + BUILDPATH_FILE2);
- //
- // SWTBotEclipseEditor editor = operations.getEditor(BUILDPATH_FILE2);
- // operations.setCursorPosition(editor, operations.locatePattern(editor,
- // "bbb"));
- //
- // bot.menu("Navigate").menu("Open Call Hierarchy").click();
- // SWTBotView view = bot.view("Call Hierarchy");
- //
- // bot.toolbarButtonWithTooltip("Show Callee Hierarchy").click();
- //
- // SWTBotTree tree = bot.tree();
- // assertNotNull("Call hierarchy tree not found", tree);
- //
- // helper.assertTreeStructure(tree, "bbb()/aaa()");
- // view.close();
- //
- // }
- //
- // /**
- // * Find declarations in workspace (DLTK-586)
- // *
- // * @throws Exception
- // */
- // public void testFindDeclarationsWorkspace() throws Exception {
- // openFileInEditor(BUILDPATH_PROJECT, "src/" + BUILDPATH_FILE1);
- //
- // SWTBotEclipseEditor editor = operations.getEditor(BUILDPATH_FILE1);
- // operations.setCursorPosition(editor, operations.locatePattern(editor,
- // "aaa", 1));
- //
- // editor.contextMenu("Search").menu("Declarations").menu("Workspace")
- // .click();
- // // Thread.sleep(10000);
- // SWTBotView view = bot.view("Search");
- //
- // SWTBotTree tree = bot.tree();
- // assertNotNull("Declarations tree not found", tree);
- //
- // helper.assertTreeStructure(tree, "(default package) - src - "
- // + BUILDPATH_PROJECT + "/" + BUILDPATH_FILE1 + "/aaa()");
- //
- // }
- //
- // /**
- // * Find declarations in project (DLTK-587)
- // *
- // * @throws Exception
- // */
- // public void testFindDeclarationsProject() throws Exception {
- // openFileInEditor(BUILDPATH_PROJECT, "src/" + BUILDPATH_FILE1);
- //
- // SWTBotEclipseEditor editor = operations.getEditor(BUILDPATH_FILE1);
- // operations.setCursorPosition(editor, operations.locatePattern(editor,
- // "aaa", 1));
- //
- // editor.contextMenu("Search").menu("Declarations").menu("Project")
- // .click();
- // // Thread.sleep(10000);
- // SWTBotView view = bot.view("Search");
- //
- // SWTBotTree tree = bot.tree();
- // assertNotNull("Declarations tree not found", tree);
- //
- // helper.assertTreeStructure(tree, "(default package) - src - "
- // + BUILDPATH_PROJECT + "/" + BUILDPATH_FILE1 + "/aaa()");
- //
- // }
- //
- // /**
- // * Find declarations in hierarchy (DLTK-585)
- // *
- // * @throws Exception
- // */
- // public void testFindDeclarationsHierarchy() throws Exception {
- // openFileInEditor(BUILDPATH_PROJECT, "src/" + BUILDPATH_FILE1);
- //
- // SWTBotEclipseEditor editor = operations.getEditor(BUILDPATH_FILE1);
- // operations.setCursorPosition(editor, operations.locatePattern(editor,
- // "aaa", 1));
- //
- // editor.contextMenu("Search").menu("Declarations").menu("Hierarchy")
- // .click();
- // // Thread.sleep(10000);
- // SWTBotView view = bot.view("Search");
- //
- // SWTBotTree tree = bot.tree();
- // assertNotNull("Declarations tree not found", tree);
- //
- // helper.assertTreeStructure(tree, "(default package) - src - "
- // + BUILDPATH_PROJECT + "/" + BUILDPATH_FILE1 + "/aaa()");
- //
- // }
- //
- // /**
- // * Find references in hierarchy (DLTK-590)
- // *
- // * @throws Exception
- // */
- // public void testFindReferencesHierarchy() throws Exception {
- // openFileInEditor(BUILDPATH_PROJECT, "src/" + BUILDPATH_FILE1);
- //
- // SWTBotEclipseEditor editor = operations.getEditor(BUILDPATH_FILE1);
- // operations.setCursorPosition(editor, operations.locatePattern(editor,
- // "aaa"));
- //
- // editor.contextMenu("Search").menu("References").menu("Hierarchy")
- // .click();
- // // Thread.sleep(10000);
- // SWTBotView view = bot.view("Search");
- //
- // SWTBotTree tree = bot.tree();
- // assertNotNull("Declarations tree not found", tree);
- //
- // helper.assertTreeStructure(tree, "(default package) - src - "
- // + BUILDPATH_PROJECT + "/" + BUILDPATH_FILE1);
- //
- // helper.assertTreeStructure(tree, "(default package) - src - "
- // + BUILDPATH_PROJECT + "/" + BUILDPATH_FILE2 + "/" + "bbb()");
- //
- // }
- //
- // /**
- // * Find references in project (DLTK-588)
- // *
- // * @throws Exception
- // */
- // public void testFindReferencesProject() throws Exception {
- // openFileInEditor(BUILDPATH_PROJECT, "src/" + BUILDPATH_FILE1);
- //
- // SWTBotEclipseEditor editor = operations.getEditor(BUILDPATH_FILE1);
- // operations.setCursorPosition(editor, operations.locatePattern(editor,
- // "aaa"));
- //
- // editor.contextMenu("Search").menu("References").menu("Project").click();
- // // Thread.sleep(10000);
- // SWTBotView view = bot.view("Search");
- //
- // SWTBotTree tree = bot.tree();
- // assertNotNull("Declarations tree not found", tree);
- //
- // helper.assertTreeStructure(tree, "(default package) - src - "
- // + BUILDPATH_PROJECT + "/" + BUILDPATH_FILE1);
- //
- // helper.assertTreeStructure(tree, "(default package) - src - "
- // + BUILDPATH_PROJECT + "/" + BUILDPATH_FILE2 + "/" + "bbb()");
- //
- // }
- //
- // /**
- // * Find references in workspace (DLTK-589)
- // *
- // * @throws Exception
- // */
- // public void testFindReferencesWorkspace() throws Exception {
- // openFileInEditor(BUILDPATH_PROJECT, "src/" + BUILDPATH_FILE1);
- //
- // SWTBotEclipseEditor editor = operations.getEditor(BUILDPATH_FILE1);
- // operations.setCursorPosition(editor, operations.locatePattern(editor,
- // "aaa"));
- //
- // editor.contextMenu("Search").menu("References").menu("Workspace")
- // .click();
- // // Thread.sleep(10000);
- // SWTBotView view = bot.view("Search");
- //
- // SWTBotTree tree = bot.tree();
- // assertNotNull("Declarations tree not found", tree);
- //
- // helper.assertTreeStructure(tree, "(default package) - src - "
- // + BUILDPATH_PROJECT + "/" + BUILDPATH_FILE1);
- //
- // helper.assertTreeStructure(tree, "(default package) - src - "
- // + BUILDPATH_PROJECT + "/" + BUILDPATH_FILE2 + "/" + "bbb()");
- //
- // }
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/InterpreterTests.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/InterpreterTests.java
deleted file mode 100644
index 3995914..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/InterpreterTests.java
+++ /dev/null
@@ -1,443 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot.complex;
-
-import java.io.IOException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.dltk.core.IScriptProject;
-import org.eclipse.dltk.launching.IInterpreterInstall;
-import org.eclipse.dltk.launching.ScriptRuntime;
-import org.eclipse.dltk.ui.tests.swtbot.DltkTestsHelper;
-import org.eclipse.dltk.ui.tests.swtbot.ErrorMessages;
-import org.eclipse.dltk.ui.tests.swtbot.operations.InterpreterOperations;
-
-public class InterpreterTests extends SWTBotEclipseTestCase {
-
- private static boolean DEBUG;
-
- static {
- String value = Platform
- .getDebugOption("org.eclipse.dltk.tcl.ui.tests.swtbot/Interpreter");
- DEBUG = Boolean.valueOf(value).booleanValue();
- }
-
- private String projectName;
-
- private DltkTestsHelper helper;
-
- public InterpreterTests(String name) {
- super();
- setName(name);
- helper = new DltkTestsHelper(name, bot);
- DltkTestsHelper.DEBUG = DEBUG;
- }
-
- public void setUp() throws Exception {
- DltkTestsHelper.debug(getName() + " starting...");
- super.setUp();
- helper.setUpSuite();
- // Close welcome page.
- closeWelcome();
- helper.openTclPerspective();
- DltkTestsHelper.debug(getName() + " started");
- }
-
- public void tearDown() throws Exception {
- DltkTestsHelper.debug(getName() + " finishing...");
- helper.closeDialogs();
-
- if (projectName != null) {
- helper.deleteProject(projectName);
- projectName = null;
- }
- helper.clearInterpreters();
- helper.tearDownSuite();
-
- super.tearDown();
- DltkTestsHelper.debug(getName() + " finished");
- }
-
- /**
- * Create an interpreter using add button. (DLTK-510)<br>
- * <br>
- *
- * 1. Open Main menu Window->Preferences<br>
- * 2. Expand Tcl/Interpreters<br>
- * 3. Add 2 Interpreters with use "Add..." buttons<br>
- * <br>
- * Expected:<br>
- * 1. System contain 2 interpreters<br>
- * 2. First interpreter is default
- *
- */
- public void testCreate() {
- helper.assertInterpretersEmpty();
-
- new InterpreterOperations(bot).createInterpreter(
- DltkTestsHelper.DEF_INTERPRETER_PATH,
- DltkTestsHelper.DEF_INTERPRETER_ID, true, 0);
-
- new InterpreterOperations(bot).createInterpreter(
- DltkTestsHelper.ALT_INTERPRETER_PATH,
- DltkTestsHelper.ALT_INTERPRETER_ID, false, 1);
-
- helper.assertDefInterpreterExist();
- helper.assertAltInterpreterExist();
-
- IInterpreterInstall interpr = helper
- .getInterpreterByName(DltkTestsHelper.DEF_INTERPRETER_ID);
- assertTrue(helper.isDefaultInterpreter(interpr));
-
- interpr = helper
- .getInterpreterByName(DltkTestsHelper.ALT_INTERPRETER_ID);
- assertFalse(helper.isDefaultInterpreter(interpr));
- }
-
- /**
- * Change default interpreter. (DLTK-602)<br>
- * <br>
- *
- * Predefined conditions:<br>
- * 1. System contain 2 interpreters (Default and Alternative) <br>
- * <br>
- * Actions:<br>
- * 1. Open Interpreters Preferences page<br>
- * - Main menu Window->Preferences<br>
- * - Select in tree Tcl->Interpreters<br>
- * Expected table with 2 interpreters. Row with default interpreter is
- * checked.<br>
- * 2. Click to checkbox in table with alternative interpreter <br>
- * <br>
- * Expected:<br>
- * 1. Alternative interpreter is default
- *
- */
- public void testChangeDefaultInterpreter() {
- IInterpreterInstall[] interpreters = helper.initDefAndAltInterpreters();
- helper.isDefaultInterpreter(interpreters[0]);
-
- new InterpreterOperations(bot).changeDefaultInterpreter();
-
- helper.isDefaultInterpreter(interpreters[1]);
- }
-
- /**
- * Remove default interpreter. (DLTK-635)<br>
- * <br>
- * Predefined conditions:<br>
- * 1. System contain 2 interpreters (Default and Alternative)<br>
- * <br>
- * Actions:<br>
- * 1. Open Interpreters Preferences page<br>
- * Expected table with 2 interpreters. Row with default interpreter is
- * checked.<br>
- * <br>
- * 2. Select row with Default Interpreter and click "Remove" button<br>
- * Expected: Alternative interpreter is default<br>
- */
- public void testRemoveDefaultInterpreter() {
- IInterpreterInstall interpr = helper.initDefAndAltInterpreters()[0];
- helper.isDefaultInterpreter(interpr);
-
- new InterpreterOperations(bot).removeDefaultInterpreter();
-
- helper.assertInterpretersCount(1);
-
- interpr = (IInterpreterInstall) helper.getInterpreters().get(0);
- assertEquals(interpr.getId(), DltkTestsHelper.ALT_INTERPRETER_ID);
- assertTrue(helper.isDefaultInterpreter(interpr));
- }
-
- /**
- * Remove several interpreters. (DLTK-644)<br>
- * <br>
- * Predefined conditions:<br>
- * 1. System contain 3 interpreters<br>
- * <br>
- * Actions:<br>
- * 1. Open Interpreters Preferences page<br>
- * Expected table with 3 interpreters. Row with default interpreter is
- * checked.<br>
- * <br>
- * 2 Select first and last interpreters and click "Remove" button<br>
- * <br>
- * Expected:<br>
- * One interpreter<br>
- */
- public void testRemoveInterpreters() {
- IInterpreterInstall[] interpreters = helper.init3Interpreters();
- helper.isDefaultInterpreter(interpreters[0]);
- helper.assertInterpretersCount(3);
-
- new InterpreterOperations(bot).removeInterpreters();
-
- helper.assertInterpretersCount(1);
-
- IInterpreterInstall interpr = (IInterpreterInstall) helper
- .getInterpreters().get(0);
- assertEquals(interpr.getId(), DltkTestsHelper.DEF_INTERPRETER_ID);
- }
-
- /**
- * Remove all interpreters. (DLTK-645)<br>
- * <br>
- * Predefined conditions:<br>
- * 1. System contain 1 interpreter<br>
- * <br>
- * Actions:<br>
- * 1. Open Interpreters Preferences page<br>
- * Expected table with 1 interpreters.<br>
- * <br>
- * 2 Select row and click "Remove" button<br>
- * <br>
- * Expected:<br>
- * List of interpreters is empty<br>
- * Error (Warning) message<br>
- */
- public void testRemoveAllInterpreters() {
- helper.initOnlyDefInterpreter();
- new InterpreterOperations(bot).removeAllInterpreters();
- helper.assertInterpretersEmpty();
- }
-
- /**
- * Add interpreter to a project with use Script Explorer context menu
- * "Properties". (DLTK-512) <br>
- *
- * Predefined conditions:<br>
- * 1. System contain 2 Tcl interpreter (Default and Alternative)<br>
- * 2. Workspace contain Tcl project without Interpreter Libraries<br>
- * <br>
- * Actions:<br>
- * 1. Open Build Path/Libraries property page:<br>
- * - Script Explorer "Properties".<br>
- * - Tree Tcl/Build path.<br>
- * - Page Libraries.<br>
- * Expected empty list<br>
- * 2. Add Tcl Interpreter Library<br>
- * - Click to "Add Library" button<br>
- * - Select "Tcl Interpreter Library" and click to "Next"<br>
- * - Add interpreter:<br>
- * - Select radio "Alternate interpreter"<br>
- * - Selected from combo alternative interpreter<br>
- * - Click "Finish" button<br>
- * 3. Close all dialogs with use "OK" button<br>
- * <br>
- * Expected:<br>
- * 1. Project contain specified Interpreter Library<br>
- *
- */
- public void testAdd001() {
- helper.initDefAndAltInterpreters();
-
- IScriptProject project = initProject(projectName = DltkTestsHelper.EMPTY_PROJECT_WITHOUT_LIB);
-
- new InterpreterOperations(bot).addInterpreter001(projectName);
-
- helper.assertInterpreter(project, DltkTestsHelper.ALT_INTERPRETER_ID);
- }
-
- /**
- * Add interpreter to a project with use Script Explorer context menu
- * "Build Path/Configure Build Path...". (DLTK-512)<br>
- *
- * Predefined conditions:<br>
- * 1. System contain 2 Tcl interpreter (Default and Alternative)<br>
- * 2. Workspace contain Tcl project without Interpreter Libraries<br>
- * <br>
- * Actions:<br>
- * 1. Open Build Path/Libraries property page:<br>
- * - Script Explorer context menu "Build Path/Configure Build Path...".<br>
- * - Page Libraries.<br>
- * Expected empty list<br>
- * 2. Add Tcl Interpreter Library<br>
- * - Click to "Add Library" button<br>
- * - Select "Tcl Interpreter Library" and click to "Next"<br>
- * - Add interpreter: click "Finish" button (radio
- * "Workspace Default interpreter" must be selected)<br>
- * 3. Close all dialogs with use "OK" button<br>
- * <br>
- * Expected:<br>
- * 1. Project contain specified Interpreter Library<br>
- */
-// public void testAdd002() {
-// helper.initDefAndAltInterpreters();
-//
-// IScriptProject project = initProject(projectName = DltkTestsHelper.EMPTY_PROJECT_WITHOUT_LIB);
-// new InterpreterOperations(bot).addInterpreter002(projectName);
-//
-// helper.assertInterpreter(project, DltkTestsHelper.DEF_INTERPRETER_ID);
-// }
-
- /**
- * Try to add several Interpreter Libraries to a project. (DLTK-646)<br>
- * <br>
- * Predefined conditions:<br>
- * 1. System contain 2 Tcl interpreter (Default and Alternative)<br>
- * 2. Workspace contain Tcl project with Default Interpreter Libraries<br>
- * <br>
- * Actions:<br>
- * 1. Open Build Path/Libraries property page<br>
- * Expected list with one Interpreter Libraries<br>
- * 2. Add Tcl Interpreter Library<br>
- * - Click to "Add Library" button<br>
- * - Select "Tcl Interpreter Library" and click to "Next"<br>
- * - Add alternative interpreter: Select radio "Alternate interpreter",
- * selected from combo alternative Interpreter and click "Finish" button<br>
- * <br>
- * Expected:<br>
- * 1. Error dialog with message about several Interpreter Libraries<br>
- */
- public void testAdd003() {
- helper.initDefAndAltInterpreters();
-
- IScriptProject project = initProject(projectName = DltkTestsHelper.EMPTY_PROJECT);
- helper.assertInterpreter(project, DltkTestsHelper.DEF_INTERPRETER_ID);
-
- new InterpreterOperations(bot).addInterpreter003(projectName);
-
- helper.assertInterpreter(project, DltkTestsHelper.DEF_INTERPRETER_ID);
- }
-
- /**
- * Set default interpreter to a project. (DLTK-513)<br>
- * <br>
- * Predefined conditions:<br>
- * 1. System contain 2 Tcl interpreter (Default and Alternative)<br>
- * 2. Workspace contain Tcl project with Alternative Interpreter Library<br>
- * <br>
- * Actions:<br>
- * 1. Open Build Path/Libraries property page<br>
- * Expect list with one element (Alternative Interpreter Library)<br>
- * 2. Edit Tcl Interpreter Library<br>
- * - Click to "Edit..." button<br>
- * Expect "Edit Library" dialog with selected "Alternative Interpreter"
- * radio<br>
- * - Select "Workspace Default Interpreter" radio and click to "Finish"<br>
- * <br>
- * Expected:<br>
- * 1. Project contain Default Interpreter Library<br>
- *
- */
- public void testSetDefault() {
- helper.initDefAndAltInterpreters();
-
- IScriptProject project = initProject(projectName = DltkTestsHelper.EMPTY_PROJECT_WITH_ALT_INTERPR);
- helper.assertInterpreter(project, DltkTestsHelper.ALT_INTERPRETER_ID);
-
- new InterpreterOperations(bot).changeInterpreter001(projectName);
-
- helper.assertInterpreter(project, DltkTestsHelper.DEF_INTERPRETER_ID);
- }
-
- /**
- * Set alternative interpreter to a project. (DLTK-514)<br>
- *<br>
- * Predefined conditions:<br>
- * 1. System contain 2 Tcl interpreter (Default and Alternative)<br>
- * 2. Workspace contain Tcl project with Default Interpreter Library<br>
- * <br>
- * Actions:<br>
- * 1. Open Build Path/Libraries property page<br>
- * Expect list with one element (Default Interpreter Library)<br>
- * 2. Edit Tcl Interpreter Library<br>
- * - Click to "Edit..." button<br>
- * Expect "Edit Library" dialog with selected ""Workspace Default
- * Interpreter" radio<br>
- * - Select "Alternative Interpreter" radio, select Altertative Interpreter
- * from combobox and click to "Finish"<br>
- * <br>
- * Expected:<br>
- * 1. Project contain Alternative Interpreter Library<br>
- */
- public void testSetAlternative() {
- helper.initDefAndAltInterpreters();
-
- IScriptProject project = initProject(projectName = DltkTestsHelper.EMPTY_PROJECT);
- helper.assertInterpreter(project, DltkTestsHelper.DEF_INTERPRETER_ID);
-
- new InterpreterOperations(bot).changeInterpreter002(projectName);
-
- helper.assertInterpreter(project, DltkTestsHelper.ALT_INTERPRETER_ID);
- }
-
- /**
- * Remove interpreter from a project. (DLTK-515)<br>
- *<br>
- * Predefined conditions:<br>
- * 1. System contain Default Tcl interpreter<br>
- * 2. Workspace contain Tcl project with Default Interpreter Library<br>
- * <br>
- * Actions:<br>
- * 1. Open Build Path/Libraries property page<br>
- * Expect list with one element (Default Interpreter Library)<br>
- * 2. Remove Tcl Interpreter Library<br>
- * - Click to "Remove" button<br>
- * <br>
- * Expected:<br>
- * 1. Project have not Interpreter Library<br>
- */
- public void testRemoveFromProject() {
- helper.initOnlyDefInterpreter();
- IScriptProject project = initProject(projectName = DltkTestsHelper.EMPTY_PROJECT);
- helper.assertInterpreter(project, DltkTestsHelper.DEF_INTERPRETER_ID);
-
- new InterpreterOperations(bot).removeInterpreter(projectName);
-
- assertInterpreterEmpty(project);
- }
-
- // /////////////////////////////////////////////////////////////////////////
- //
- // Initialize methods
- //
- // /////////////////////////////////////////////////////////////////////////
- protected IScriptProject initProject(String projectName) {
- IScriptProject result = null;
- try {
- this.projectName = projectName;
-
- result = helper.setUpScriptProject(projectName);
- assertTrue(ErrorMessages.Project_errNotFound, result != null);
-
- IProject project = result.getProject();
- assertTrue(ErrorMessages.Project_errNotFound, project != null
- && project.exists());
-
- return result;
- } catch (IOException ex) {
- throw new RuntimeException(ErrorMessages.Common_initError, ex);
- } catch (CoreException ex) {
- throw new RuntimeException(ErrorMessages.Common_initError, ex);
- }
- }
-
- // /////////////////////////////////////////////////////////////////////////
- //
- // Assert methods
- //
- // /////////////////////////////////////////////////////////////////////////
- public void assertInterpreterEmpty(IScriptProject project) {
- String errorMessage = ErrorMessages.Common_prjInterprFound;
- try {
- IInterpreterInstall interpreter = ScriptRuntime
- .getInterpreterInstall(project);
- assertNull(errorMessage, interpreter);
- } catch (CoreException ex) {
- fail(errorMessage);
- }
- }
-
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/LaunchTests.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/LaunchTests.java
deleted file mode 100644
index f67ec7c..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/LaunchTests.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot.complex;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.dltk.core.IScriptProject;
-import org.eclipse.dltk.core.environment.EnvironmentManager;
-import org.eclipse.dltk.core.environment.EnvironmentPathUtils;
-import org.eclipse.dltk.core.environment.IFileHandle;
-import org.eclipse.dltk.core.internal.environment.LocalEnvironment;
-import org.eclipse.dltk.core.tests.launching.IFileVisitor;
-import org.eclipse.dltk.core.tests.launching.PathFilesContainer;
-import org.eclipse.dltk.tcl.activestatedebugger.TclActiveStateDebuggerConstants;
-import org.eclipse.dltk.tcl.activestatedebugger.TclActiveStateDebuggerPlugin;
-import org.eclipse.dltk.tcl.activestatedebugger.TclActiveStateDebuggerRunner;
-import org.eclipse.dltk.tcl.internal.debug.TclDebugConstants;
-import org.eclipse.dltk.tcl.internal.debug.TclDebugPlugin;
-import org.eclipse.dltk.ui.tests.swtbot.DltkTestsHelper;
-import org.eclipse.dltk.ui.tests.swtbot.TestMessages;
-import org.eclipse.dltk.ui.tests.swtbot.operations.LaunchOperations;
-
-public class LaunchTests extends SWTBotEclipseTestCase {
-
- private static boolean DEBUG;
- static {
- String value = Platform
- .getDebugOption("org.eclipse.dltk.tcl.ui.tests.swtbot/Launch");
- DEBUG = Boolean.valueOf(value).booleanValue();
- }
-
- private static final String PROJECT_NAME = "Launch";
-
- private static final String CORRECT_SCRIPT = "CorrectScript.tcl";
- private static final String INCORRECT_SCRIPT = "InvalidScript.tcl";
-
- private LaunchOperations operation;
- private DltkTestsHelper helper;
- private IScriptProject project;
-
- public LaunchTests(String name) {
- super();
- setName(name);
- helper = new DltkTestsHelper(name, bot);
- operation = new LaunchOperations(bot);
- DltkTestsHelper.DEBUG = DEBUG;
- }
-
- class Searcher implements IFileVisitor {
- private String debuggingEnginePath = null;
-
- public boolean visit(IFileHandle file) {
- if (file.isFile() && file.getName().startsWith("dbgp_tcldebug")) {
- debuggingEnginePath = file.toOSString();
- }
-
- if (file.isDirectory() && debuggingEnginePath == null) {
- return true;
- } else {
- return false;
- }
- }
-
- public String getPath() {
- return debuggingEnginePath;
- }
- };
-
- public void setUp() throws Exception {
- DltkTestsHelper.debug(getName() + " starting...");
- super.setUp();
- helper.setUpSuite();
- // Close welcome page.
- closeWelcome();
- helper.openTclPerspective();
- helper.initOnlyDefInterpreter();
- project = helper.setUpScriptProject(PROJECT_NAME);
- DltkTestsHelper.debug(getName() + " started");
- }
-
- public void tearDown() throws Exception {
- DltkTestsHelper.debug(getName() + " finishing...");
- helper.closeDialogs();
- helper.deleteProject(PROJECT_NAME);
-
- helper.clearInterpreters();
- helper.tearDownSuite();
-
- super.tearDown();
- DltkTestsHelper.debug(getName() + " finished");
- }
-
- protected String getProjectName() {
- return project.getProject().getName();
- }
-
- // /////////////////////////////////////////////////////////////////
- //
- // Tests
- //
- // /////////////////////////////////////////////////////////////////
- /**
- * Run a Tcl script using context menu. (DLTKTEST-82)
- */
- public void testRunByContextMenu() {
- helper.assertInterpreter(project, DltkTestsHelper.DEF_INTERPRETER_ID);
- operation.runByContextMenu(getProjectName(), CORRECT_SCRIPT);
- operation.assertExecuteCompleteOk();
- }
-
- /**
- * Try to run incorrect Tcl script. (DLTKTEST-41)
- */
- public void testRunIncorrectScript() {
- helper.assertInterpreter(project, DltkTestsHelper.DEF_INTERPRETER_ID);
- operation.runByContextMenu(getProjectName(), INCORRECT_SCRIPT);
- operation.assertExecuteCompleteWithError();
- }
-
- /**
- * Debug a Tcl script using context menu. (DLTKTEST-67)
- */
- public void testDebugByContextMenu() {
- initializeActiveStateDebugEngine();
- helper.assertInterpreter(project, DltkTestsHelper.DEF_INTERPRETER_ID);
- operation.debugByContextMenu(getProjectName(), CORRECT_SCRIPT);
- operation.waitingDebugConsole();
- operation.assertExecuteCompleteOk();
- }
-
- /**
- * Check Tcl debug preferences. (DLTKTEST-127)
- */
- public void testCheckDebugPreferences() {
- operation.checkDebugPreferences(getProjectName());
- }
-
- private boolean initialized = false;
-
- private void initializeActiveStateDebugEngine() {
- if (initialized) {
- return;
- }
- TclDebugPlugin.getDefault().getPluginPreferences().setValue(
- TclDebugConstants.DEBUGGING_ENGINE_ID_KEY,
- TclActiveStateDebuggerRunner.ENGINE_ID);
-
- // PathFilesContainer container = new PathFilesContainer();
- Plugin plugin = TclActiveStateDebuggerPlugin.getDefault();
-
- String path = TestMessages.LaunchTests_dbgp_tcldebug;
- File file = new File(path);
- // Lets search if we could not found in default location.
- boolean inDefault = true;
- if (!file.exists()) {
- PathFilesContainer container = new PathFilesContainer(
- EnvironmentManager.getLocalEnvironment());
- Searcher searcher = new Searcher();
- container.accept(searcher);
- path = searcher.getPath();
- inDefault = false;
- }
- if (!inDefault && path == null) {
- assertNotNull("Couldn't find ActiveState debugger", path);
- }
-
- Map map = new HashMap();
- map.put(LocalEnvironment.getInstance(), path);
- String keyValue = EnvironmentPathUtils.encodePaths(map);
- plugin.getPluginPreferences().setValue(
- TclActiveStateDebuggerConstants.DEBUGGING_ENGINE_PATH_KEY,
- keyValue);
- initialized = true;
- }
-
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/ProjectContentTests.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/ProjectContentTests.java
deleted file mode 100644
index ab1b3d5..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/ProjectContentTests.java
+++ /dev/null
@@ -1,1222 +0,0 @@
-/**************************************************import junit.framework.TestSuite;
-import net.sf.swtbot.eclipse.finder.SWTEclipseBot;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.dltk.core.IScriptProject;
-import org.eclipse.dltk.ui.tests.swtbot.DltkTestsHelper;
-import org.eclipse.dltk.ui.tests.swtbot.operations.Operations;
-import org.eclipse.dltk.ui.tests.swtbot.operations.ProjectContentOperations;
-nc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot.complex;
-
-import junit.framework.TestSuite;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.dltk.core.IScriptProject;
-import org.eclipse.dltk.ui.tests.swtbot.DltkTestsHelper;
-import org.eclipse.dltk.ui.tests.swtbot.operations.Operations;
-import org.eclipse.dltk.ui.tests.swtbot.operations.ProjectContentOperations;
-import org.eclipse.swtbot.eclipse.finder.SWTEclipseBot;
-
-public class ProjectContentTests extends SuiteOfTestCases {
-
- private static boolean DEBUG;
-
- static {
- String value = Platform
- .getDebugOption("org.eclipse.dltk.tcl.ui.tests.swtbot/ProjectContent");
- DEBUG = Boolean.valueOf(value).booleanValue();
- }
-
- private static final String PROJECT_NAME = "ProjectContent";
- private static final String ROOT_IN_BUILD_PATH_PROJECT_NAME = "RootInBuildPath";
-
- private static final String NEW_FOLDER1 = "abc";
- private static final String NEW_FOLDER2 = "def";
- private static final String NEW_TCL_SCRIPT1 = "a.tcl";
- private static final String NEW_FILE = "aaa.ext";
-
- private static final String FOLDER1 = "Folder1";
- private static final String FOLDER2 = "Folder2";
- private static final String SOURCE_FOLDER1 = "SourceFolder1";
- private static final String SOURCE_FOLDER2 = "SourceFolder2";
-
- private static final String FILE1 = "File1.ext";
- private static final String SCRIPT1 = "Script1.tcl";
- private static final String SCRIPT_IN_ROOT = "Script5.tcl";
- private static final String FILE_IN_ROOT = "File6.ext";
- private static final String SCRIPT_IN_SOURCE_FOLDER = "Script3.tcl";
- private static final String NESTED_FOLDER = "NestedFolder";
-
- private static final String NESTED_FOLDER2 = "NestedFolder/Nested2";
-
- private IScriptProject project;
- private DltkTestsHelper helper;
- private String altProjectName;
-
- ProjectContentOperations operations;
- private SWTEclipseBot bot = new SWTEclipseBot();
-
- public ProjectContentTests(String name) {
- super(name);
- setName(name);
- helper = new DltkTestsHelper(name, bot);
- DltkTestsHelper.DEBUG = DEBUG;
- operations = new ProjectContentOperations(bot);
- }
-
- public static TestSuite suite() {
- return new Suite(ProjectContentTests.class);
- }
-
- public void setUp() throws Exception {
- DltkTestsHelper.debug(getName() + " starting...");
- super.setUp();
- helper.setUpSuite();
- // Close welcome page.
- closeWelcome();
- helper.openTclPerspective();
- project = helper.setUpScriptProject(PROJECT_NAME);
- altProjectName = null;
- DltkTestsHelper.debug(getName() + " started");
- }
-
- public void tearDown() throws Exception {
- DltkTestsHelper.debug(getName() + " finishing...");
- helper.closeDialogs();
-
- helper.deleteProject(PROJECT_NAME);
- if (altProjectName != null) {
- helper.deleteProject(altProjectName);
- }
-
- helper.tearDownSuite();
- super.tearDown();
- DltkTestsHelper.debug(getName() + " finished");
- }
-
- protected String getProjectName() {
- return project.getProject().getName();
- }
-
- /**
- * Create a folder (DLTK-517).<br>
- * <br>
- * 1. Select parent folder in Script explorer<br>
- * 2. Open New Folder dialog (File->New->Folder)<br>
- * 3. Enter folder name<br>
- * 4. Finish<br>
- *
- */
- public void testCreateFolder001() {
- operations.createFolder001(getProjectName(), FOLDER1, NEW_FOLDER1);
- String folderName = FOLDER1 + "/" + NEW_FOLDER1;
- helper.assertFolderExists(getProjectName(), folderName);
- operations.assertProjectElementExist(getProjectName(), folderName);
- }
-
- /**
- * Create a folder (DLTK-517)<br>
- * <br>
- * 1. Open New Folder dialog (File->New->Folder)<br>
- * 2. Select parent folder in tree in dialog<br>
- * 3. Enter folder name<br>
- * 4. Finish<br>
- *
- */
- public void testCreateFolder002() {
- operations.createFolder002(getProjectName(), FOLDER1, NEW_FOLDER1);
- String folderName = FOLDER1 + "/" + NEW_FOLDER1;
- helper.assertFolderExists(getProjectName(), folderName);
- operations.assertProjectElementExist(getProjectName(), folderName);
- }
-
- /**
- * Create a folder (DLTK-517)<br>
- *<br>
- * 1. Open New Folder dialog (File->New->Folder)<br>
- * 2. Enter folder path with use path separator<br>
- * 3. Finish<br>
- *
- */
- public void testCreateFolder003() {
- String folderName = FOLDER1 + "/" + NEW_FOLDER1;
- operations.createFolder002(getProjectName(), null, folderName);
- helper.assertFolderExists(getProjectName(), folderName);
- operations.assertProjectElementExist(getProjectName(), folderName);
- }
-
- /**
- * Create folder by context menu (DLTK-604) <br>
- * <br>
- * Predefined conditions:<br>
- * 1. Exist Tcl project with not source folder<br>
- * <br>
- * Actions:<br>
- * 1. Select parent folder in Script explorer<br>
- * 2. Open New Folder dialog (PopupMenu->New->Folder)<br>
- * 3. Enter folder name<br>
- * 4. Finish<br>
- * <br>
- * Expected:<br>
- * 1. New folder exist in parent folder<br>
- *
- */
-// public void testCreateFolderByContextMenu() {
-// operations.createFolderByContextMenu(getProjectName(), FOLDER1,
-// NEW_FOLDER1);
-// String folderName = FOLDER1 + "/" + NEW_FOLDER1;
-// helper.assertFolderExists(getProjectName(), folderName);
-// operations.assertProjectElementExist(getProjectName(), folderName);
-// }
-
- /**
- * Create a source folder without update exclusion filter (DLTK-516)<br>
- *<br>
- * Predefined conditions:<br>
- * 1. Exist Tcl project with one source folder and one not source folder<br>
- * <br>
- * Actions:<br>
- * 1. Select project in Script explorer<br>
- * 2. Open New Folder dialog (Menu->New->Folder)<br>
- * 3. Check: "Project name" equals to name of project, "Finish" button is
- * disable<br>
- * 3. Enter "Folder name"<br>
- * 4. Press "Finish" button<br>
- * <br>
- * Expected:<br>
- * 1. New folder exist in project root (independently of selected folder)<br>
- * 2. This folder is source folder<br>
- */
- public void testCreateSourceFolder001() {
- operations.createSourceFolder(getProjectName(), "", NEW_FOLDER1, false);
- helper.assertSourceFolderExists(project, NEW_FOLDER1);
- operations.assertProjectElementExist(getProjectName(), NEW_FOLDER1);
- }
-
- /**
- * Create a source folder without update exclusion filter (DLTK-516) <br>
- * <br>
- * Predefined conditions:<br>
- * 1. Exist Tcl project with one source folder and one not source folder<br>
- * <br>
- * Actions:<br>
- * 1. Select source folder in Script explorer<br>
- * 2. Open New Folder dialog (Menu->New->Folder)<br>
- * 3. Check: "Project name" equals to name of project, "Finish" button is
- * disable<br>
- * 3. Enter "Folder name"<br>
- * 4. Press "Finish" button<br>
- * <br>
- * Expected:<br>
- * 1. New folder exist in project root (independently of selected folder)<br>
- * 2. This folder is source folder<br>
- *
- */
- public void testCreateSourceFolder002() {
- operations.createSourceFolder(getProjectName(), SOURCE_FOLDER1,
- NEW_FOLDER1, false);
- helper.assertSourceFolderExists(project, NEW_FOLDER1);
- operations.assertProjectElementExist(getProjectName(), NEW_FOLDER1);
-
- String folderName = SOURCE_FOLDER1 + "/" + NEW_FOLDER1;
- helper.assertSourceFolderDoesNotExist(project, folderName);
- operations.assertProjectElementNotExist(getProjectName(), folderName);
- }
-
- /**
- * Create a source folder without update exclusion filter(DLTK-516) <br>
- * <br>
- * Predefined conditions:<br>
- * 1. Exist Tcl project with one source folder and one not source folder<br>
- * <br>
- * Actions:<br>
- * 1. Select not source folder in Script explorer:<br>
- * 2. Open New Folder dialog (Menu->New->Folder)<br>
- * 3. Check: "Project name" equals to name of project, "Finish" button is
- * disable<br>
- * 3. Enter "Folder name"<br>
- * 4. Press "Finish" button<br>
- * <br>
- * Expected:<br>
- * 1. New folder exist in project root (independently of selected folder)<br>
- * 2. This folder is source folder<br>
- *
- */
- public void testCreateSourceFolder003() {
- operations.createSourceFolder(getProjectName(), FOLDER1, NEW_FOLDER1,
- false);
- helper.assertSourceFolderExists(project, NEW_FOLDER1);
- operations.assertProjectElementExist(getProjectName(), NEW_FOLDER1);
-
- String folderName = FOLDER1 + "/" + NEW_FOLDER1;
- helper.assertSourceFolderDoesNotExist(project, folderName);
- operations.assertProjectElementNotExist(getProjectName(), folderName);
- }
-
- /**
- * Create a nested source folder without update exclusion filter (DLTK-708)<br>
- *<br>
- * Predefined conditions:<br>
- * 1. Exist Tcl project with not source folder<br>
- * <br>
- * Actions:<br>
- * 1. Select project in Script explorer:<br>
- * 2. Open New Folder dialog (Menu->New->Folder)<br>
- * 3. Check: "Project name" equals to name of project, "Finish" button is
- * disable<br>
- * 4. Enter "<parent not source folder>/<new source folder name>"<br>
- * 5. Press "Finish" button<br>
- * <br>
- * Expected:<br>
- * 1. New folder exist in parent folder<br>
- * 2. New folder is source folder<br>
- * 3. Parent folder is not source folder<br>
- *
- */
- public void testCreateNestedSourceFolder() {
- String folderName = FOLDER1 + "/" + NEW_FOLDER1;
- operations.createSourceFolder(getProjectName(), "", folderName, false);
- helper.assertSourceFolderDoesNotExist(project, FOLDER1);
- helper.assertSourceFolderExists(project, folderName);
- operations.assertProjectElementExist(getProjectName(), FOLDER1);
- operations.assertProjectElementNotExist(getProjectName(), folderName);
- }
-
- /**
- * Create a source folder without update exclusion filter using pop-up menu
- * (DLTK-603)<br>
- *<br>
- * Predefined conditions:<br>
- * 1. Exist Tcl project with one source folder and one not source folder<br>
- * <br>
- * Actions:<br>
- * 1. Select project in Script explorer<br>
- * 2. Open New Folder dialog (Menu->New->Folder)<br>
- * 3. Check: "Project name" equals to name of project, "Finish" button is
- * disable<br>
- * 3. Enter "Folder name"<br>
- * 4. Press "Finish" button<br>
- * <br>
- * Expected:<br>
- * 1. New folder exist in project root (independently of selected folder)<br>
- * 2. This folder is source folder<br>
- *
- */
-// public void testCreateSourceFolderByContextMenu001() {
-// operations.createSourceFolderByContextMenu(getProjectName(), "",
-// NEW_FOLDER1, false);
-// helper.assertSourceFolderExists(project, NEW_FOLDER1);
-// operations.assertProjectElementExist(getProjectName(), NEW_FOLDER1);
-// }
-
- /**
- * Create a source folder without update exclusion filter using pop-up menu
- * (DLTK-603)<br>
- * <br>
- * Predefined conditions:<br>
- * 1. Exist Tcl project with one source folder and one not source folder<br>
- * <br>
- * Actions:<br>
- * 1. Select source folder in Script explorer<br>
- * 2. Open New Folder dialog (Menu->New->Folder)<br>
- * 3. Check: "Project name" equals to name of project, "Finish" button is
- * disable<br>
- * 3. Enter "Folder name"<br>
- * 4. Press "Finish" button<br>
- * <br>
- * Expected:<br>
- * 1. New folder exist in project root (independently of selected folder)<br>
- * 2. This folder is source folder<br>
- *
- */
-// public void testCreateSourceFolderByContextMenu002() {
-// operations.createSourceFolderByContextMenu(getProjectName(),
-// SOURCE_FOLDER1, NEW_FOLDER1, false);
-// helper.assertSourceFolderExists(project, NEW_FOLDER1);
-// operations.assertProjectElementExist(getProjectName(), NEW_FOLDER1);
-//
-// String folderName = SOURCE_FOLDER1 + "/" + NEW_FOLDER1;
-// helper.assertSourceFolderDoesNotExist(project, folderName);
-// operations.assertProjectElementNotExist(getProjectName(), folderName);
-// }
-
- /**
- * Create a source folder without update exclusion filter using pop-up menu
- * (DLTK-603)<br>
- * <br>
- * Predefined conditions:<br>
- * 1. Exist Tcl project with one source folder and one not source folder<br>
- * <br>
- * Actions:<br>
- * 1. Select not source folder in Script explorer:<br>
- * 2. Open New Folder dialog (Menu->New->Folder)<br>
- * 3. Check: "Project name" equals to name of project, "Finish" button is
- * disable<br>
- * 3. Enter "Folder name"<br>
- * 4. Press "Finish" button<br>
- * <br>
- * Expected:<br>
- * 1. New folder exist in project root (independently of selected folder)<br>
- * 2. This folder is source folder<br>
- *
- */
-// public void testCreateSourceFolderByContextMenu003() {
-// operations.createSourceFolderByContextMenu(getProjectName(), FOLDER1,
-// NEW_FOLDER1, false);
-// helper.assertSourceFolderExists(project, NEW_FOLDER1);
-// operations.assertProjectElementExist(getProjectName(), NEW_FOLDER1);
-//
-// String folderName = FOLDER1 + "/" + NEW_FOLDER1;
-// helper.assertSourceFolderDoesNotExist(project, folderName);
-// operations.assertProjectElementNotExist(getProjectName(), folderName);
-// }
-
- /**
- * Create a Tcl file in project root (DLTK-518)<br>
- *<br>
- * Predefined conditions:<br>
- * 1. Exist Tcl project<br>
- * 2. Root not in source path<br>
- * <br>
- * Actions:<br>
- * 1. Select project in Script explorer:<br>
- * 2. Open New File dialog (Menu->New->File)<br>
- * 3. Enter "File"<br>
- * 4. Press "Finish" button<br>
- * <br>
- * Expected:<br>
- * 1. New folder exist in project root (independently of selected folder)<br>
- * 2. This folder is source folder<br>
- *
- */
- public void testCreateFile001() {
- operations.createFile001(getProjectName(), NEW_FILE);
- helper.assertFileExists(getProjectName(), NEW_FILE);
- operations.assertProjectElementExist(getProjectName(), NEW_FILE);
- }
-
- /**
- * Create a Tcl file in project root (DLTK-518)<br>
- *<br>
- * Predefined conditions:<br>
- * 1. Exist Tcl project<br>
- * 2. Root not in source path<br>
- * <br>
- * Actions:<br>
- * 1. Open New File dialog (Menu->New->File)<br>
- * 2. Select project in tree in dialog<br>
- * 3. Enter "File"<br>
- * 4. Press "Finish" button<br>
- * <br>
- * Expected:<br>
- * 1. New folder exist in project root (independently of selected folder)<br>
- * 2. This folder is source folder<br>
- *
- */
- public void testCreateFile002() {
- operations.createFile002(getProjectName(), null, NEW_FILE);
- helper.assertFileExists(getProjectName(), NEW_FILE);
- operations.assertProjectElementExist(getProjectName(), NEW_FILE);
- }
-
- /**
- * Create a Tcl file in project root using pop-up menu (DLTK-607). Equals to
- * testCreateFile001 but for Open New File dialog use (PopupMenu->New->File)
- */
-// public void testCreateFileByContextMenu() {
-// operations.createFileByContextMenu(getProjectName(), null, NEW_FILE);
-// helper.assertFileExists(getProjectName(), NEW_FILE);
-// operations.assertProjectElementExist(getProjectName(), NEW_FILE);
-// }
-
- /**
- * Create a script in project root (DLTK-521).<br>
- *<br>
- * Predefined conditions:<br>
- * 1. Project root in build path<br>
- * <br>
- * Actions:<br>
- * 1. Select project in Script explorer<br>
- * 2. Create script (Menu->New->Tcl File)<br>
- * <br>
- * Expected:<br>
- * 1. script must be created in project root<br>
- *
- */
- public void testCreateScript001() {
- try {
- altProjectName = ROOT_IN_BUILD_PATH_PROJECT_NAME;
- project = helper.setUpScriptProject(altProjectName);
- } catch (Exception ex) {
- throw new RuntimeException(ex);
- }
-
- operations.createScript(getProjectName(), null, NEW_TCL_SCRIPT1);
-
- helper.assertScriptExists(getProjectName(), "", NEW_TCL_SCRIPT1);
- operations.assertProjectElementExist(getProjectName(), NEW_TCL_SCRIPT1);
- }
-
- /**
- * Create a script in project root (DLTK-521).<br>
- *<br>
- *Predefined conditions:<br>
- * 1. Project root not in build path<br>
- * 2. Exist source folder<br>
- * <br>
- * Actions:<br>
- * 1. Select project in Script explorer<br>
- * 2. Create script (Menu->New->Tcl File)<br>
- * <br>
- * Expected:<br>
- * 1. script must be created in source folder<br>
- *
- */
- public void testCreateScript002() {
- operations.createScript(getProjectName(), null, NEW_TCL_SCRIPT1);
- helper.assertFileDoesNotExist(getProjectName(), NEW_TCL_SCRIPT1);
- operations.assertProjectElementNotExist(getProjectName(),
- NEW_TCL_SCRIPT1);
-
- helper.assertScriptExists(getProjectName(), SOURCE_FOLDER1,
- NEW_TCL_SCRIPT1);
- operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER1
- + "/" + NEW_TCL_SCRIPT1);
- }
-
- /**
- * Create a script by context menu (DLTK-608)<br>
- *<br>
- * Predefined conditions:<br>
- * 1. Project root not in build path<br>
- * 2. Exist source folder<br>
- * <br>
- * Actions:<br>
- * 1. Select project in Script explorer<br>
- * 2. Create script (PopupMenu->New->Tcl File)<br>
- * <br>
- * Expected:<br>
- * 1. script must be created in source folder<br>
- *
- */
-// public void testCreateScriptByContextMenu() {
-// operations.createScriptByContextMenu(getProjectName(), null,
-// NEW_TCL_SCRIPT1);
-// helper.assertFileDoesNotExist(getProjectName(), NEW_TCL_SCRIPT1);
-// operations.assertProjectElementNotExist(getProjectName(),
-// NEW_TCL_SCRIPT1);
-//
-// helper.assertScriptExists(getProjectName(), SOURCE_FOLDER1,
-// NEW_TCL_SCRIPT1);
-// operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER1
-// + "/" + NEW_TCL_SCRIPT1);
-// }
-
- /**
- * Create a script in folder. Folder not in build path. (DLTK-606).<br>
- * <br>
- * Test 1:<br>
- * Predefined conditions:<br>
- * 1. Project root in build path<br>
- * 2. Source folder exist<br>
- * 3. Not source folder exist<br>
- * <br>
- * Actions:<br>
- * 1. Select Not source folder in Script explorer<br>
- * 2. Create script (Menu->New->Tcl File)<br>
- * <br>
- * Expected:<br>
- * 1. script must be created in default source folder<br>
- *
- */
- public void testCreateScriptInFolder() {
- operations.createScript(getProjectName(), FOLDER1, NEW_TCL_SCRIPT1);
-
- String path = FOLDER1 + "/" + NEW_TCL_SCRIPT1;
- helper.assertFileDoesNotExist(getProjectName(), path);
- operations.assertProjectElementNotExist(getProjectName(), path);
-
- helper.assertScriptExists(getProjectName(), SOURCE_FOLDER1,
- NEW_TCL_SCRIPT1);
- operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER1
- + "/" + NEW_TCL_SCRIPT1);
- }
-
- /**
- * Create a script in folder by context menu (DLTK-612) <br>
- * Predefined conditions:<br>
- * 1. Project root in build path<br>
- * 2. Source folder exist<br>
- * 3. Not source folder exist<br>
- * <br>
- * Actions:<br>
- * 1. Select Not source folder in Script explorer<br>
- * 2. Create script (PopupMenu->New->Tcl File)<br>
- * <br>
- * Expected:<br>
- * 1. script must be created in default source folder<br>
- */
-// public void testCreateScriptInFolderByContextMenu() {
-// operations.createScriptByContextMenu(getProjectName(), FOLDER1,
-// NEW_TCL_SCRIPT1);
-//
-// String path = FOLDER1 + "/" + NEW_TCL_SCRIPT1;
-// helper.assertFileDoesNotExist(getProjectName(), path);
-// operations.assertProjectElementNotExist(getProjectName(), path);
-//
-// helper.assertScriptExists(getProjectName(), SOURCE_FOLDER1,
-// NEW_TCL_SCRIPT1);
-// operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER1
-// + "/" + NEW_TCL_SCRIPT1);
-// }
-
- /**
- * Create a script in source folder (DLTK-605)
- *
- */
- public void testCreateScriptInSourceFolder() {
- operations.createScript(getProjectName(), SOURCE_FOLDER1,
- NEW_TCL_SCRIPT1);
- helper.assertScriptExists(getProjectName(), SOURCE_FOLDER1,
- NEW_TCL_SCRIPT1);
- operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER1
- + "/" + NEW_TCL_SCRIPT1);
- }
-
- /**
- * Create a script in source folder by context menu (DLTK-610)
- *
- */
-// public void testCreateScriptInSourceFolderByContextMenu() {
-// operations.createScriptByContextMenu(getProjectName(), SOURCE_FOLDER1,
-// NEW_TCL_SCRIPT1);
-// helper.assertScriptExists(getProjectName(), SOURCE_FOLDER1,
-// NEW_TCL_SCRIPT1);
-// operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER1
-// + "/" + NEW_TCL_SCRIPT1);
-// }
-
- /**
- * Create a Tcl file in source folder (DLTK-519)
- *
- */
- public void testCreateFileInSourceFolder() {
- operations.createFile002(getProjectName(), SOURCE_FOLDER1,
- NEW_TCL_SCRIPT1);
- helper.assertScriptExists(getProjectName(), SOURCE_FOLDER1,
- NEW_TCL_SCRIPT1);
- operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER1
- + "/" + NEW_TCL_SCRIPT1);
- }
-
- /**
- * Create a Tcl file in source folder by context menu (DLTK-609)
- *
- */
-// public void testCreateFileInSourceFolderByContextMenu() {
-// operations.createFileByContextMenu(getProjectName(), SOURCE_FOLDER1,
-// NEW_TCL_SCRIPT1);
-// helper.assertScriptExists(getProjectName(), SOURCE_FOLDER1,
-// NEW_TCL_SCRIPT1);
-// operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER1
-// + "/" + NEW_TCL_SCRIPT1);
-// }
-
- /**
- * Create a TCL file in folder. Folder not in build path. (DLTK-520)
- *
- */
- public void testCreateFileInFolder() {
- operations.createFile002(getProjectName(), FOLDER1, NEW_TCL_SCRIPT1);
- String path = FOLDER1 + "/" + NEW_TCL_SCRIPT1;
- helper.assertFileExists(getProjectName(), path);
- operations.assertProjectElementExist(getProjectName(), path);
- }
-
- /**
- * Create a TCL file in folder by context menu (DLTK-611)
- *
- */
-// public void testCreateFileInFolderByContextMenu() {
-// operations.createFileByContextMenu(getProjectName(), FOLDER1,
-// NEW_TCL_SCRIPT1);
-// String path = FOLDER1 + "/" + NEW_TCL_SCRIPT1;
-// helper.assertFileExists(getProjectName(), path);
-// operations.assertProjectElementExist(getProjectName(), path);
-// }
-
- // //////////////////////////////////////////////////////////////////////////
- //
- // Copy
- //
- // //////////////////////////////////////////////////////////////////////////
-
- /**
- * Copy file from a folder to another one (DLTK-523)
- *
- */
- public void testCopyFileBetweenFolders() {
- operations.copyElement(getProjectName(), FOLDER1 + "/" + FILE1);
- operations.pasteElement(getProjectName(), FOLDER2);
-
- helper.assertFileExists(getProjectName(), FOLDER2 + "/" + FILE1);
- operations.assertProjectElementExist(getProjectName(), FOLDER2 + "/"
- + FILE1);
- }
-
- /**
- * Copy file from a folder to another one (DLTK-523)
- *
- */
- public void testCopyFileBetweenFoldersByContextMenu() {
- operations.copyElementByContextMenu(getProjectName(), FOLDER1 + "/"
- + FILE1);
- operations.pasteElementByContextMenu(getProjectName(), FOLDER2);
-
- helper.assertFileExists(getProjectName(), FOLDER2 + "/" + FILE1);
- operations.assertProjectElementExist(getProjectName(), FOLDER2 + "/"
- + FILE1);
- }
-
- /**
- * Copy files from project root to a folder (DLTK-712)
- *
- */
- public void testCopyFileToFolderFromProjectRoot() {
- operations.copyElement(getProjectName(), FILE_IN_ROOT);
- operations.pasteElement(getProjectName(), FOLDER1);
-
- helper.assertFileExists(getProjectName(), FOLDER1 + "/" + FILE_IN_ROOT);
- operations.assertProjectElementExist(getProjectName(), FOLDER1 + "/"
- + FILE_IN_ROOT);
- }
-
- /**
- * Copy files from project root to a folder (DLTK-712)
- *
- */
- public void testCopyFileToFolderFromProjectRootByContextMenu() {
- operations.copyElementByContextMenu(getProjectName(), FILE_IN_ROOT);
- operations.pasteElementByContextMenu(getProjectName(), FOLDER1);
-
- helper.assertFileExists(getProjectName(), FOLDER1 + "/" + FILE_IN_ROOT);
- operations.assertProjectElementExist(getProjectName(), FOLDER1 + "/"
- + FILE_IN_ROOT);
- }
-
- /**
- * Copy file from a folder to project root (DLTK-524)
- *
- * @
- */
- public void testCopyFileFromFolderToProjectRoot() {
- operations.copyElement(getProjectName(), FOLDER1 + "/" + FILE1);
- operations.pasteElement(getProjectName(), "");
-
- helper.assertFileExists(getProjectName(), FILE1);
- operations.assertProjectElementExist(getProjectName(), FILE1);
- }
-
- /**
- * Copy file from a folder to project root (DLTK-524)
- *
- */
- public void testCopyFileFromFolderToProjectRootByContextMenu() {
- operations.copyElementByContextMenu(getProjectName(), FOLDER1 + "/"
- + FILE1);
- operations.pasteElementByContextMenu(getProjectName(), "");
-
- helper.assertFileExists(getProjectName(), FILE1);
- operations.assertProjectElementExist(getProjectName(), FILE1);
- }
-
- /**
- * Copy script from source folder to project root (DLTK-527)
- *
- * @
- */
- public void testCopyScriptFromSourceFolderToProjectRoot() {
- operations.copyElement(getProjectName(), SOURCE_FOLDER1 + "/"
- + SCRIPT_IN_SOURCE_FOLDER);
- operations.pasteElement(getProjectName(), "");
-
- helper.assertFileExists(getProjectName(), SCRIPT_IN_SOURCE_FOLDER);
- operations.assertProjectElementExist(getProjectName(),
- SCRIPT_IN_SOURCE_FOLDER);
-
- }
-
- /**
- * Copy script from source folder to project root (DLTK-527)
- *
- */
- public void testCopyScriptFromSourceFolderToProjectRootByContextMenu() {
- operations.copyElementByContextMenu(getProjectName(), SOURCE_FOLDER1
- + "/" + SCRIPT_IN_SOURCE_FOLDER);
- operations.pasteElementByContextMenu(getProjectName(), "");
-
- helper.assertFileExists(getProjectName(), SCRIPT_IN_SOURCE_FOLDER);
- operations.assertProjectElementExist(getProjectName(),
- SCRIPT_IN_SOURCE_FOLDER);
-
- }
-
- /**
- * Copy files from a source folder to a source folder (DLTK-526)
- *
- */
- public void testCopyScriptBetweenSourceFolders() {
- operations.copyElement(getProjectName(), SOURCE_FOLDER1 + "/"
- + SCRIPT_IN_SOURCE_FOLDER);
- operations.pasteElement(getProjectName(), SOURCE_FOLDER2);
-
- helper.assertScriptExists(getProjectName(), SOURCE_FOLDER2,
- SCRIPT_IN_SOURCE_FOLDER);
- operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER2
- + "/" + SCRIPT_IN_SOURCE_FOLDER);
-
- }
-
- /**
- * Copy files from a source folder to a source folder (DLTK-526)
- *
- */
- public void testCopyScriptBetweenSourceFoldersByContextMenu() {
- operations.copyElementByContextMenu(getProjectName(), SOURCE_FOLDER1
- + "/" + SCRIPT_IN_SOURCE_FOLDER);
- operations.pasteElementByContextMenu(getProjectName(), SOURCE_FOLDER2);
-
- helper.assertScriptExists(getProjectName(), SOURCE_FOLDER2,
- SCRIPT_IN_SOURCE_FOLDER);
- operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER2
- + "/" + SCRIPT_IN_SOURCE_FOLDER);
-
- }
-
- /**
- * Copy files from a source folder to a folder (DLTK-525)
- *
- */
- public void testCopyFileFromSourceFolderToFolder() {
- operations.copyElement(getProjectName(), SOURCE_FOLDER1 + "/"
- + SCRIPT_IN_SOURCE_FOLDER);
- operations.pasteElement(getProjectName(), FOLDER1);
-
- helper.assertFileExists(getProjectName(), FOLDER1 + "/"
- + SCRIPT_IN_SOURCE_FOLDER);
- operations.assertProjectElementExist(getProjectName(), FOLDER1 + "/"
- + SCRIPT_IN_SOURCE_FOLDER);
- }
-
- /**
- * Copy files from a source folder to a folder (DLTK-525)
- *
- */
- public void testCopyFileFromSourceFolderToFolderByContextMenu() {
- operations.copyElementByContextMenu(getProjectName(), SOURCE_FOLDER1
- + "/" + SCRIPT_IN_SOURCE_FOLDER);
- operations.pasteElementByContextMenu(getProjectName(), FOLDER1);
-
- helper.assertFileExists(getProjectName(), FOLDER1 + "/"
- + SCRIPT_IN_SOURCE_FOLDER);
- operations.assertProjectElementExist(getProjectName(), FOLDER1 + "/"
- + SCRIPT_IN_SOURCE_FOLDER);
- }
-
- /**
- * Copy files from a folder to a source folder (DLTK-522)
- *
- */
- public void testCopyScriptFromFolderToSourceFolder() {
- operations.copyElement(getProjectName(), FOLDER1 + "/" + SCRIPT1);
- operations.pasteElement(getProjectName(), SOURCE_FOLDER1);
-
- helper.assertScriptExists(getProjectName(), SOURCE_FOLDER1, SCRIPT1);
- operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER1
- + "/" + SCRIPT1);
-
- }
-
- /**
- * Copy files from a folder to a source folder (DLTK-522)
- *
- */
- public void testCopyScriptFromFolderToSourceFolderByContextMenu() {
- operations.copyElementByContextMenu(getProjectName(), FOLDER1 + "/"
- + SCRIPT1);
- operations.pasteElementByContextMenu(getProjectName(), SOURCE_FOLDER1);
-
- helper.assertScriptExists(getProjectName(), SOURCE_FOLDER1, SCRIPT1);
- operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER1
- + "/" + SCRIPT1);
-
- }
-
- // //////////////////////////////////////////////////////////////////////////
- //
- // Rename
- //
- // //////////////////////////////////////////////////////////////////////////
-
- /**
- * Rename a folder (DLTK-538)
- *
- */
- public void testRenameFolder() {
- operations.renameElement(Operations.DLG_RENAME, getProjectName(),
- FOLDER1, NEW_FOLDER2);
- helper.assertFolderExists(getProjectName(), NEW_FOLDER2);
- operations.assertProjectElementExist(getProjectName(), NEW_FOLDER2);
- }
-
- /**
- * Rename a folder using context menu (DLTK-613)
- *
- */
-// public void testRenameFolderByContextMenu() {
-// operations.renameElementByContextMenu(Operations.DLG_RENAME,
-// getProjectName(), FOLDER1, NEW_FOLDER2);
-// helper.assertFolderExists(getProjectName(), NEW_FOLDER2);
-// operations.assertProjectElementExist(getProjectName(), NEW_FOLDER2);
-// }
-
- /**
- * Rename a source folder (DLTK-539)
- *
- */
- public void testRenameSourceFolder() {
- operations.renameElement(Operations.DLG_RENAME_SOURCE_FOLDER,
- getProjectName(), SOURCE_FOLDER1, NEW_FOLDER2);
- helper.assertSourceFolderExists(project, NEW_FOLDER2);
- operations.assertProjectElementExist(getProjectName(), NEW_FOLDER2);
-
- }
-
- /**
- * Rename a source folder using context menu (DLTK-617)
- *
- */
-// public void testRenameSourceFolderByContextMenu() {
-// operations.renameElementByContextMenu(
-// Operations.DLG_RENAME_SOURCE_FOLDER, getProjectName(),
-// SOURCE_FOLDER1, NEW_FOLDER2);
-// helper.assertSourceFolderExists(project, NEW_FOLDER2);
-// operations.assertProjectElementExist(getProjectName(), NEW_FOLDER2);
-//
-// }
-
- /**
- * Rename Tcl file in project root (DLTK-543)
- *
- */
- public void testRenameFile() {
- operations.renameElement(Operations.DLG_RENAME, getProjectName(),
- FILE_IN_ROOT, NEW_TCL_SCRIPT1);
- helper.assertFileExists(getProjectName(), NEW_TCL_SCRIPT1);
- operations.assertProjectElementExist(getProjectName(), NEW_TCL_SCRIPT1);
- }
-
- /**
- * Rename a Tcl file in project root by context menu (DLTK-622)
- *
- */
-// public void testRenameFileByContextMenu() {
-// operations.renameElementByContextMenu(Operations.DLG_RENAME,
-// getProjectName(), SCRIPT_IN_ROOT, NEW_TCL_SCRIPT1);
-// helper.assertFileExists(getProjectName(), NEW_TCL_SCRIPT1);
-// operations.assertProjectElementExist(getProjectName(), NEW_TCL_SCRIPT1);
-// }
-
- /**
- * Rename a Tcl file in folder (DLTK-542)
- *
- */
- public void testRenameFileInFolder() {
- operations.renameElement(Operations.DLG_RENAME, getProjectName(),
- FOLDER1 + "/" + FILE1, NEW_FILE);
-
- helper.assertFileExists(getProjectName(), FOLDER1 + "/" + NEW_FILE);
- operations.assertProjectElementExist(getProjectName(), FOLDER1 + "/"
- + NEW_FILE);
- }
-
- /**
- * Rename a Tcl file in folder by context menu (DLTK-621)
- *
- */
-// public void testRenameFileInFolderByContextMenu() {
-// operations.renameElementByContextMenu(Operations.DLG_RENAME,
-// getProjectName(), FOLDER1 + "/" + FILE1, NEW_FILE);
-//
-// helper.assertFileExists(getProjectName(), FOLDER1 + "/" + NEW_FILE);
-// operations.assertProjectElementExist(getProjectName(), FOLDER1 + "/"
-// + NEW_FILE);
-// }
-
- /**
- * Rename a Tcl file in source folder (DLTK-541)
- *
- */
- public void testRenameFileInSourceFolder() {
- operations.renameElement(Operations.DLG_RENAME_SOURCE_MODULE,
- getProjectName(), SOURCE_FOLDER1 + "/"
- + SCRIPT_IN_SOURCE_FOLDER, NEW_TCL_SCRIPT1);
-
- helper.assertScriptExists(getProjectName(), SOURCE_FOLDER1,
- NEW_TCL_SCRIPT1);
- operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER1
- + "/" + NEW_TCL_SCRIPT1);
- }
-
- /**
- * Rename a Tcl File in source folder by context menu (DLTK-620)
- *
- */
-// public void testRenameFileInSourceFolderByContextMenu() {
-// operations
-// .renameElementByContextMenu(
-// Operations.DLG_RENAME_SOURCE_MODULE, getProjectName(),
-// SOURCE_FOLDER1 + "/" + SCRIPT_IN_SOURCE_FOLDER,
-// NEW_TCL_SCRIPT1);
-//
-// helper.assertScriptExists(getProjectName(), SOURCE_FOLDER1,
-// NEW_TCL_SCRIPT1);
-// operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER1
-// + "/" + NEW_TCL_SCRIPT1);
-// }
-
- /**
- * Rename script in project root (DLTK-537)
- *
- */
- public void testRenameScript() {
- try {
- altProjectName = ROOT_IN_BUILD_PATH_PROJECT_NAME;
- project = helper.setUpScriptProject(altProjectName);
- } catch (Exception ex) {
- throw new RuntimeException(ex);
- }
-
- operations.renameElement(Operations.DLG_RENAME_SOURCE_MODULE,
- getProjectName(), SCRIPT_IN_ROOT, NEW_TCL_SCRIPT1);
-
- helper.assertScriptExists(getProjectName(), "", NEW_TCL_SCRIPT1);
- operations.assertProjectElementExist(getProjectName(), NEW_TCL_SCRIPT1);
- }
-
- /**
- * Rename script in project root using popup-menu (DLTK-714)
- *
- */
-// public void testRenameScriptByContextMenu() {
-// try {
-// altProjectName = ROOT_IN_BUILD_PATH_PROJECT_NAME;
-// project = helper.setUpScriptProject(altProjectName);
-// } catch (Exception ex) {
-// throw new RuntimeException(ex);
-// }
-//
-// operations.renameElementByContextMenu(
-// Operations.DLG_RENAME_SOURCE_MODULE, getProjectName(),
-// SCRIPT_IN_ROOT, NEW_TCL_SCRIPT1);
-//
-// helper.assertScriptExists(getProjectName(), "", NEW_TCL_SCRIPT1);
-// operations.assertProjectElementExist(getProjectName(), NEW_TCL_SCRIPT1);
-// }
-
- /**
- * Rename a project (DLTK-540)
- *
- */
- public void testRenameProject() {
- altProjectName = "RenamedProject";
- operations.renameElement(Operations.DLG_RENAME_SCRIPT_PROJECT,
- getProjectName(), "", altProjectName);
- helper.assertTclProject(altProjectName);
- operations.assertProjectElementExist(altProjectName, "");
- }
-
- /**
- * Rename a project by context menu (DLTK-618)
- *
- */
-// public void testRenameProjectByContextMenu() {
-// altProjectName = "RenamedProject";
-// operations.renameElementByContextMenu(
-// Operations.DLG_RENAME_SCRIPT_PROJECT, getProjectName(), "",
-// altProjectName);
-// helper.assertTclProject(altProjectName);
-// operations.assertProjectElementExist(altProjectName, "");
-// }
-
- // //////////////////////////////////////////////////////////////////////////
- //
- // Delete
- //
- // //////////////////////////////////////////////////////////////////////////
-
- /**
- * Delete a TCL file from project root (DLTK-548).<br>
- * Delete a script from project root (DLTK-549)
- *
- */
- public void testDeleteScriptFromRoot() {
- operations.deleteElement(getProjectName(), SCRIPT_IN_ROOT);
- helper.assertFileDoesNotExist(getProjectName(), SCRIPT_IN_ROOT);
- operations.assertProjectElementNotExist(getProjectName(),
- SCRIPT_IN_ROOT);
- }
-
- /**
- * Delete a file from folder (DLTK-547)
- *
- */
- public void testDeleteScriptFromFolder() {
- String path = FOLDER1 + "/" + SCRIPT1;
- operations.deleteElement(getProjectName(), path);
-
- helper.assertFolderExists(getProjectName(), FOLDER1);
- operations.assertProjectElementExist(getProjectName(), FOLDER1);
-
- helper.assertFileDoesNotExist(getProjectName(), path);
- operations.assertProjectElementNotExist(getProjectName(), path);
- }
-
- /**
- * Delete file from source folder (DLTK-546)
- *
- */
- public void testDeleteScriptFromSourceFolder() {
- String path = SOURCE_FOLDER1 + "/" + SCRIPT_IN_SOURCE_FOLDER;
- operations.deleteElement(getProjectName(), path);
-
- helper.assertSourceFolderExists(project, SOURCE_FOLDER1);
- operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER1);
-
- helper.assertFileDoesNotExist(getProjectName(), path);
- operations.assertProjectElementNotExist(getProjectName(), path);
- }
-
- /**
- * Delete folder (DLTK-545)
- *
- */
- public void testDeleteFolder() {
- operations.deleteElement(getProjectName(), FOLDER1);
- helper.assertFolderDoesNotExist(project, FOLDER1);
- operations.assertProjectElementNotExist(getProjectName(), FOLDER1);
- }
-
- /**
- * Delete nested folder (DLTK-545)
- *
- */
- public void testDeleteNestedFolder() {
- operations.deleteElement(getProjectName(), NESTED_FOLDER2);
-
- helper.assertFolderExists(getProjectName(), NESTED_FOLDER);
- helper.assertFolderDoesNotExist(project, NESTED_FOLDER2);
-
- operations.assertProjectElementExist(getProjectName(), NESTED_FOLDER);
- operations.assertProjectElementNotExist(getProjectName(),
- NESTED_FOLDER2);
- }
-
- /**
- * Delete source folder (DLTK-544)
- *
- */
- public void testDeleteSourceFolder() {
- operations.deleteElement(getProjectName(), SOURCE_FOLDER1);
- helper.assertSourceFolderDoesNotExist(project, SOURCE_FOLDER1);
- operations.assertProjectElementNotExist(getProjectName(),
- SOURCE_FOLDER1);
- }
-
- /**
- * Delete a TCL file from project root (DLTK-548).<br>
- * Delete a script from project root (DLTK-549)
- *
- */
- public void testDeleteScriptFromRootByContextMenu() {
- operations.deleteElementByContextMenu(getProjectName(), SCRIPT_IN_ROOT);
- helper.assertFileDoesNotExist(getProjectName(), SCRIPT_IN_ROOT);
- operations.assertProjectElementNotExist(getProjectName(),
- SCRIPT_IN_ROOT);
- }
-
- /**
- * Delete a file from folder (DLTK-547)
- *
- */
- public void testDeleteScriptFromFolderByContextMenu() {
- String path = FOLDER1 + "/" + SCRIPT1;
- operations.deleteElementByContextMenu(getProjectName(), path);
-
- helper.assertFolderExists(getProjectName(), FOLDER1);
- operations.assertProjectElementExist(getProjectName(), FOLDER1);
-
- helper.assertFileDoesNotExist(getProjectName(), path);
- operations.assertProjectElementNotExist(getProjectName(), path);
- }
-
- /**
- * Delete file from source folder (DLTK-546)
- *
- */
- public void testDeleteScriptFromSourceFolderByContextMenu() {
- String path = SOURCE_FOLDER1 + "/" + SCRIPT_IN_SOURCE_FOLDER;
- operations.deleteElementByContextMenu(getProjectName(), path);
-
- helper.assertSourceFolderExists(project, SOURCE_FOLDER1);
- operations.assertProjectElementExist(getProjectName(), SOURCE_FOLDER1);
-
- helper.assertFileDoesNotExist(getProjectName(), path);
- operations.assertProjectElementNotExist(getProjectName(), path);
- }
-
- /**
- * Delete folder (DLTK-545)
- *
- */
- public void testDeleteFolderByContextMenu() {
- operations.deleteElementByContextMenu(getProjectName(), FOLDER1);
- helper.assertFolderDoesNotExist(project, FOLDER1);
- operations.assertProjectElementNotExist(getProjectName(), FOLDER1);
- }
-
- /**
- * Delete nested folder (DLTK-545)
- *
- */
- public void testDeleteNestedFolderByContextMenu() {
- operations.deleteElementByContextMenu(getProjectName(), NESTED_FOLDER2);
-
- helper.assertFolderExists(getProjectName(), NESTED_FOLDER);
- helper.assertFolderDoesNotExist(project, NESTED_FOLDER2);
-
- operations.assertProjectElementExist(getProjectName(), NESTED_FOLDER);
- operations.assertProjectElementNotExist(getProjectName(),
- NESTED_FOLDER2);
- }
-
- /**
- * Delete source folder (DLTK-544)
- *
- */
- public void testDeleteSourceFolderByContextMenu() {
- operations.deleteElementByContextMenu(getProjectName(), SOURCE_FOLDER1);
- helper.assertSourceFolderDoesNotExist(project, SOURCE_FOLDER1);
- operations.assertProjectElementNotExist(getProjectName(),
- SOURCE_FOLDER1);
- }
-
- // //////////////////////////////////////////////////////////////////////////
- //
- // Move
- //
- // //////////////////////////////////////////////////////////////////////////
-
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/ProjectTests.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/ProjectTests.java
deleted file mode 100644
index f78b6db..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/ProjectTests.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot.complex;
-
-import java.io.IOException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.dltk.core.DLTKCore;
-import org.eclipse.dltk.core.IScriptProject;
-import org.eclipse.dltk.launching.IInterpreterInstall;
-import org.eclipse.dltk.launching.ScriptRuntime;
-import org.eclipse.dltk.ui.tests.swtbot.DltkTestsHelper;
-import org.eclipse.dltk.ui.tests.swtbot.ErrorMessages;
-import org.eclipse.dltk.ui.tests.swtbot.operations.ProjectOperations;
-
-public class ProjectTests extends SWTBotEclipseTestCase {
-
- private static boolean DEBUG;
-
- static {
- String value = Platform
- .getDebugOption("org.eclipse.dltk.tcl.ui.tests.swtbot/Project");
- DEBUG = Boolean.valueOf(value).booleanValue();
- }
-
- private static final String PROJECT_NAME = DltkTestsHelper.ETALON_PROJECT;
-
- private DltkTestsHelper helper;
-
- public ProjectTests(String name) {
- super();
- setName(name);
- helper = new DltkTestsHelper(name, bot);
- DltkTestsHelper.DEBUG = DEBUG;
- }
-
- public void setUp() throws Exception {
- DltkTestsHelper.debug(getName() + " starting...");
- super.setUp();
- helper.setUpSuite();
- // Close welcome page.
- closeWelcome();
- DltkTestsHelper.debug(getName() + " started");
- }
-
- public void tearDown() throws Exception {
- DltkTestsHelper.debug(getName() + " finishing...");
- helper.closeDialogs();
-
- helper.deleteProject(PROJECT_NAME);
- helper.clearInterpreters();
- helper.tearDownSuite();
-
- super.tearDown();
- DltkTestsHelper.debug(getName() + " finished");
- }
-
- /**
- * Create a Tcl project in workspace using main menu and switch to Tcl
- * perspective. (DLTK-502)<br>
- * <br>
- * Predefined conditions:<br>
- * 1. Current perspective - not Tcl<br>
- * <br>
- * Actions:<br>
- * 1. Open "New Project" wizard using Project File->New->Project...<br>
- * 2. Select "Tcl/Tcl Project" and press "Next" button<br>
- * 3. Enter project name and press "Finish" button<br>
- * Expect "Open Associated Perspective?" dialog<br>
- * 4. Press "OK"<br>
- * <br>
- * Expect:<br>
- * 1. Created Tcl project<br>
- * 2. Tcl perspective opened<br>
- *
- */
- public void testCreateTclProject001() {
- helper.openJavaPerspective();
- new ProjectOperations(bot).createPromptPerspective(PROJECT_NAME);
- helper.assertTclProject(PROJECT_NAME);
- helper.assertPerspective(DltkTestsHelper.TCL_PERSPECTIVE_ID);
- }
-
- /**
- * Create a Tcl project in workspace with default interpreter with use
- * context menu of Script Explorer view. (DLTK-746)<br>
- *<br>
- * Predefined conditions:<br>
- * 1. System contain Default Tcl interpreter<br>
- * 2. Tcl perspective is opened<br>
- * <br>
- * Actions:<br>
- * 1. Open "Create Tcl project" dizlog using context mebu New->Tcl Project
- * in ScriptExplorer<br>
- * 2. Enter project name and press "Finish" button<br>
- * 3. Press "OK"<br>
- * <br>
- * Expect:<br>
- * 1. Created Tcl project<br>
- * 2. Project have default Interpreter Library<br>
- *
- */
-// public void testCreateTclProject002() {
-// helper.openTclPerspective();
-// helper.initOnlyDefInterpreter();
-//
-// ProjectOperations operation = new ProjectOperations(bot);
-// operation.createFromScriptExplorer(PROJECT_NAME);
-// helper.assertTclProject(PROJECT_NAME);
-// helper.assertInterpreter(PROJECT_NAME,
-// DltkTestsHelper.DEF_INTERPRETER_ID);
-// }
-
- /**
- * Create a Tcl project from existing source with detect option switched on.
- * (DLTK-503)
- *
- */
- public void _testCreateTclProject003_FAILED() {
- String externalProjectName = helper.initExternalProject();
- helper.openTclPerspective();
-
- new ProjectOperations(bot).createFromSource(PROJECT_NAME,
- externalProjectName, true);
-
- // TODO: add implementation for compare of model structure (with detect
- // packages)
- helper.assertTclProject(PROJECT_NAME);
- }
-
- /**
- * Create a Tcl project from existing source with detect option switched
- * off. (DLTK-504)
- *
- */
- public void _testCreateTclProject004() {
- String externalProjectName = helper.initExternalProject();
- helper.openTclPerspective();
-
- new ProjectOperations(bot).createFromSource(PROJECT_NAME,
- externalProjectName, false);
-
- // TODO: add implementation for compare of model structure (without
- // detect packages)
- helper.assertTclProject(PROJECT_NAME);
- }
-
- /**
- * Create a Tcl project using a project specific interpreter. (DLTK-505)<br>
- *<br>
- * Predefined conditions:<br>
- * 1. System contain two interpreters<br>
- * 2. Tcl perspective is opened<br>
- * <br>
- * Actions:<br>
- * 1. Open "Create Tcl project" dialog<br>
- * 2. Select "Use a project specific interpreter" radio and select
- * alternative interpreter in combo<br>
- * 3. Enter project name and press "Finish" button<br>
- * 4. Press "OK"<br>
- * <br>
- * Expect:<br>
- * 1. Created Tcl project<br>
- * 2. Project have alternative Interpreter Library<br>
- *
- */
- public void testCreateTclProject005() {
- helper.openTclPerspective();
-
- helper.initDefAndAltInterpreters();
-
- new ProjectOperations(bot).createWithAltInterpr(PROJECT_NAME);
-
- helper.assertTclProject(PROJECT_NAME);
- helper.assertInterpreter(PROJECT_NAME,
- DltkTestsHelper.ALT_INTERPRETER_ID);
- }
-
- /**
- * Create a Tcl project with default undefined interpreter. (DLTK-506)
- *
- */
- public void testCreateTclProject006() {
- helper.assertInterpretersEmpty();
- helper.openTclPerspective();
-
- new ProjectOperations(bot).create(PROJECT_NAME);
-
- helper.assertTclProject(PROJECT_NAME);
- IScriptProject tclProject = DLTKCore.create(DltkTestsHelper
- .getProject(PROJECT_NAME));
-
- try {
- IInterpreterInstall interpreter = ScriptRuntime
- .getInterpreterInstall(tclProject);
- DltkTestsHelper.assertNull(interpreter);
- } catch (CoreException cex) {
- throw new RuntimeException(cex);
- }
- }
-
- /**
- * Close a Tcl project. (DLTK-507)
- *
- */
- public void testCloseTclProject() {
- initProject(true);
- helper.openTclPerspective();
-
- new ProjectOperations(bot).closeProject(PROJECT_NAME);
-
- IProject project = DltkTestsHelper.getProject(PROJECT_NAME);
- assertTrue(ErrorMessages.Project_errClose, !project.isOpen());
- }
-
- /**
- * Open a Tcl project. (DLTK-508)
- *
- */
- public void testOpenTclProject() {
- initProject(false);
- helper.openTclPerspective();
-
- new ProjectOperations(bot).openProject(PROJECT_NAME);
-
- IProject project = DltkTestsHelper.getProject(PROJECT_NAME);
- assertTrue(ErrorMessages.Project_errOpen, project.isOpen());
- }
-
- /**
- * Delete Tcl project. (DLTK-509)
- *
- */
- public void testDeleteProject() {
- initProject(true);
- helper.openTclPerspective();
- new ProjectOperations(bot).deleteProject(PROJECT_NAME);
- helper.assertProjectDoesNotExist(PROJECT_NAME);
- }
-
- /**
- * Delete a Tcl project without project content deletion. (DLTK-626)
- */
- public void testDeleteProjectByContextMenu001() {
- IScriptProject project = initProject(true);
- IPath path = project.getProject().getLocation();
- helper.openTclPerspective();
- new ProjectOperations(bot).deleteProjectByContextMenu(PROJECT_NAME,
- false);
- helper.assertProjectDoesNotExist(PROJECT_NAME);
- helper.assertProjectContentExist(path);
- }
-
- /**
- * Delete a Tcl project with project content. (DLTK-627)
- */
- public void testDeleteProjectByContextMenu002() {
- IScriptProject project = initProject(true);
- IPath path = project.getProject().getLocation();
- helper.openTclPerspective();
- new ProjectOperations(bot).deleteProjectByContextMenu(PROJECT_NAME,
- true);
- helper.assertProjectDoesNotExist(PROJECT_NAME);
- helper.assertProjectContentDoesNotExist(path);
- }
-
- // /////////////////////////////////////////////////////////////////////////
- //
- // Initialize methods
- //
- // /////////////////////////////////////////////////////////////////////////
- protected IScriptProject initProject(boolean open) {
- IScriptProject result = null;
- try {
- result = helper.setUpScriptProject(PROJECT_NAME);
- assertTrue(ErrorMessages.Project_errNotFound, result != null);
-
- IProject project = result.getProject();
- assertTrue(ErrorMessages.Project_errNotFound, project != null
- && project.exists());
-
- if (!open) {
- project.close(null);
- assertTrue(ErrorMessages.Project_errClose,
- project.isOpen() == open);
- } else {
- assertTrue(ErrorMessages.Project_errOpen,
- project.isOpen() == open);
- }
-
- return result;
- } catch (IOException ex) {
- throw new RuntimeException(ErrorMessages.Common_initError, ex);
- } catch (CoreException ex) {
- throw new RuntimeException(ErrorMessages.Common_initError, ex);
- }
- }
-
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/SWTBotEclipseTestCase.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/SWTBotEclipseTestCase.java
deleted file mode 100644
index a0d95ec..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/SWTBotEclipseTestCase.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot.complex;
-
-import junit.framework.TestCase;
-
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swtbot.eclipse.finder.SWTEclipseBot;
-import org.eclipse.ui.IViewReference;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-
-public class SWTBotEclipseTestCase extends TestCase {
- protected SWTEclipseBot bot = new SWTEclipseBot();
-
- public SWTBotEclipseTestCase() {
- super();
- }
-
- public SWTBotEclipseTestCase(String name) {
- super(name);
- }
-
- @Override
- public void runBare() throws Throwable {
- System.out.println("Running swtbot test: " + getName());
- final Throwable[] exceptions = new Throwable[1];
- final Thread t = new Thread() {
- @Override
- public void run() {
- try {
- superRunBare();
- } catch (Throwable e) {
- exceptions[0] = e;
- System.out.println("Exception catched:" + e.getMessage());
- }
- }
- };
- t.start();
- final long start = System.currentTimeMillis();
- final Display display = Display.getDefault();
- final Runnable timerRunnable = new Runnable() {
- public void run() {
- // EMPTY
- }
- };
- display.timerExec(50, timerRunnable);
- try {
- while (t.isAlive() && !display.isDisposed()) {
- try {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- } catch (SWTException e) {
- e.printStackTrace();
- }
- long cur = System.currentTimeMillis();
- if (cur - start > 600000) {
- throw new RuntimeException("Timeout in test");
- }
- }
- } finally {
- display.timerExec(-1, timerRunnable);
- }
- while (display.readAndDispatch()) {
- // NOP
- }
- if (exceptions[0] != null)
- throw exceptions[0];
- }
-
- public void superRunBare() throws Throwable {
- super.runBare();
- }
-
- public static void closeWelcome() {
- Display.getDefault().syncExec(new Runnable() {
-
- final String introId = "org.eclipse.ui.internal.introview"; //$NON-NLS-1$
-
- public void run() {
- IWorkbenchPage page = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage();
- IViewReference[] references = page.getViewReferences();
- for (int i = 0; i < references.length; i++) {
- final IViewReference reference = references[i];
- if (introId.equals(reference.getId())) {
- IWorkbenchPage p = reference.getPage();
- if (p != null) {
- p.hideView(reference);
- }
- }
- }
- }
- });
- }
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/SuiteOfTestCases.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/SuiteOfTestCases.java
deleted file mode 100644
index c57a0e9..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/complex/SuiteOfTestCases.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot.complex;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-
-import junit.framework.Protectable;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestResult;
-import junit.framework.TestSuite;
-
-import org.eclipse.dltk.core.tests.TestSupport;
-
-/**
- * A test case class that can be set up (using the setUpSuite() method) and tore
- * down (using the teardDownSuite() method) once for all test cases of this
- * class.
- */
-public abstract class SuiteOfTestCases extends SWTBotEclipseTestCase {
-
- /*
- * A test suite that initialize the test case's fields once, then that
- * copies the values of these fields intto each subsequent test case.
- */
- public static class Suite extends TestSuite {
- public SuiteOfTestCases currentTestCase;
-
- /*
- * Creates a new suite on the given class. This class must be a subclass
- * of SetupableTestSuite.
- */
- public Suite(Class theClass) {
- super(theClass);
- }
-
- /**
- * Creates a new suite on the given class. Only the methods specified in
- * the second parameter and included in the suite.
- *
- * @param theClass
- * @param methodNames
- */
- public Suite(Class theClass, String[] methodNames) {
- super(theClass.getName());
- for (int i = 0; i < methodNames.length; ++i) {
- final String methodName = methodNames[i];
- try {
- final Method method = theClass.getMethod(methodName,
- new Class[0]);
- if (Modifier.isPublic(method.getModifiers())
- && !Modifier.isStatic(method.getModifiers())) {
- addTest(createTest(theClass, methodName));
- } else {
- warning(methodName, "Wrong modifiers");
- }
- } catch (SecurityException e) {
- warning(methodName, e.toString());
- } catch (NoSuchMethodException e) {
- warning(methodName, e.toString());
- }
- }
- }
-
- private void warning(final String name, final String message) {
- addTest(new TestCase(name) {
- protected void runTest() {
- fail(message);
- }
- });
- }
-
- public Suite(String name) {
- super(name);
- }
-
- private void initialize(SuiteOfTestCases test) {
- Class currentClass = test.getClass();
- while (currentClass != null
- && !currentClass.equals(SuiteOfTestCases.class)) {
- Field[] fields = currentClass.getDeclaredFields();
- for (int i = 0, length = fields.length; i < length; i++) {
- Field field = fields[i];
-
- // skip static and final fields
- int modifiers = field.getModifiers();
- if (Modifier.isStatic(modifiers)
- || Modifier.isFinal(modifiers))
- continue;
-
- // make the field accessible
- field.setAccessible(true);
-
- try {
- Object value = field.get(this.currentTestCase);
- field.set(test, value);
- } catch (IllegalAccessException e) {
- }
- }
- currentClass = currentClass.getSuperclass();
- }
- }
-
- public void run(final TestResult result) {
- Protectable p = new Protectable() {
- public void protect() throws Exception {
- try {
- // run suite (first test run will setup the suite)
- superRun(result);
- } finally {
- // tear down the suite
- if (Suite.this.currentTestCase != null) {
- // protect against empty test suite
- Suite.this.currentTestCase.tearDownSuite();
- }
- }
- }
- };
- result.runProtected(this, p);
- }
-
- public void superRun(TestResult result) {
- super.run(result);
- }
-
- public void runTest(Test test, TestResult result) {
- if (test instanceof SuiteOfTestCases) {
- final SuiteOfTestCases current = (SuiteOfTestCases) test;
- if (this.currentTestCase == null) {
- // setup suite
- try {
- current.setUpSuite();
- } catch (Exception e) {
- e.printStackTrace();
- }
- } else {
- // copy the values of the previous current test case's
- // fields into the current one
- this.initialize(current);
- }
- try {
- super.runTest(test, result);
- } finally {
- // make current
- this.currentTestCase = current;
- }
- } else {
- /*
- * If there was error in TestCase constructor - the test will
- * not be of the SuiteOfTestCases type
- */
- super.runTest(test, result);
- }
- }
- }
-
- public SuiteOfTestCases(String name) {
- super(name);
- }
-
- /**
- * Setup the test suite once before all test cases run.
- */
- public void setUpSuite() throws Exception {
- }
-
- /**
- * Tear down the test suite once after all test cases have run.
- */
- public void tearDownSuite() throws Exception {
- }
-
- /**
- * Convenience method for subclasses of {@link SuiteOfTestCases}, identical
- * to
- *
- * <pre>
- * TestSupport.notYetImplemented(this);
- * </pre>
- *
- * @see TestSupport#notYetImplemented(junit.framework.TestCase)
- * @return <false> when not itself already in the call stack
- */
- public boolean notYetImplemented() {
- return TestSupport.notYetImplemented(this);
- }
-
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/EditorOperations.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/EditorOperations.java
deleted file mode 100644
index 67e251e..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/EditorOperations.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot.operations;
-
-import org.eclipse.dltk.ui.tests.swtbot.complex.EditorTests;
-import org.eclipse.swt.SWT;
-import org.eclipse.swtbot.eclipse.finder.SWTEclipseBot;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
-import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.utils.Position;
-import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
-
-public class EditorOperations extends Operations {
-
- private SWTBotEclipseEditor editorBot;
-
- public EditorOperations(SWTEclipseBot bot, String projectName, String path,
- final String scriptName) throws WidgetNotFoundException,
- TimeoutException {
- super(bot);
- SWTBotTreeItem scriptBot = navigateToProjectElement(projectName, path
- + "/" + scriptName);
- scriptBot.contextMenu(MENU_OPEN).click();
- editorBot = getBot().editor(scriptName);
- }
-
- public EditorOperations(SWTEclipseBot bot, SWTBotEclipseEditor editorBot) {
- super(bot);
- this.editorBot = editorBot;
- }
-
- /**
- * @see EditorTests#testGotoDeclaration001()
- * @see EditorTests#testGotoDeclaration002()
- * @see EditorTests#testGotoDeclaration003()
- * @see EditorTests#testGotoDeclaration004()
- * @see EditorTests#testGotoDeclaration005()
- * @see EditorTests#testGotoDeclaration006()
- * @see EditorTests#testGotoDeclaration007()
- * @see EditorTests#testGotoDeclaration008()
- * @see EditorTests#testGotoDeclaration009()
- * @see EditorTests#testGotoDeclaration010()
- *
- * @param pattern
- * @param selection
- * @param selLine
- */
- public void gotoDeclarationByF3(String pattern, String selection,
- String selLine) {
- Position pos = locatePattern(pattern);
- setCursorPosition(pos.line, pos.column);
- sendKeyboardEvent(SWT.F3);
-
- assertSelectedEquals(selection);
- assertCurrentLineEquals(selLine);
- }
-
- /**
- * @see EditorTests#testGotoDeclarationByContextMenu001()
- * @see EditorTests#testGotoDeclarationByContextMenu002()
- * @see EditorTests#testGotoDeclarationByContextMenu003()
- * @see EditorTests#testGotoDeclarationByContextMenu004()
- * @see EditorTests#testGotoDeclarationByContextMenu005()
- * @see EditorTests#testGotoDeclarationByContextMenu006()
- * @see EditorTests#testGotoDeclarationByContextMenu007()
- * @see EditorTests#testGotoDeclarationByContextMenu008()
- * @see EditorTests#testGotoDeclarationByContextMenu009()
- * @see EditorTests#testGotoDeclarationByContextMenu010()
- *
- * @param pattern
- * @param selection
- * @param selLine
- */
- public void gotoDeclarationByContextMenu(String pattern, String selection,
- String selLine) {
- try {
- Position pos = locatePattern(pattern);
- setCursorPosition(pos.line, pos.column);
- editorBot.contextMenu(Operations.MENU_OPEN_DECLARATION).click();
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
-
- assertSelectedEquals(selection);
- assertCurrentLineEquals(selLine);
- }
-
- /**
- * @see EditorTests#testGotoDeclarationByMainMenu001()
- * @see EditorTests#testGotoDeclarationByMainMenu002()
- * @see EditorTests#testGotoDeclarationByMainMenu003()
- * @see EditorTests#testGotoDeclarationByMainMenu004()
- * @see EditorTests#testGotoDeclarationByMainMenu005()
- * @see EditorTests#testGotoDeclarationByMainMenu006()
- * @see EditorTests#testGotoDeclarationByMainMenu007()
- * @see EditorTests#testGotoDeclarationByMainMenu008()
- * @see EditorTests#testGotoDeclarationByMainMenu009()
- * @see EditorTests#testGotoDeclarationByMainMenu010()
- *
- * @param pattern
- * @param selection
- * @param selLine
- */
- public void gotoDeclarationByMainMenu(String pattern, String selection,
- String selLine) {
- try {
- Position pos = locatePattern(pattern);
- setCursorPosition(pos.line, pos.column);
- getBot().menu(MENU_NAVIGATE).menu(MENU_OPEN_DECLARATION).click();
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
-
- assertSelectedEquals(selection);
- assertCurrentLineEquals(selLine);
- }
-
- // ///////////////////////////////////////////////////////////////
- //
- // Internal
- //
- // ///////////////////////////////////////////////////////////////
- protected void enterText(String text) {
- editorBot.setText(text);
- }
-
- protected void setCursorPosition(int line, int column) {
- editorBot.navigateTo(line, column);
- }
-
- protected Position locatePattern(String pattern) {
- for (int lineIndex = 0;; lineIndex++) {
- String line = editorBot.getTextOnLine(lineIndex);
- int col = line.indexOf(pattern);
- if (col != -1) {
- return new Position(lineIndex, col);
- }
- }
- }
-
- protected void sendKeyboardEvent(int modificationKey, int keyCode) {
- editorBot.notifyKeyboardEvent(modificationKey, (char) 0, keyCode);
- }
-
- protected void sendKeyboardEvent(int keyCode) {
- sendKeyboardEvent(0, keyCode);
- }
-
- protected void sendKeyboardEvent(int modificationKey, char character) {
- editorBot.notifyKeyboardEvent(modificationKey, character);
- }
-
- protected String getSelection() {
- return editorBot.getSelection();
- }
-
- protected String getTextOnCurrentLine() {
- return editorBot.getTextOnCurrentLine();
- }
-
- // ///////////////////////////////////////////////////////////////
- //
- // Asserts
- //
- // ///////////////////////////////////////////////////////////////
- public void assertSelectedEquals(final String expected) {
- final String errorMessage = "Expected " + expected;
- try {
- getBot().waitUntil(new DefaultCondition() {
-
- public String getFailureMessage() {
- return errorMessage;
- }
-
- public boolean test() throws Exception {
- String selection = getSelection();
- return expected.equals(selection);
- }
- });
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- public void assertCurrentLineEquals(final String expected) {
- final String errorMessage = "Expected " + expected;
- try {
- getBot().waitUntil(new DefaultCondition() {
-
- public String getFailureMessage() {
- return errorMessage;
- }
-
- public boolean test() throws Exception {
- String line = getTextOnCurrentLine();
- return line != null && expected.equals(line.trim());
- }
- });
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/InterpreterOperations.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/InterpreterOperations.java
deleted file mode 100644
index 11efc16..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/InterpreterOperations.java
+++ /dev/null
@@ -1,614 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot.operations;
-
-import java.text.MessageFormat;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.dltk.internal.debug.ui.interpreters.InterpretersMessages;
-import org.eclipse.dltk.ui.tests.swtbot.DltkTestsHelper;
-import org.eclipse.dltk.ui.tests.swtbot.ErrorMessages;
-import org.eclipse.dltk.ui.tests.swtbot.complex.InterpreterTests;
-import org.eclipse.swtbot.eclipse.finder.SWTEclipseBot;
-import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
-import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotRadio;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
-
-public class InterpreterOperations extends Operations {
-
- private static final String TCL_INTERPRETER_TYPE = OperationMessages.InterpreterOperations_tcl_interpreter_type;
-
- private static final String COL_NAME = OperationMessages.InterpreterOperations_col_name;
- private static final String COL_TYPE = OperationMessages.InterpreterOperations_col_type;
- private static final String COL_LOCATION = OperationMessages.InterpreterOperations_col_location;
-
- private static final String BTN_ADD = OperationMessages.InterpreterOperations_btn_add;
-
- private static final String FLD_INTERPR_NAME = createLabel(InterpretersMessages.addInterpreterDialog_InterpreterEnvironmentName);
- private static final String FLD_INTERPR_TYPE = createLabel(InterpretersMessages.addInterpreterDialog_InterpreterEnvironmentType);
- private static final String FLD_INTERPR_PATH = createLabel(InterpretersMessages.addInterpreterDialog_InterpreterExecutableName);
-
- private static final String DLG_ADD_INTERPRETER = OperationMessages.InterpreterOperations_dlg_add_interpreter;
- private static final String DLG_ADD_LIBRARY = OperationMessages.InterpreterOperations_dlg_add_library;
- private static final String DLG_EDIT_LIBRARY = OperationMessages.InterpreterOperations_dlg_edit_library;
- private static final String TAB_LIBRARIES = OperationMessages.InterpreterOperations_tab_libraries;
-
- private static final String RADIO_ALT_INTERPRETER = createLabel(InterpretersMessages.InterpretersComboBlock_1);
- private static final String RADIO_DEF_INTERPRETER = "Workspace default interpreter ({0})"; //$NON-NLS-1$
- private static final String TREE_INTERPRETER_LIBS = "Libraries and external folders on the build path:"; //$NON-NLS-1$
-
- private static final String BTN_OK = "OK";
- private static final String BTN_CANCEL = "Cancel";
- private static final String BTN_REMOVE = "Remove";
-
- public InterpreterOperations(SWTEclipseBot bot) {
- super(bot);
- }
-
- /**
- * Create an interpreter using add button. (DLTK-510)
- *
- * @see InterpreterTests#testCreate()
- *
- * @param path
- * @param interprName
- * @param isDefault
- * @param index
- */
- public void createInterpreter(String path, String interprName,
- boolean isDefault, int index) {
- try {
- openInterpreters();
-
- getBot().button(BTN_ADD).click();
- getBot().waitUntil(Conditions.shellIsActive(DLG_ADD_INTERPRETER));
- getBot().textWithLabel(FLD_INTERPR_NAME).setText(interprName);
- getBot().textWithLabel(FLD_INTERPR_PATH).setText(path);
-
- String type = getBot().comboBoxWithLabel(FLD_INTERPR_TYPE)
- .getText();
- SWTBotTestCase.assertEquals(TCL_INTERPRETER_TYPE, type);
-
- waitEnableAndClick(BTN_OK);
- getBot().waitUntil(Conditions.shellIsActive(DLG_PREFERENCES));
- SWTBotShell shell = getBot().shell(DLG_PREFERENCES);
- SWTBotTable tableBot = getBot().table();
- getBot().waitUntil(Conditions.tableHasRows(tableBot, index + 1));
-
- // Alternative interpreter will add to first row because table is
- // sorting by name.
- checkInterpreter(tableBot, path, interprName, isDefault, 0);
-
- waitEnableAndClick(BTN_OK);
- getBot().waitUntil(Conditions.shellCloses(shell));
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Change default interpreter. (DLTK-602)
- *
- * @see InterpreterTests#testChangeDefaultInterpreter()
- *
- * @throws WidgetNotFoundException
- * @throws TimeoutException
- */
- public void changeDefaultInterpreter() {
- try {
- openInterpreters();
- SWTBotShell shell = getBot().shell(DLG_PREFERENCES);
- SWTBotTable tableBot = getBot().table();
-
- checkInterpreter(tableBot, DltkTestsHelper.ALT_INTERPRETER_PATH,
- DltkTestsHelper.ALT_INTERPRETER_ID, false, 0);
- checkInterpreter(tableBot, DltkTestsHelper.DEF_INTERPRETER_PATH,
- DltkTestsHelper.DEF_INTERPRETER_ID, true, 1);
-
- tableBot.getTableItem(0).check();
-
- checkInterpreter(tableBot, DltkTestsHelper.ALT_INTERPRETER_PATH,
- DltkTestsHelper.ALT_INTERPRETER_ID, true, 0);
- checkInterpreter(tableBot, DltkTestsHelper.DEF_INTERPRETER_PATH,
- DltkTestsHelper.DEF_INTERPRETER_ID, false, 1);
-
- waitEnableAndClick(BTN_OK);
- getBot().waitUntil(Conditions.shellCloses(shell));
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Remove default interpreter. (DLTK-635)
- *
- * @see InterpreterTests#testRemoveDefaultInterpreter()
- *
- * @throws WidgetNotFoundException
- * @throws TimeoutException
- */
- public void removeDefaultInterpreter() {
- try {
- openInterpreters();
- SWTBotShell shell = getBot().shell(DLG_PREFERENCES);
- SWTBotTable tableBot = getBot().table();
-
- checkInterpreter(tableBot, DltkTestsHelper.ALT_INTERPRETER_PATH,
- DltkTestsHelper.ALT_INTERPRETER_ID, false, 0);
- checkInterpreter(tableBot, DltkTestsHelper.DEF_INTERPRETER_PATH,
- DltkTestsHelper.DEF_INTERPRETER_ID, true, 1);
-
- tableBot.select(1);
- getBot().button(BTN_REMOVE).click();
-
- tableBot = getBot().table();
- getBot().waitUntil(Conditions.tableHasRows(tableBot, 1));
-
- checkInterpreter(tableBot, DltkTestsHelper.ALT_INTERPRETER_PATH,
- DltkTestsHelper.ALT_INTERPRETER_ID, true, 0);
-
- waitEnableAndClick(BTN_OK);
- getBot().waitUntil(Conditions.shellCloses(shell));
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Remove several interpreters. (DLTK-644)
- *
- * @see InterpreterTests#testRemoveInterpreters()
- *
- * @throws WidgetNotFoundException
- * @throws TimeoutException
- */
- public void removeInterpreters() {
- try {
- openInterpreters();
- SWTBotShell shell = getBot().shell(DLG_PREFERENCES);
- SWTBotTable tableBot = getBot().table();
-
- getBot().waitUntil(Conditions.tableHasRows(tableBot, 3));
-
- tableBot.select(new int[] { 0, 2 });
- getBot().button(BTN_REMOVE).click();
-
- tableBot = getBot().table();
- getBot().waitUntil(Conditions.tableHasRows(tableBot, 1));
-
- waitEnableAndClick(BTN_OK);
- getBot().waitUntil(Conditions.shellCloses(shell));
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Remove all interpreters. (DLTK-645)
- *
- * @see InterpreterTests#testRemoveAllInterpreters()
- *
- * @throws WidgetNotFoundException
- * @throws TimeoutException
- */
- public void removeAllInterpreters() {
- try {
- openInterpreters();
- SWTBotShell shell = getBot().shell(DLG_PREFERENCES);
- SWTBotTable tableBot = getBot().table();
-
- getBot().waitUntil(Conditions.tableHasRows(tableBot, 1));
-
- tableBot.select(0);
- getBot().button(BTN_REMOVE).click();
-
- tableBot = getBot().table();
- getBot().waitUntil(Conditions.tableHasRows(tableBot, 0));
-
- waitEnableAndClick(BTN_OK);
- getBot().waitUntil(Conditions.shellCloses(shell));
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Add interpreter to a project with use Script Explorer context menu
- * "Properties". (DLTK-512)
- *
- * @param projectName
- *
- * @see InterpreterTests#testAdd001()
- *
- * @throws WidgetNotFoundException
- * @throws TimeoutException
- */
- public void addInterpreter001(String projectName) {
- try {
- SWTBotShell shell = openLibraryTab(projectName);
-
- SWTBotTree librariesBot = getBot().treeWithLabel(
- TREE_INTERPRETER_LIBS);
- String errorMessage = ErrorMessages.Interpreter_errInterprLibFound;
- SWTBotTestCase.assertFalse(errorMessage, librariesBot.hasItems());
-
- shell = openAddInterpreterLibrary();
- selectAltInterpreterLibrary();
- getBot().waitUntil(
- Conditions.shellIsActive(DLG_PRJ_PROPERTIES + projectName));
- shell = getBot().shell(DLG_PRJ_PROPERTIES + projectName);
- checkInterprLib(librariesBot, DltkTestsHelper.ALT_INTERPRETER_ID);
-
- waitEnableAndClick(BTN_OK);
- getBot().waitUntil(Conditions.shellCloses(shell));
-
- checkInterprContainer(projectName,
- DltkTestsHelper.ALT_INTERPRETER_ID);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Add interpreter to a project with use Script Explorer context menu
- * "Build Path/Configure Build Path...". (DLTK-512)
- *
- * @param projectName
- *
- * @see InterpreterTests#testAdd002()
- *
- * @throws WidgetNotFoundException
- * @throws TimeoutException
- */
- public void addInterpreter002(String projectName) {
- try {
- SWTBotTreeItem projectBot = getProjectItem(projectName);
- projectBot
- .contextMenu(
- OperationMessages.InterpreterOperations_context_menu_build_path)
- .menu(
- OperationMessages.InterpreterOperations_menu_configure_build_path)
- .click(); //$NON-NLS-1$
- // clickContextSubMenu(projectBot,
- // OperationMessages.InterpreterOperations_context_menu_build_path,
- //OperationMessages.InterpreterOperations_menu_configure_build_path)
- // ;
- final String dlgProp = DLG_PRJ_PROPERTIES + projectName;
- getBot().waitUntil(Conditions.shellIsActive(dlgProp));
- SWTBotShell shell = getBot().shell(dlgProp);
- getBot().tabItem(TAB_LIBRARIES).activate(); //$NON-NLS-1$
-
- SWTBotTree librariesBot = getBot().treeWithLabel(
- TREE_INTERPRETER_LIBS);
- String errorMessage = ErrorMessages.Interpreter_errInterprLibFound;
- SWTBotTestCase.assertFalse(errorMessage, librariesBot.hasItems());
-
- shell = openAddInterpreterLibrary();
- selectDefInterpreterLibrary(false);
- getBot().waitUntil(Conditions.shellIsActive(dlgProp));
- shell = getBot().shell(dlgProp);
- checkInterprLib(librariesBot, DltkTestsHelper.DEF_INTERPRETER_ID);
-
- waitEnableAndClick(BTN_OK);
- getBot().waitUntil(Conditions.shellCloses(shell));
-
- checkInterprContainer(projectName,
- DltkTestsHelper.DEF_INTERPRETER_ID);
-
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Try to add several Interpreter Libraries to a project. (DLTK-646)
- *
- * @param projectName
- *
- * @see InterpreterTests#testAdd003()
- *
- * @throws WidgetNotFoundException
- * @throws TimeoutException
- */
- public void addInterpreter003(String projectName) {
- try {
- SWTBotShell shell = openLibraryTab(projectName);
-
- SWTBotTree librariesBot = getBot().treeWithLabel(
- TREE_INTERPRETER_LIBS);
- checkInterprLib(librariesBot, DltkTestsHelper.DEF_INTERPRETER_ID);
-
- shell = openAddInterpreterLibrary();
- selectAltInterpreterLibrary();
-
- getBot().waitUntil(
- Conditions.shellIsActive(DLG_PRJ_PROPERTIES + projectName));
- shell = getBot().shell(DLG_PRJ_PROPERTIES + projectName);
- // TODO: add check of error message
-
- checkInterprLib(librariesBot, DltkTestsHelper.DEF_INTERPRETER_ID);
-
- String errorMessage = ErrorMessages.Interpreter_errSeveralInterprLibFound;
- assertInterprLibNotExist(errorMessage, librariesBot,
- DltkTestsHelper.ALT_INTERPRETER_ID);
-
- final SWTBotButton btnBot = getBot().button(BTN_OK);
- assertNotEnabled(btnBot);
-
- // check for error message
- try {
- getBot()
- .text(
- OperationMessages.InterpreterOperations_build_path_can_not_contain_mult_interpr);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase
- .assertTrue(
- "Error message \'"
- + OperationMessages.InterpreterOperations_build_path_can_not_contain_mult_interpr
- + "\' not found.", false);
- }
- waitEnableAndClick(BTN_CANCEL);
- getBot().waitUntil(Conditions.shellCloses(shell));
-
- checkInterprContainer(projectName,
- DltkTestsHelper.DEF_INTERPRETER_ID);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Set default interpreter to a project. (DLTK-513)
- *
- * @param projectName
- *
- * @see InterpreterTests#testSetDefault()
- *
- * @throws WidgetNotFoundException
- * @throws TimeoutException
- */
- public void changeInterpreter001(String projectName) {
- try {
- SWTBotShell shell = openLibraryTab(projectName);
-
- SWTBotTree librariesBot = getBot().treeWithLabel(
- TREE_INTERPRETER_LIBS);
- checkInterprLib(librariesBot, DltkTestsHelper.ALT_INTERPRETER_ID);
-
- shell = openEditInterpreterLibrary(librariesBot);
- selectDefInterpreterLibrary(true);
-
- getBot().waitUntil(
- Conditions.shellIsActive(DLG_PRJ_PROPERTIES + projectName));
- shell = getBot().shell(DLG_PRJ_PROPERTIES + projectName);
- checkInterprLib(librariesBot, DltkTestsHelper.DEF_INTERPRETER_ID);
-
- waitEnableAndClick(BTN_OK);
- getBot().waitUntil(Conditions.shellCloses(shell));
-
- checkInterprContainer(projectName,
- DltkTestsHelper.DEF_INTERPRETER_ID);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Set alternative interpreter to a project. (DLTK-514)
- *
- * @param projectName
- *
- * @see InterpreterTests#testSetAlternative()
- *
- * @throws WidgetNotFoundException
- * @throws TimeoutException
- */
- public void changeInterpreter002(String projectName) {
- try {
- SWTBotShell shell = openLibraryTab(projectName);
-
- SWTBotTree librariesBot = getBot().treeWithLabel(
- TREE_INTERPRETER_LIBS);
- checkInterprLib(librariesBot, DltkTestsHelper.DEF_INTERPRETER_ID);
-
- shell = openEditInterpreterLibrary(librariesBot);
- selectAltInterpreterLibrary();
-
- getBot().waitUntil(
- Conditions.shellIsActive(DLG_PRJ_PROPERTIES + projectName));
- shell = getBot().shell(DLG_PRJ_PROPERTIES + projectName);
- checkInterprLib(librariesBot, DltkTestsHelper.ALT_INTERPRETER_ID);
-
- waitEnableAndClick(BTN_OK);
- getBot().waitUntil(Conditions.shellCloses(shell));
-
- checkInterprContainer(projectName,
- DltkTestsHelper.ALT_INTERPRETER_ID);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Remove interpreter from a project. (DLTK-515)
- *
- * @param projectName
- *
- * @see InterpreterTests#testRemoveFromProject()
- *
- * @throws WidgetNotFoundException
- * @throws TimeoutException
- */
- public void removeInterpreter(String projectName) {
- try {
- SWTBotShell shell = openLibraryTab(projectName);
-
- SWTBotTree librariesBot = getBot().treeWithLabel(
- TREE_INTERPRETER_LIBS);
- checkInterprLib(librariesBot, DltkTestsHelper.DEF_INTERPRETER_ID);
-
- // librariesBot.select(0);
- librariesBot.getAllItems()[0].select();
- getBot().button(BTN_REMOVE).click();
- String errorMessage = ErrorMessages.Interpreter_errInterprLibFound;
- SWTBotTestCase.assertFalse(errorMessage, librariesBot.hasItems());
-
- waitEnableAndClick(BTN_OK);
- getBot().waitUntil(Conditions.shellCloses(shell));
-
- SWTBotTreeItem projectBot = getProjectItem(projectName);
- String nodeText = createInterpLibNodeName(DltkTestsHelper.DEF_INTERPRETER_ID);
- // TODO
- // SWTBotTestCase.assertNull(
- // ErrorMessages.Interpreter_errInterprLibFound, projectBot
- // .expand().getNode(nodeText));
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- protected SWTBotShell openLibraryTab(String projectName)
- throws WidgetNotFoundException, TimeoutException {
- SWTBotTreeItem projectItem = getProjectItem(projectName);
- SWTBotShell shell = openProperties(projectItem);
- expandTree("Tcl", "Build Path"); //$NON-NLS-1$ //$NON-NLS-2$
- getBot().tabItem(TAB_LIBRARIES).activate();
- return shell;
- }
-
- protected SWTBotShell openAddInterpreterLibrary()
- throws WidgetNotFoundException, TimeoutException {
- getBot()
- .button(OperationMessages.InterpreterOperations_btn_add_library)
- .click();
- getBot().waitUntil(Conditions.shellIsActive(DLG_ADD_LIBRARY));
- SWTBotShell shell = getBot().shell(DLG_ADD_LIBRARY);
- getBot().list().select("Tcl Interpreter Libraries"); //$NON-NLS-1$
- getBot().button(WIZARD_NEXT).click();
- return shell;
- }
-
- protected SWTBotShell openEditInterpreterLibrary(SWTBotTree librariesBot)
- throws WidgetNotFoundException, TimeoutException {
- librariesBot.getAllItems()[0].select();
- // librariesBot.select(0);
- getBot().button(OperationMessages.InterpreterOperations_btn_edit)
- .click();
- getBot().waitUntil(Conditions.shellIsActive(DLG_EDIT_LIBRARY));
- return getBot().shell(DLG_EDIT_LIBRARY);
- }
-
- protected void selectAltInterpreterLibrary()
- throws WidgetNotFoundException, TimeoutException {
- SWTBotCombo altInterprBot = getBot().comboBox(0);
- SWTBotTestCase.assertNotEnabled(altInterprBot);
-
- getBot().radio(RADIO_ALT_INTERPRETER).click();
- SWTBotTestCase.assertEnabled(altInterprBot);
-
- altInterprBot.setSelection(DltkTestsHelper.ALT_INTERPRETER_ID);
- getBot().button(WIZARD_FINISH).click();
- }
-
- protected void selectDefInterpreterLibrary(boolean select)
- throws WidgetNotFoundException, TimeoutException {
- String widgetName = MessageFormat.format(RADIO_DEF_INTERPRETER,
- new Object[] { DltkTestsHelper.DEF_INTERPRETER_ID });
- SWTBotRadio defInterprBot = getBot().radio(widgetName);
- boolean isDefInterpreterSelected = defInterprBot.isSelected();
-
- if (select) {
- defInterprBot.click();
- isDefInterpreterSelected = defInterprBot.isSelected();
- }
-
- SWTBotTestCase.assertTrue(isDefInterpreterSelected);
- SWTBotTestCase.assertNotEnabled(getBot().comboBox(0));
- getBot().button(WIZARD_FINISH).click();
- }
-
- private String createInterpLibNodeName(String interprName) {
- return "Interpreter Libraries [" + interprName + "]"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void checkInterprContainer(String projectName, String interprName)
- throws WidgetNotFoundException, TimeoutException {
- getProjectItem(projectName);
- String nodeText = createInterpLibNodeName(interprName);
- expandTree(projectName, nodeText);
- }
-
- protected void checkInterpreter(SWTBotTable tableBot, String path,
- String interprName, boolean isDefault, int index) {
-
- SWTBotTestCase.assertTrue(ErrorMessages.Common_errColumnCount, tableBot
- .columnCount() == 3);
- SWTBotTestCase
- .assertEquals(interprName, tableBot.cell(index, COL_NAME));
- SWTBotTestCase.assertEquals(TCL_INTERPRETER_TYPE, tableBot.cell(index,
- COL_TYPE));
- IPath expectedPath = new Path(path);
- IPath actualPath = new Path(tableBot.cell(index, COL_LOCATION));
- SWTBotTestCase.assertEquals(expectedPath, actualPath);
-
- String errorMessage = isDefault ? ErrorMessages.Common_errNotChecked
- : ErrorMessages.Common_errChecked;
- errorMessage = ErrorMessages.format(errorMessage, "Row " + index); //$NON-NLS-1$
- SWTBotTestCase.assertEquals(errorMessage, tableBot.getTableItem(index)
- .isChecked(), isDefault);
- }
-
- protected void checkInterprLib(SWTBotTree librariesBot, String interprName)
- throws WidgetNotFoundException {
- librariesBot.getTreeItem(createInterpLibNodeName(interprName));
- }
-
- protected void assertInterprLibNotExist(String errorMessage,
- SWTBotTree librariesBot, String interprName) {
- try {
- checkInterprLib(librariesBot, interprName);
- } catch (Exception e) {
- SWTBotTestCase.fail(errorMessage);
- }
- }
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/LaunchOperations.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/LaunchOperations.java
deleted file mode 100644
index b45d378..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/LaunchOperations.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot.operations;
-
-import org.eclipse.dltk.ui.tests.swtbot.complex.LaunchTests;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swtbot.eclipse.finder.SWTEclipseBot;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
-import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotStyledText;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-public class LaunchOperations extends Operations {
-
- private static final String CONSOLE_RESULT = "Hello world !!!\n";
-
- public LaunchOperations(SWTEclipseBot bot) {
- super(bot);
- }
-
- /**
- * @see LaunchTests#testRunByContextMenu()
- *
- * @param projectName
- * @param scriptName
- */
- public void runByContextMenu(String projectName, String scriptName) {
- try {
- SWTBotTreeItem projectBot = navigateToProjectElement(projectName,
- scriptName);
- projectBot.contextMenu(MENU_RUN_AS).menu("1 Tcl Script").click();
- // clickContextSubMenu(projectBot, MENU_RUN_AS, "1 Tcl Script");
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * @see LaunchTests#testDebugByContextMenu()
- *
- * @param projectName
- * @param scriptName
- */
- public void debugByContextMenu(String projectName, String scriptName) {
- try {
- SWTBotTreeItem projectBot = navigateToProjectElement(projectName,
- scriptName);
- projectBot.contextMenu(MENU_DEBUG_AS).menu("1 Tcl Script").click();
- // clickContextSubMenu(projectBot, MENU_DEBUG_AS, "1 Tcl Script");
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * @see LaunchTests#testCheckDebugPreferences()
- *
- * @param projectName
- */
- public void checkDebugPreferences(String projectName) {
- try {
- SWTBotShell preffBot = openPreferences();
- expandTree(PREFERENCES_TCL, "Debug");
- // not implemented
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- // /////////////////////////////////////////////////////////////////////
- //
- // Asserts
- //
- // /////////////////////////////////////////////////////////////////////
- /**
- * @see LaunchTests#testRunByContextMenu()
- * @see LaunchTests#testDebugByContextMenu()
- */
- public void assertExecuteCompleteOk() {
- try {
- SWTBotStyledText consoleBot = getConsole();
- SWTBotTestCase.assertEquals(CONSOLE_RESULT, consoleBot.getText());
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- public void waitingDebugConsole() {
- try {
- // IViewPart debugView;
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- try {
- PlatformUI.getWorkbench().getActiveWorkbenchWindow()
- .getActivePage().showView(
- "org.eclipse.debug.ui.DebugView");
- } catch (PartInitException e) {
- e.printStackTrace();
- }
- }
- });
- SWTBotView debugViewBot = getBot().view("Debug");
- debugViewBot.setFocus();
- getBot().waitUntil(new DefaultCondition() {
- public String getFailureMessage() {
- return null;
- }
-
- public boolean test() throws Exception {
- try {
- SWTBotTreeItem[] items = getBot().tree().getAllItems();
- return items[0].getText().contains("<terminated>");
- } catch (Exception e) {
- return false;
- }
- }
- });
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- public void assertExecuteCompleteWithError() {
- try {
- SWTBotStyledText consoleBot = getConsole();
- SWTBotTestCase.assertFalse(CONSOLE_RESULT.equals(consoleBot
- .getText()));
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/OperationMessages.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/OperationMessages.java
deleted file mode 100644
index b117e97..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/OperationMessages.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot.operations;
-
-import java.text.MessageFormat;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author Sergey
- *
- */
-public class OperationMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.dltk.ui.tests.swtbot.operations.OperationMessages"; //$NON-NLS-1$
- public static String InterpreterOperations_btn_add;
- public static String InterpreterOperations_btn_add_library;
- public static String InterpreterOperations_btn_edit;
- public static String InterpreterOperations_col_location;
- public static String InterpreterOperations_col_name;
- public static String InterpreterOperations_col_type;
- public static String InterpreterOperations_context_menu_build_path;
- public static String InterpreterOperations_menu_configure_build_path;
- public static String InterpreterOperations_dlg_add_interpreter;
- public static String InterpreterOperations_dlg_add_library;
- public static String InterpreterOperations_dlg_edit_library;
- public static String InterpreterOperations_tab_libraries;
- public static String InterpreterOperations_tcl_interpreter_type;
- public static String InterpreterOperations_build_path_can_not_contain_mult_interpr;
- public static String Operations_dlg_confirm_delete;
- public static String Operations_dlg_create_tcl_file;
- public static String Operations_dlg_delete_resource;
- public static String Operations_dlg_new_file;
- public static String Operations_dlg_new_folder;
- public static String Operations_dlg_new_project;
- public static String Operations_dlg_new_source_folder;
- public static String Operations_dlg_preferences;
- public static String Operations_dlg_prj_properties;
- public static String Operations_dlg_rename;
- public static String Operations_dlg_rename_script_project;
- public static String Operations_dlg_rename_source_folder;
- public static String Operations_dlg_rename_source_module;
- public static String Operations_menu_copy;
- public static String Operations_menu_debug_as;
- public static String Operations_menu_delete;
- public static String Operations_menu_edit;
- public static String Operations_menu_file;
- public static String Operations_menu_navigate;
- public static String Operations_menu_new;
- public static String Operations_menu_new_file;
- public static String Operations_menu_new_folder;
- public static String Operations_menu_new_project;
- public static String Operations_menu_new_source_folder;
- public static String Operations_menu_open;
- public static String Operations_menu_open_declaration;
- public static String Operations_menu_paste;
- public static String Operations_menu_preferences;
- public static String Operations_menu_refactor;
- public static String Operations_menu_rename;
- public static String Operations_menu_run_as;
- public static String Operations_menu_tcl_file;
- public static String Operations_menu_tcl_project;
- public static String Operations_menu_window;
- public static String Operations_preferences_tcl;
- public static String Operations_script_popup_close_prj;
- public static String Operations_script_popup_open_prj;
- public static String Operations_script_popup_properties;
- public static String Operations_view_console;
- public static String Operations_view_script_explorer;
- public static String ProjectOperations_dlg_btn_dlt_prj;
- public static String ProjectOperations_check_delete_package;
- public static String ProjectOperations_check_delete_contents;
- public static String ProjectOperations_radio_delete_contents;
- public static String ProjectOperations_radio_do_not_delete_contents;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, OperationMessages.class);
- }
-
- private OperationMessages() {
- }
-
- public static String format(String message, Object object) {
- return MessageFormat.format(message, new Object[] { object });
- }
-
- public static String format(String message, Object[] objects) {
- return MessageFormat.format(message, objects);
- }
-
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/OperationMessages.properties b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/OperationMessages.properties
deleted file mode 100644
index e4ac75d..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/OperationMessages.properties
+++ /dev/null
@@ -1,72 +0,0 @@
-
-#Eclipse 3.3.2
-#Operations_menu_preferences=Preferences...
-#ProjectOperations_dlg_btn_dlt_prj=Yes
-#Operations_dlg_delete_resource=Confirm Project Delete
-
-#Eclipse 3.4
-Operations_menu_preferences=Preferences
-ProjectOperations_dlg_btn_dlt_prj=OK
-Operations_dlg_delete_resource=Delete Resources
-
-InterpreterOperations_btn_add=Add...
-InterpreterOperations_btn_edit=Edit...
-InterpreterOperations_btn_add_library=Add Library...
-InterpreterOperations_col_location=Location
-InterpreterOperations_col_name=Name
-InterpreterOperations_col_type=Type
-InterpreterOperations_context_menu_build_path=Build Path
-InterpreterOperations_menu_configure_build_path=Configure Build Path...
-InterpreterOperations_dlg_add_interpreter=Add interpreter
-InterpreterOperations_dlg_add_library=Add Library
-InterpreterOperations_dlg_edit_library=Edit Library
-InterpreterOperations_tab_libraries=Libraries
-InterpreterOperations_tcl_interpreter_type=Generic Tcl
-InterpreterOperations_build_path_can_not_contain_mult_interpr=Build path can not contain multiple interpreters
-
-Operations_dlg_confirm_delete=Confirm Delete
-Operations_dlg_create_tcl_file=Create Tcl File
-Operations_dlg_new_file=New File
-Operations_dlg_new_folder=New Folder
-Operations_dlg_new_project=New Project
-Operations_dlg_new_source_folder=New Source Folder
-Operations_dlg_preferences=Preferences
-Operations_dlg_prj_properties=Properties for
-Operations_dlg_rename=Rename Resource
-Operations_dlg_rename_script_project=Rename Script Project
-Operations_dlg_rename_source_folder=Rename Source Folder
-Operations_dlg_rename_source_module=Rename Source Module
-Operations_menu_copy=Copy
-Operations_menu_debug_as=Debug As
-Operations_menu_delete=Delete
-Operations_menu_edit=Edit
-Operations_menu_file=File
-Operations_menu_navigate=Navigate
-Operations_menu_new=New
-Operations_menu_new_file=File
-Operations_menu_new_folder=Folder
-Operations_menu_new_project=Project...
-Operations_menu_new_source_folder=Source Folder
-Operations_menu_open=Open
-Operations_menu_open_declaration=Open Declaration
-Operations_menu_paste=Paste
-
-ProjectOperations_check_delete_contents=&Delete project contents on disk (cannot be undone)
-ProjectOperations_radio_delete_contents=&Also delete contents under "{0}"
-ProjectOperations_radio_do_not_delete_contents=&Do not delete contents
-
-Operations_menu_refactor=Refactor
-Operations_menu_rename=Rename...
-Operations_menu_run_as=Run As
-Operations_menu_tcl_file=Tcl File
-Operations_menu_tcl_project=Tcl Project
-Operations_menu_window=Window
-Operations_preferences_tcl=Tcl
-Operations_script_popup_close_prj=Close Project
-Operations_script_popup_open_prj=Open Project
-Operations_script_popup_properties=Properties
-Operations_view_console=Console
-Operations_view_script_explorer=Script Explorer
-
-ProjectOperations_check_delete_package=Detect packages from source code
-
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/Operations.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/Operations.java
deleted file mode 100644
index 6ba5586..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/Operations.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot.operations;
-
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.dltk.ui.tests.swtbot.ErrorMessages;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swtbot.eclipse.finder.SWTEclipseBot;
-import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
-import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.finders.MenuFinder;
-import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
-import org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory;
-import org.eclipse.swtbot.swt.finder.results.WidgetResult;
-import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
-import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotRadio;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotStyledText;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
-
-public class Operations {
-
- public static final String MENU_FILE = OperationMessages.Operations_menu_file;
- public static final String MENU_EDIT = OperationMessages.Operations_menu_edit;
- public static final String MENU_REFACTOR = OperationMessages.Operations_menu_refactor;
- public static final String MENU_NAVIGATE = OperationMessages.Operations_menu_navigate;
- public static final String MENU_WINDOW = OperationMessages.Operations_menu_window;
- public static final String MENU_PREFERENCES = OperationMessages.Operations_menu_preferences;
- public static final String MENU_NEW = OperationMessages.Operations_menu_new;
- public static final String MENU_OPEN = OperationMessages.Operations_menu_open;
- public static final String MENU_NEW_PROJECT = OperationMessages.Operations_menu_new_project;
- public static final String MENU_TCL_PROJECT = OperationMessages.Operations_menu_tcl_project;
- public static final String MENU_NEW_FILE = OperationMessages.Operations_menu_new_file;
- public static final String MENU_TCL_FILE = OperationMessages.Operations_menu_tcl_file;
- public static final String MENU_NEW_FOLDER = OperationMessages.Operations_menu_new_folder;
- public static final String MENU_NEW_SOURCE_FOLDER = OperationMessages.Operations_menu_new_source_folder;
- public static final String MENU_COPY = OperationMessages.Operations_menu_copy;
- public static final String MENU_PASTE = OperationMessages.Operations_menu_paste;
- public static final String MENU_DELETE = OperationMessages.Operations_menu_delete;
- public static final String MENU_RENAME = OperationMessages.Operations_menu_rename;
-
- public static final String MENU_RUN_AS = OperationMessages.Operations_menu_run_as;
- public static final String MENU_DEBUG_AS = OperationMessages.Operations_menu_debug_as;
-
- public static final String MENU_OPEN_DECLARATION = OperationMessages.Operations_menu_open_declaration;
-
- public static final String WIZARD_NEXT = createLabel(IDialogConstants.NEXT_LABEL);
- public static final String WIZARD_FINISH = createLabel(IDialogConstants.FINISH_LABEL);
-
- public static final String SCRIPT_POPUP_OPEN_PRJ = OperationMessages.Operations_script_popup_open_prj;
- public static final String SCRIPT_POPUP_CLOSE_PRJ = OperationMessages.Operations_script_popup_close_prj;
- public static final String SCRIPT_POPUP_PROPERTIES = OperationMessages.Operations_script_popup_properties;
-
- public static final String DLG_PREFERENCES = OperationMessages.Operations_dlg_preferences;
- public static final String DLG_PRJ_PROPERTIES = OperationMessages.Operations_dlg_prj_properties;
- public static final String DLG_NEW_PROJECT = OperationMessages.Operations_dlg_new_project;
- public static final String DLG_NEW_FILE = OperationMessages.Operations_dlg_new_file;
- public static final String DLG_NEW_FOLDER = OperationMessages.Operations_dlg_new_folder;
- public static final String DLG_NEW_SOURCE_FOLDER = OperationMessages.Operations_dlg_new_source_folder;
- public static final String DLG_CREATE_TCL_FILE = OperationMessages.Operations_dlg_create_tcl_file;
- public static final String DLG_RENAME = OperationMessages.Operations_dlg_rename;
- public static final String DLG_RENAME_SCRIPT_PROJECT = OperationMessages.Operations_dlg_rename_script_project;
- public static final String DLG_RENAME_SOURCE_FOLDER = OperationMessages.Operations_dlg_rename_source_folder;
- public static final String DLG_RENAME_SOURCE_MODULE = OperationMessages.Operations_dlg_rename_source_module;
- public static final String DLG_CONFIRM_DELETE = OperationMessages.Operations_dlg_confirm_delete;
-
- public static final String VIEW_SCRIPT_EXPLORER = OperationMessages.Operations_view_script_explorer;
- public static final String VIEW_CONSOLE = OperationMessages.Operations_view_console;
-
- public static final String PREFERENCES_TCL = OperationMessages.Operations_preferences_tcl;
-
- /**
- * Remove <code>&</code> symbol.
- *
- * @param src
- * @return
- */
- public static String createLabel(String src) {
- return src.replace("&", ""); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- private SWTEclipseBot bot;
-
- public Operations(SWTEclipseBot bot) {
- this.bot = bot;
- }
-
- protected SWTEclipseBot getBot() {
- return bot;
- }
-
- protected void waitEnableAndClick(final String name)
- throws WidgetNotFoundException, TimeoutException {
- final SWTBotButton btnBot = getBot().button(name);
- getBot().waitUntil(new DefaultCondition() {
- private String errorMessage = "Can't click to button " + name; //$NON-NLS-1$
-
- public String getFailureMessage() {
- return errorMessage;
- }
-
- public boolean test() throws Exception {
- try {
- btnBot.click();
- return true;
- } catch (Exception ex) {
- errorMessage = ex.getLocalizedMessage();
- return false;
- }
- }
- });
- }
-
- protected SWTBotShell openPreferences() throws WidgetNotFoundException,
- TimeoutException {
- getBot().menu(MENU_WINDOW).menu(MENU_PREFERENCES).click();
- getBot().waitUntil(Conditions.shellIsActive(DLG_PREFERENCES));
- SWTBotShell result = getBot().shell(DLG_PREFERENCES);
- return result;
- }
-
- protected SWTBotShell openInterpreters() throws WidgetNotFoundException,
- TimeoutException {
- SWTBotShell shell = openPreferences();
- expandTree(PREFERENCES_TCL, "Interpreters"); //$NON-NLS-1$
- return shell;
- }
-
- protected SWTBotShell openProperties(SWTBotTreeItem projectTree)
- throws WidgetNotFoundException, TimeoutException {
- projectTree.contextMenu(SCRIPT_POPUP_PROPERTIES).click();
- String dlgProp = DLG_PRJ_PROPERTIES + projectTree.getText();
- getBot().waitUntil(Conditions.shellIsActive(dlgProp));
- return getBot().shell(dlgProp);
- }
-
- protected SWTBotTreeItem expandTree(String item, String subitem)
- throws WidgetNotFoundException, TimeoutException {
- SWTBotTree treeBot = getBot().tree();
- SWTBotTreeItem result = treeBot.getTreeItem(item).expand().expandNode(
- subitem);
- result.select();
- return result;
- }
-
- protected SWTBotStyledText getConsole() throws WidgetNotFoundException,
- TimeoutException {
- SWTBotView viewBot = getBot().view(VIEW_CONSOLE);
- viewBot.setFocus();
- return getBot().styledText(0);
- }
-
- protected void closeConsole() throws WidgetNotFoundException,
- TimeoutException {
- SWTBotView viewBot = getBot().view(VIEW_CONSOLE);
- viewBot.close();
- }
-
- protected SWTBotTreeItem getProjectItem(String name)
- throws WidgetNotFoundException, TimeoutException {
- SWTBotView viewBot = getBot().view(VIEW_SCRIPT_EXPLORER);
- viewBot.setFocus();
- final SWTBotTree treeBot = getBot().tree();
- SWTBotTreeItem result = treeBot.getTreeItem(name);
- result.select();
- return result;
- }
-
- protected SWTBotTreeItem navigateToProjectElement(String projectName,
- String pathToElement) throws WidgetNotFoundException,
- TimeoutException {
- return navigateToProjectElement(getProjectItem(projectName),
- pathToElement);
- }
-
- protected SWTBotTreeItem navigateToProjectElement(SWTBotTreeItem item,
- String pathToElement) throws WidgetNotFoundException,
- TimeoutException {
- StringTokenizer tok = new StringTokenizer(pathToElement, "/\\"); //$NON-NLS-1$
- while (tok.hasMoreTokens()) {
- item.expand();
- String name = tok.nextToken();
- item = item.getNode(name);
- if (item == null) {
- throw new WidgetNotFoundException("Element " + name //$NON-NLS-1$
- + " not found in project tree"); //$NON-NLS-1$
- }
- }
- item.select();
- return item;
- }
-
- ////////////////////////////////////////////////////////////////////////////
- //
- // Asserts
- //
- ////////////////////////////////////////////////////////////////////////////
-
- protected void assertNotEnabled(AbstractSWTBot widget) {
- String errMessage = ErrorMessages.Common_errEnabled;
- errMessage = ErrorMessages.format(errMessage, widget.getText());
- SWTBotTestCase.assertFalse(errMessage, widget.isEnabled());
- }
-
- protected void assertSelected(SWTBotRadio radio) {
- String errMessage = ErrorMessages.Common_errNotChecked;
- errMessage = ErrorMessages.format(errMessage, radio.getText());
- SWTBotTestCase.assertTrue(errMessage, radio.isSelected());
- }
-
- protected void assertNotSelected(SWTBotRadio radio) {
- String errMessage = ErrorMessages.Common_errNotChecked;
- errMessage = ErrorMessages.format(errMessage, radio.getText());
- SWTBotTestCase.assertFalse(errMessage, radio.isSelected());
- }
-
- protected void assertChecked(SWTBotCheckBox detectPackage) {
- String errMessage = ErrorMessages.Common_errNotChecked;
- errMessage = ErrorMessages.format(errMessage, detectPackage.getText());
- SWTBotTestCase.assertTrue(errMessage, detectPackage.isChecked());
- }
-
- protected void assertNotChecked(SWTBotCheckBox detectPackage) {
- String errMessage = ErrorMessages.Common_errChecked;
- errMessage = ErrorMessages.format(errMessage, detectPackage.getText());
- SWTBotTestCase.assertFalse(errMessage, detectPackage.isChecked());
- }
-
- public void assertProjectElementExist(String projectName,
- String pathToElement) {
- try {
- navigateToProjectElement(projectName, pathToElement);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- public void assertProjectElementNotExist(String projectName, String path) {
- try {
- navigateToProjectElement(projectName, path);
- SWTBotTestCase.fail("Unexpected element in a tree: " + path); //$NON-NLS-1$
- } catch (WidgetNotFoundException ex) {
- } catch (TimeoutException ex) {
- }
- }
-
- public void assertProjectElementNotExist(String projectName, String path,
- String name) {
- SWTBotTreeItem bot = null;
- try {
- bot = navigateToProjectElement(projectName, path);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
-
- bot.expand();
-
- String errorMessage = "Unexpected element in a tree. Path: " + path //$NON-NLS-1$
- + ", element: " + name; //$NON-NLS-1$
- SWTBotTestCase.assertNotNull(errorMessage, bot.getNode(name));
- }
-
- protected void clickContextSubMenu(SWTBotTreeItem treeItem,
- final String menuName, final String subMenuName) {
- treeItem.contextMenu(menuName).setFocus();
- clickContextSubMenu(menuName, subMenuName);
- }
-
- protected void clickContextSubMenu(SWTBotTree tree, final String menuName,
- final String subMenuName) {
- tree.contextMenu(menuName).click();
- clickContextSubMenu(menuName, subMenuName);
- }
-
- private void clickContextSubMenu(final String menuName,
- final String subMenuName) {
- MenuItem menuItem = UIThreadRunnable.syncExec(Display.getDefault(),
- new WidgetResult<MenuItem>() {
- public MenuItem run() {
- List<MenuItem> menus = new MenuFinder()
- .findMenus(WidgetMatcherFactory
- .withMnemonic(subMenuName));
- for (MenuItem item : menus) {
- try {
- String name = item.getParent().getParentItem()
- .getText().replace("&", "");
- if (name.startsWith(menuName)) {
- return item;
- }
- } catch (Exception e) {
- // do nothing
- }
- }
- return null;
- }
- });
- if (null == menuItem) {
- throw new WidgetNotFoundException(
- "Can not found widget with name: " + subMenuName);
- }
- new SWTBotMenu(menuItem).click();
- }
-
- // protected void printShell() {
- // try {
- // SWTBotShell[] shells = getBot().shells();
- // int shelCount = shells.length;
- // System.out.println("shelCount: " + shelCount);
- // for (int index = 0; index < shelCount; index++) {
- // System.out.println("shell: " + shells[index].getText()
- // + ", op: " + shells[index].isOpen() + ", vis: "
- // + shells[index].isVisible() + ", en: "
- // + shells[index].isEnabled());
- // }
- // System.out.println("Active: " + getBot().activeShell().getText());
- // } catch (Exception ex) {
- // ex.printStackTrace();
- // }
- // }
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/ProjectContentOperations.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/ProjectContentOperations.java
deleted file mode 100644
index a4f07e5..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/ProjectContentOperations.java
+++ /dev/null
@@ -1,637 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot.operations;
-
-import org.eclipse.dltk.ui.tests.swtbot.complex.ProjectContentTests;
-import org.eclipse.dltk.ui.wizards.Messages;
-import org.eclipse.swtbot.eclipse.finder.SWTEclipseBot;
-import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
-import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
-
-public class ProjectContentOperations extends Operations {
-
- private static final String FLD_FILE = createLabel(Messages.NewSourceModulePage_file);
-
- public ProjectContentOperations(SWTEclipseBot bot) {
- super(bot);
- }
-
- /**
- * Create a folder (DLTK-517).
- *
- * @see ProjectContentTests#testCreateFolder001()
- *
- * @param projectName
- * @param folderPath
- * @param folderName
- */
- public void createFolder001(String projectName, String folderPath,
- String folderName) {
- try {
- navigateToProjectElement(projectName, folderPath);
- getBot().menu(MENU_FILE).menu(MENU_NEW).menu(MENU_NEW_FOLDER)
- .click();
- internalCreateFolder(null, null, folderName);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Create a folder (DLTK-517).
- *
- * @see ProjectContentTests#testCreateFolder002()
- * @see ProjectContentTests#testCreateFolder003()
- *
- * @param projectName
- * @param folderPath
- * @param folderName
- */
- public void createFolder002(String projectName, String folderPath,
- String folderName) {
- try {
- getBot().menu(MENU_FILE).menu(MENU_NEW).menu(MENU_NEW_FOLDER)
- .click();
- internalCreateFolder(projectName, folderPath, folderName);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Create folder by context menu (DLTK-604).
- *
- * @see ProjectContentTests#testCreateFolderByContextMenu()
- *
- * @param projectName
- * @param folderPath
- * @param folderName
- */
- public void createFolderByContextMenu(String projectName,
- String folderPath, String folderName) {
- try {
- SWTBotTreeItem projectBot = navigateToProjectElement(projectName,
- folderPath);
- clickContextSubMenu(projectBot, MENU_NEW, MENU_NEW_FOLDER);
- internalCreateFolder(null, null, folderName);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Create a source folder (DLTK-516).
- *
- * @see ProjectContentTests#testCreateSourceFolder001()
- * @see ProjectContentTests#testCreateSourceFolder002()
- * @see ProjectContentTests#testCreateSourceFolder003()
- * @see ProjectContentTests#testCreateNestedSourceFolder()
- *
- * @param projectName
- * @param folderPath
- * @param folderName
- * @param exclusion
- */
- public void createSourceFolder(String projectName, String folderPath,
- String folderName, boolean exclusion) {
- try {
- navigateToProjectElement(projectName, folderPath);
- getBot().menu(MENU_FILE).menu(MENU_NEW)
- .menu(MENU_NEW_SOURCE_FOLDER).click();
- internalCreateSourceFolder(projectName, folderName, exclusion);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Create source folder using context menu (DLTK-603).
- *
- * @see ProjectContentTests#testCreateSourceFolderByContextMenu001()
- * @see ProjectContentTests#testCreateSourceFolderByContextMenu002()
- * @see ProjectContentTests#testCreateSourceFolderByContextMenu003()
- *
- * @param projectName
- * @param folderPath
- * @param folderName
- * @param exclusion
- */
- public void createSourceFolderByContextMenu(String projectName,
- String folderPath, String folderName, boolean exclusion) {
- try {
- SWTBotTreeItem treeBot = navigateToProjectElement(projectName,
- folderPath);
- clickContextSubMenu(treeBot, MENU_NEW, MENU_NEW_SOURCE_FOLDER);
- internalCreateSourceFolder(projectName, folderName, exclusion);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Create a TCL file (DLTK-518).
- *
- * @see ProjectContentTests#testCreateFile001()
- *
- * @param projectName
- * @param fileName
- */
- public void createFile001(String projectName, String fileName) {
- try {
- getProjectItem(projectName);
- getBot().menu(MENU_FILE).menu(MENU_NEW).menu(MENU_NEW_FILE).click();
- internalCreateFile(null, null, fileName);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Create a TCL file (DLTK-518).<br>
- * Create a Tcl file in source folder (DLTK-519).<br>
- * Create a TCL file in folder. Folder not in build path. (DLTK-520)
- *
- * @see ProjectContentTests#testCreateFile002()
- * @see ProjectContentTests#testCreateFileInSourceFolder()
- * @see ProjectContentTests#testCreateFileInFolder()
- *
- * @param projectName
- * @param folderPath
- * @param fileName
- */
- public void createFile002(String projectName, String folderPath,
- String fileName) {
- try {
- getBot().menu(MENU_FILE).menu(MENU_NEW).menu(MENU_NEW_FILE).click();
- internalCreateFile(projectName, folderPath, fileName);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Create a Tcl file in project root using pop-up menu (DLTK-607).<br>
- * Create a Tcl file in source folder by context menu (DLTK-609).<br>
- * Create a TCL file in folder by context menu (DLTK-611)
- *
- * @see ProjectContentTests#testCreateFileByContextMenu()
- * @see ProjectContentTests#testCreateFileInSourceFolderByContextMenu()
- * @see ProjectContentTests#testCreateFileInFolderByContextMenu()
- *
- *
- * @param projectName
- * @param folderPath
- * @param fileName
- */
- public void createFileByContextMenu(String projectName, String folderPath,
- String fileName) {
- try {
- SWTBotTreeItem projectBot = getProjectItem(projectName);
- // projectBot.contextMenu(MENU_NEW).menu(MENU_NEW_FILE).click();
- clickContextSubMenu(projectBot, MENU_NEW, MENU_NEW_FILE);
- internalCreateFile(projectName, folderPath, fileName);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Create a script in project root (DLTK-521).<br>
- * Create a script in folder (DLTK-606).<br>
- * Create a script in source folder (DLTK-605).
- *
- * @see ProjectContentTests#testCreateScript001()
- * @see ProjectContentTests#testCreateScript002()
- * @see ProjectContentTests#testCreateScriptInFolder()
- * @see ProjectContentTests#testCreateScriptInSourceFolder()
- *
- * @param projectName
- * @param folderPath
- * @param scriptName
- */
- public void createScript(String projectName, String folderPath,
- String scriptName) {
- try {
- getProjectItem(projectName);
- getBot().menu(MENU_FILE).menu(MENU_NEW).menu(MENU_TCL_FILE).click();
- internalCreateScript(scriptName);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Create a script by context menu (DLTK-608).<br>
- * Create a script in folder by context menu (DLTK-612)<br>
- * Create a script in source folder by context menu (DLTK-610)
- *
- * @see ProjectContentTests#testCreateScriptByContextMenu()
- * @see ProjectContentTests#testCreateScriptInFolderByContextMenu()
- * @see ProjectContentTests#testCreateScriptInSourceFolderByContextMenu()
- *
- * @param projectName
- * @param folderPath
- * @param scriptName
- */
- public void createScriptByContextMenu(String projectName,
- String folderPath, String scriptName) {
- try {
- SWTBotTreeItem projectBot = getProjectItem(projectName);
- // projectBot.contextMenu(MENU_NEW).menu(MENU_TCL_FILE).click();
- clickContextSubMenu(projectBot, MENU_NEW, MENU_TCL_FILE);
- internalCreateScript(scriptName);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Copy file from a folder to another one (DLTK-523).<br>
- * Copy files from project root to a folder (DLTK-712).<br>
- * Copy file from a folder to project root (DLTK-524).<br>
- * Copy script from source folder to project root (DLTK-527).<br>
- * Copy files from a source folder to a source folder (DLTK-526).<br>
- * Copy files from a source folder to a folder (DLTK-525).<br>
- * Copy files from a folder to a source folder (DLTK-522).
- *
- * @see ProjectContentTests#testCopyFileBetweenFolders()
- * @see ProjectContentTests#testCopyFileToFolderFromProjectRoot()
- * @see ProjectContentTests#testCopyFileFromFolderToProjectRoot()
- * @see ProjectContentTests#testCopyScriptFromSourceFolderToProjectRoot()
- * @see ProjectContentTests#testCopyScriptBetweenSourceFolders()
- * @see ProjectContentTests#testCopyFileFromSourceFolderToFolder()
- * @see ProjectContentTests#testCopyScriptFromFolderToSourceFolder()
- *
- * @param projectName
- * @param path
- */
- public void copyElement(String projectName, String path) {
- try {
- navigateToProjectElement(projectName, path);
- getBot().menu(MENU_EDIT).menu(MENU_COPY).click();
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Copy file from a folder to another one (DLTK-523).<br>
- * Copy files from project root to a folder (DLTK-712).<br>
- * Copy file from a folder to project root (DLTK-524).<br>
- * Copy script from source folder to project root (DLTK-527).<br>
- * Copy files from a source folder to a source folder (DLTK-526).<br>
- * Copy files from a source folder to a folder (DLTK-525).<br>
- * Copy files from a folder to a source folder (DLTK-522).
- *
- * @see ProjectContentTests#testCopyFileBetweenFolders()
- * @see ProjectContentTests#testCopyFileToFolderFromProjectRoot()
- * @see ProjectContentTests#testCopyFileFromFolderToProjectRoot()
- * @see ProjectContentTests#testCopyScriptFromSourceFolderToProjectRoot()
- * @see ProjectContentTests#testCopyScriptBetweenSourceFolders()
- * @see ProjectContentTests#testCopyFileFromSourceFolderToFolder()
- * @see ProjectContentTests#testCopyScriptFromFolderToSourceFolder()
- *
- * @param projectName
- * @param path
- */
- public void pasteElement(String projectName, String path) {
- try {
- navigateToProjectElement(projectName, path);
- getBot().menu(MENU_EDIT).menu(MENU_PASTE).click();
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Copy file from a folder to another one (DLTK-523).<br>
- * Copy files from project root to a folder (DLTK-712).<br>
- * Copy file from a folder to project root (DLTK-524).<br>
- * Copy script from source folder to project root (DLTK-527).<br>
- * Copy files from a source folder to a source folder (DLTK-526).<br>
- * Copy files from a source folder to a folder (DLTK-525).<br>
- * Copy files from a folder to a source folder (DLTK-522).
- *
- * @see ProjectContentTests#testCopyFileBetweenFoldersByContextMenu()
- * @see ProjectContentTests#testCopyFileToFolderFromProjectRootByContextMenu()
- * @see ProjectContentTests#testCopyFileFromFolderToProjectRootByContextMenu()
- * @see ProjectContentTests#testCopyScriptFromSourceFolderToProjectRootByContextMenu()
- * @see ProjectContentTests#testCopyScriptBetweenSourceFoldersByContextMenu()
- * @see ProjectContentTests#testCopyFileFromSourceFolderToFolderByContextMenu()
- * @see ProjectContentTests#testCopyScriptFromFolderToSourceFolderByContextMenu()
- *
- * @param projectName
- * @param path
- */
- public void copyElementByContextMenu(String projectName, String path) {
- try {
- SWTBotTreeItem item = navigateToProjectElement(projectName, path);
- item.contextMenu(MENU_COPY).click();
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Copy file from a folder to another one (DLTK-523).<br>*
- * Copy files from project root to a folder (DLTK-712).<br>
- * Copy file from a folder to project root (DLTK-524).<br>
- * Copy script from source folder to project root (DLTK-527).<br>
- * Copy files from a source folder to a source folder (DLTK-526).<br>
- * Copy files from a source folder to a folder (DLTK-525).<br>
- * Copy files from a folder to a source folder (DLTK-522).
- *
- * @see ProjectContentTests#testCopyFileBetweenFoldersByContextMenu()
- * @see ProjectContentTests#testCopyFileToFolderFromProjectRootByContextMenu()
- * @see ProjectContentTests#testCopyFileFromFolderToProjectRootByContextMenu()
- * @see ProjectContentTests#testCopyScriptFromSourceFolderToProjectRootByContextMenu()
- * @see ProjectContentTests#testCopyScriptBetweenSourceFoldersByContextMenu()
- * @see ProjectContentTests#testCopyFileFromSourceFolderToFolderByContextMenu()
- * @see ProjectContentTests#testCopyScriptFromFolderToSourceFolderByContextMenu()
- *
- * @param projectName
- * @param path
- */
- public void pasteElementByContextMenu(String projectName, String path) {
- try {
- SWTBotTreeItem item = navigateToProjectElement(projectName, path);
- item.contextMenu(MENU_PASTE).click();
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Rename a folder (DLTK-538).<br>
- * Rename a source folder (DLTK-539).<br>
- * Rename Tcl file in project root (DLTK-543).<br>
- * Rename a Tcl file in folder (DLTK-542).<br>
- * Rename a Tcl file in source folder (DLTK-541).<br>
- * Rename script in project root (DLTK-537).<br>
- * Rename a project (DLTK-540).
- *
- * @see ProjectContentTests#testRenameFolder()
- * @see ProjectContentTests#testRenameSourceFolder()
- * @see ProjectContentTests#testRenameFile()
- * @see ProjectContentTests#testRenameFileInFolder()
- * @see ProjectContentTests#testRenameFileInSourceFolder()
- * @see ProjectContentTests#testRenameScript()
- * @see ProjectContentTests#testRenameProject()
- *
- * @param projectName
- * @param path
- * @param newName
- */
- public void renameElement(String dialogName, String projectName,
- String path, String newName) {
- try {
- navigateToProjectElement(projectName, path);
- getBot().menu(MENU_REFACTOR).menu(MENU_RENAME).click();
- internalRename(dialogName, newName);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Rename a folder using context menu (DLTK-613)<br>
- * Rename a source folder using context menu (DLTK-617).<br>
- * Rename a Tcl file in project root by context menu (DLTK-622).<br>
- * Rename a Tcl file in folder by context menu (DLTK-621).<br>
- * Rename a Tcl File in source folder by context menu (DLTK-620).<br>
- * Rename script in project root using popup-menu (DLTK-714).<br>
- * Rename a project by context menu (DLTK-618).
- *
- * @see ProjectContentTests#testRenameFolderByContextMenu()
- * @see ProjectContentTests#testRenameSourceFolderByContextMenu()
- * @see ProjectContentTests#testRenameFileByContextMenu()
- * @see ProjectContentTests#testRenameFileInFolderByContextMenu()
- * @see ProjectContentTests#testRenameFileInSourceFolderByContextMenu()
- * @see ProjectContentTests#testRenameScriptByContextMenu()
- * @see ProjectContentTests#testRenameProjectByContextMenu()
- *
- * @param projectName
- * @param path
- * @param newName
- */
- public void renameElementByContextMenu(String dialogName,
- String projectName, String path, String newName) {
- try {
- SWTBotTreeItem item = navigateToProjectElement(projectName, path);
- // item.contextMenu(MENU_REFACTOR).menu(MENU_RENAME).click();
- clickContextSubMenu(item, MENU_REFACTOR, MENU_RENAME);
- internalRename(dialogName, newName);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Delete a TCL file from project root (DLTK-548).<br>
- * Delete a script from project root (DLTK-549).<br>
- * Delete a file from folder (DLTK-547).<br>
- * Delete file from source folder (DLTK-546).<br>
- * Delete folder (DLTK-545).<br>
- * Delete source folder (DLTK-544).
- *
- * @see ProjectContentTests#testDeleteScriptFromRoot()
- * @see ProjectContentTests#testDeleteScriptFromFolder()
- * @see ProjectContentTests#testDeleteScriptFromSourceFolder()
- * @see ProjectContentTests#testDeleteFolder()
- * @see ProjectContentTests#testDeleteNestedFolder()
- * @see ProjectContentTests#testDeleteSourceFolder()
- *
- * @param projectName
- * @param path
- */
- public void deleteElement(String projectName, String path) {
- try {
- navigateToProjectElement(projectName, path);
- getBot().menu(MENU_EDIT).menu(MENU_DELETE).click();
- internalDeleteElement();
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Delete a TCL file from project root (DLTK-548).<br>
- * Delete a script from project root (DLTK-549).<br>
- * Delete a file from folder (DLTK-547).<br>
- * Delete file from source folder (DLTK-546).<br>
- * Delete folder (DLTK-545).<br>
- * Delete source folder (DLTK-544).
- *
- * @see ProjectContentTests#testDeleteScriptFromRootByContextMenu()
- * @see ProjectContentTests#testDeleteScriptFromFolderByContextMenu()
- * @see ProjectContentTests#testDeleteScriptFromSourceFolderByContextMenu()
- * @see ProjectContentTests#testDeleteFolderByContextMenu()
- * @see ProjectContentTests#testDeleteNestedFolderByContextMenu()
- * @see ProjectContentTests#testDeleteSourceFolderByContextMenu()
- *
- * @param projectName
- * @param path
- */
- public void deleteElementByContextMenu(String projectName, String path) {
- try {
- SWTBotTreeItem item = navigateToProjectElement(projectName, path);
- item.contextMenu(MENU_DELETE).click();
- internalDeleteElement();
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- // /////////////////////////////////////////////////////////////////////
- //
- // Internal
- //
- // /////////////////////////////////////////////////////////////////////
- private void internalCreateFolder(String project, String path, String name)
- throws WidgetNotFoundException, TimeoutException {
- getBot().waitUntil(Conditions.shellIsActive(DLG_NEW_FOLDER));
- SWTBotShell shell = getBot().shell(DLG_NEW_FOLDER);
-
- SWTBotTreeItem treeBot = null;
- if (project != null) {
- treeBot = getBot().tree().getTreeItem(project);
- treeBot.select();
-
- if (path != null) {
- navigateToProjectElement(treeBot, path);
- }
- }
-
- SWTBotText folderName = getBot().textWithLabel("Folder name:");
- folderName.setText(name);
-
- getBot().button(WIZARD_FINISH).click();
- getBot().waitUntil(Conditions.shellCloses(shell));
- }
-
- private void internalCreateSourceFolder(String projectName,
- String folderPath, boolean exclusion)
- throws WidgetNotFoundException, TimeoutException {
- getBot().waitUntil(Conditions.shellIsActive(DLG_NEW_SOURCE_FOLDER));
- SWTBotShell shell = getBot().shell(DLG_NEW_SOURCE_FOLDER);
-
- SWTBotText txtProjectName = getBot().textWithLabel("Project name:");
- SWTBotTestCase.assertText(projectName, txtProjectName);
-
- SWTBotTestCase.assertNotEnabled(getBot().button(WIZARD_FINISH));
-
- SWTBotText folderName = getBot().textWithLabel("Folder name:");
- folderName.setText(folderPath);
-
- if (exclusion) {
- SWTBotCheckBox check = getBot()
- .checkBox(
- "Update exclusion filters in other source folders to solve nesting");
- if (!check.isChecked())
- check.click();
- }
- getBot().button(WIZARD_FINISH).click();
- getBot().waitUntil(Conditions.shellCloses(shell));
- }
-
- private void internalCreateFile(String project, String path, String name)
- throws WidgetNotFoundException, TimeoutException {
- getBot().waitUntil(Conditions.shellIsActive(DLG_NEW_FILE));
- SWTBotShell shell = getBot().shell(DLG_NEW_FILE);
-
- SWTBotTreeItem treeBot = null;
- if (project != null) {
- treeBot = getBot().tree().getTreeItem(project);
- treeBot.select();
-
- if (path != null) {
- navigateToProjectElement(treeBot, path);
- }
- }
-
- SWTBotText fileName = getBot().textWithLabel("File name:");
- fileName.setText(name);
- getBot().button(WIZARD_FINISH).click();
- getBot().waitUntil(Conditions.shellCloses(shell));
- }
-
- private void internalCreateScript(String scriptName)
- throws WidgetNotFoundException, TimeoutException {
- getBot().waitUntil(Conditions.shellIsActive(DLG_CREATE_TCL_FILE));
- SWTBotShell shell = getBot().shell(DLG_CREATE_TCL_FILE);
-
- SWTBotText fileName = getBot().textWithLabel(FLD_FILE);
- fileName.setText(scriptName);
- getBot().button(WIZARD_FINISH).click();
- getBot().waitUntil(Conditions.shellCloses(shell));
- }
-
- private void internalRename(String dialogName, String newName)
- throws WidgetNotFoundException, TimeoutException {
- getBot().waitUntil(Conditions.shellIsActive(dialogName));
- SWTBotShell shell = getBot().shell(dialogName);
- SWTBotText fileName = getBot().textWithLabel("New name:");
- fileName.setText(newName);
- getBot().button("OK").click();
- getBot().waitUntil(Conditions.shellCloses(shell));
- }
-
- private void internalDeleteElement() throws WidgetNotFoundException,
- TimeoutException {
- getBot().waitUntil(Conditions.shellIsActive(DLG_CONFIRM_DELETE));
- SWTBotShell shell = getBot().shell(DLG_CONFIRM_DELETE);
- getBot().button("Yes").click();
- getBot().waitUntil(Conditions.shellCloses(shell));
- }
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/ProjectOperations.java b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/ProjectOperations.java
deleted file mode 100644
index cc0ee60..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/src/org/eclipse/dltk/ui/tests/swtbot/operations/ProjectOperations.java
+++ /dev/null
@@ -1,403 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * xored software, Inc. - initial API and Implementation
- *******************************************************************************/
-package org.eclipse.dltk.ui.tests.swtbot.operations;
-
-import java.util.List;
-
-import org.eclipse.dltk.internal.ui.wizards.NewWizardMessages;
-import org.eclipse.dltk.ui.tests.swtbot.ErrorMessages;
-import org.eclipse.dltk.ui.tests.swtbot.complex.ProjectTests;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.swtbot.eclipse.finder.SWTEclipseBot;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
-import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.finders.ControlFinder;
-import org.eclipse.swtbot.swt.finder.matchers.WidgetOfType;
-import org.eclipse.swtbot.swt.finder.utils.SWTUtils;
-import org.eclipse.swtbot.swt.finder.waits.Conditions;
-import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotRadio;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
-
-public class ProjectOperations extends Operations {
-
- private static final String DLG_CREATE_TCL_PROJECT = "Create Tcl project";
-
- private static final String RADIO_FROM_EXIST = createLabel(NewWizardMessages.ScriptProjectWizardFirstPage_LocationGroup_external_desc);
- private static final String RADIO_IN_WORKSPACE = createLabel(NewWizardMessages.ScriptProjectWizardFirstPage_LocationGroup_workspace_desc);
- private static final String RADIO_USE_ALT_INTERPR = createLabel(NewWizardMessages.ScriptProjectWizardFirstPage_InterpreterEnvironmentGroup_specific_compliance);
- // String hardcode in TclProjectWizardFirstPage class
- private static final String CHECK_DELETE_CONTENTS = createLabel(OperationMessages.ProjectOperations_check_delete_contents);
-
- public ProjectOperations(SWTEclipseBot bot) {
- super(bot);
- }
-
- /**
- * Create a Tcl project in workspace with default interpreter with use main
- * menu and switch to Tcl perspective. (DLTK-502)
- *
- * @see ProjectTests#testCreateTclProject001()
- *
- * @param name
- * @param promptPerspective
- */
- public void createPromptPerspective(final String name) {
- try {
- getBot().menu(MENU_FILE).menu(MENU_NEW).menu(MENU_NEW_PROJECT)
- .click();
- getBot().waitUntil(Conditions.shellIsActive(DLG_NEW_PROJECT));
- expandTree("Tcl", "Tcl Project");
- getBot().button(WIZARD_NEXT).click();
- getBot()
- .waitUntil(Conditions.shellIsActive(DLG_CREATE_TCL_PROJECT));
- getBot().textWithLabel("Project name:").setText(name);
- getBot().button(WIZARD_FINISH).click();
- getBot().waitUntil(
- Conditions.shellIsActive("Open Associated Perspective?"));
- SWTBotShell shell = getBot().shell("Open Associated Perspective?");
- getBot().button("Yes").click();
- getBot().waitUntil(Conditions.shellCloses(shell));
- getProjectItem(name);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Create a Tcl project in workspace with default interpreter with use
- * context menu of Script Explorer view. (DLTK-746)
- *
- * @see ProjectTests#testCreateTclProject002()
- *
- * @param name
- */
- public void createFromScriptExplorer(final String name) {
- try {
- SWTBotShell shell = openInterpreters();
- getBot().button("OK").click();
- getBot().waitUntil(Conditions.shellCloses(shell));
-
- SWTBotView viewBot = getBot().view(VIEW_SCRIPT_EXPLORER);
- viewBot.setFocus();
- final SWTBotTree treeBot = getBot().tree();
- clickContextSubMenu(treeBot, MENU_NEW, MENU_TCL_PROJECT);
- getBot()
- .waitUntil(Conditions.shellIsActive(DLG_CREATE_TCL_PROJECT));
- internalCreate(name);
-
- getProjectItem(name);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- public void createFromSource(final String name,
- final String externalProjectName, boolean useDetectPackage) {
- try {
- openNewTclProject();
- getBot().radio(RADIO_FROM_EXIST).click();
-
- SWTBotText srcDir = getBot().textWithLabel("Directory:");
- SWTBotCheckBox detectPackage = getBot().checkBox(
- OperationMessages.ProjectOperations_check_delete_package);
-
- SWTBotTestCase.assertEnabled(srcDir);
- SWTBotTestCase.assertEnabled(detectPackage);
-
- srcDir.setText(externalProjectName);
-
- String errMessage = null;
- if (useDetectPackage) {
- errMessage = ErrorMessages.Common_errNotChecked;
- } else {
- errMessage = ErrorMessages.Common_errChecked;
- detectPackage.click();
- }
-
- errMessage = ErrorMessages.format(errMessage,
- OperationMessages.ProjectOperations_check_delete_package);
-
- SWTBotTestCase.assertEquals(errMessage, detectPackage.isChecked(),
- useDetectPackage);
-
- internalCreate(name);
-
- SWTBotTreeItem projectBot = getProjectItem(name);
- checkExternalProject(projectBot);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Create a Tcl project using a project specific interpreter. (DLTK-505)
- *
- * @see ProjectTests#testCreateTclProject005()
- *
- * @param name
- */
- public void createWithAltInterpr(final String name) {
- try {
- SWTBotShell shell = openInterpreters();
- getBot().button("OK").click();
- getBot().waitUntil(Conditions.shellCloses(shell));
-
- openNewTclProject();
- SWTBotRadio botUseInterpr = getBot().radio(RADIO_USE_ALT_INTERPR);
- botUseInterpr.click();
- Widget comboWidget = SWTUtils.nextWidget(botUseInterpr.widget);
- if (!(comboWidget instanceof Combo)) {
- throw new WidgetNotFoundException("Combo for "
- + RADIO_USE_ALT_INTERPR + " not found.");
- }
- SWTBotCombo botInterprCombo = new SWTBotCombo((Combo) comboWidget);
- botInterprCombo.setSelection(1);
- internalCreate(name);
-
- getProjectItem(name);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- public void create(final String name) {
- try {
- SWTBotShell shell = openInterpreters();
- getBot().button("OK").click();
- getBot().waitUntil(Conditions.shellCloses(shell));
-
- openNewTclProject();
- internalCreate(name);
-
- getProjectItem(name);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- protected void internalCreate(final String name)
- throws WidgetNotFoundException, TimeoutException {
- SWTBotShell shell = getBot().shell(DLG_CREATE_TCL_PROJECT);
- getBot().textWithLabel("Project name:").setText(name);
- getBot().button(WIZARD_FINISH).click();
- getBot().waitUntil(Conditions.shellCloses(shell));
- }
-
- /**
- * Delete Tcl project. (DLTK-509)
- *
- * @see ProjectTests#testDeleteProject()
- *
- * @param name
- */
- public void deleteProject(final String name) {
- try {
- getProjectItem(name);
- getBot().menu(MENU_EDIT).menu(MENU_DELETE).click();
- getBot()
- .waitUntil(
- Conditions
- .shellIsActive(OperationMessages.Operations_dlg_delete_resource));
- SWTBotShell shell = getBot().shell(
- OperationMessages.Operations_dlg_delete_resource);
- getBot().button("OK").click();
- getBot().waitUntil(Conditions.shellCloses(shell));
-
- assertProjectNotExist(name);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Delete a Tcl project without project content deletion (DLTK-626).<br>
- * Delete a Tcl project with project content (DLTK-627).
- *
- * @see ProjectTests#testDeleteProjectByContextMenu001
- * @see ProjectTests#testDeleteProjectByContextMenu002
- *
- * @param name
- * @param removeContent
- */
- public void deleteProjectByContextMenu(String name, boolean removeContent) {
- try {
- SWTBotTreeItem projectBot = getProjectItem(name);
- projectBot.contextMenu(MENU_DELETE).click();
- getBot()
- .waitUntil(
- Conditions
- .shellIsActive(OperationMessages.Operations_dlg_delete_resource));
- SWTBotShell shell = getBot().shell(
- OperationMessages.Operations_dlg_delete_resource);
-
- List findControls = new ControlFinder()
- .findControls(new WidgetOfType<Button>(Button.class));
- if (SWTUtils.getText(findControls.get(0)).equals(
- OperationMessages.ProjectOperations_check_delete_contents)) {
- // If Eclipse 3.4
- SWTBotCheckBox removeContentBot = getBot().checkBox(
- CHECK_DELETE_CONTENTS);
- if (removeContent) {
- removeContentBot.click();
- assertChecked(removeContentBot);
- } else {
- assertNotChecked(removeContentBot);
- }
- } else {
- // If Eclipse 3.3
- if (removeContent) {
- SWTBotRadio removeContentBot = new SWTBotRadio(
- (Button) findControls.get(0));
- removeContentBot.click();
- assertSelected(removeContentBot);
- } else {
- SWTBotRadio removeContentBot = getBot()
- .radio(
- createLabel(OperationMessages.ProjectOperations_radio_do_not_delete_contents));
- removeContentBot.click();
- assertSelected(removeContentBot);
- }
- }
-
- getBot().button("OK").click();
- getBot().waitUntil(Conditions.shellCloses(shell));//
- assertProjectNotExist(name);
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Open a Tcl project. (DLTK-508)
- *
- * @see ProjectTests#testOpenTclProject()
- *
- * @param name
- */
- public void openProject(final String name) {
- try {
- final SWTBotTreeItem projectItem = getProjectItem(name);
- projectItem.contextMenu(SCRIPT_POPUP_OPEN_PRJ).click();
-
- getBot().waitUntil(new DefaultCondition() {
- public String getFailureMessage() {
- return ErrorMessages.Project_errOpen;
- }
-
- public boolean test() throws Exception {
- try {
- return isOpenProject(projectItem);
- } catch (Exception ex) {
- return false;
- }
- }
- });
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- /**
- * Close a Tcl project. (DLTK-507)
- *
- * @see ProjectTests#testCloseTclProject()
- *
- * @param name
- */
- public void closeProject(final String name) {
- try {
- final SWTBotTreeItem projectItem = getProjectItem(name);
- projectItem.contextMenu(SCRIPT_POPUP_CLOSE_PRJ).click();
-
- getBot().waitUntil(new DefaultCondition() {
- public String getFailureMessage() {
- return ErrorMessages.Project_errClose;
- }
-
- public boolean test() throws Exception {
- try {
- return !isOpenProject(projectItem);
- } catch (Exception ex) {
- return true;
- }
- }
- });
- } catch (WidgetNotFoundException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- } catch (TimeoutException ex) {
- SWTBotTestCase.fail(ex.getLocalizedMessage());
- }
- }
-
- protected SWTBotShell openNewTclProject() throws WidgetNotFoundException,
- TimeoutException {
- getBot().menu(MENU_FILE).menu(MENU_NEW).menu(MENU_TCL_PROJECT).click();
- getBot().waitUntil(Conditions.shellIsActive(DLG_CREATE_TCL_PROJECT));
- return getBot().shell(DLG_CREATE_TCL_PROJECT);
- }
-
- // /////////////////////////////////////////////////////////////////////////
- //
- // Check methods
- //
- // /////////////////////////////////////////////////////////////////////////
- protected boolean isOpenProject(SWTBotTreeItem projectItem)
- throws WidgetNotFoundException, TimeoutException {
- // TODO
- return projectItem.contextMenu(SCRIPT_POPUP_CLOSE_PRJ) != null;
- }
-
- protected void checkExternalProject(SWTBotTreeItem projectBot)
- throws WidgetNotFoundException, TimeoutException {
- // TODO: add implementation
- }
-
- // /////////////////////////////////////////////////////////////////////////
- //
- // Asserts
- //
- // /////////////////////////////////////////////////////////////////////////
- protected void assertProjectNotExist(String name) {
- try {
- getProjectItem(name);
- SWTBotTestCase.fail(ErrorMessages.Project_errDelete);
- } catch (WidgetNotFoundException exExpected) {
- } catch (TimeoutException exExpected) {
- }
- }
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/test.xml b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/test.xml
deleted file mode 100644
index d749433..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/test.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="${basedir}\..\.." />
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="plugin-name" value="org.eclipse.dltk.tcl.ui.tests.swtbot" />
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.2.0/library.xml" />
-
- <property name="workspace" value="${basedir}/${plugin-name}/workspace" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml" />
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <delete dir="${workspace}" quiet="true" />
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${workspace}" />
- <property name="plugin-name" value="${plugin-name}" />
- <property name="classname" value="org.eclipse.dltk.ui.tests.swtbot.AllTests" />
- </ant>
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <delete dir="${workspace}" quiet="true" />
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml" />
- <property name="output-file" value="${plugin-name}.xml" />
- </ant>
- </target>
-
-</project>
-
-
-
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EditorProject/.buildpath b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EditorProject/.buildpath
deleted file mode 100644
index afc3a35..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EditorProject/.buildpath
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<buildpath>
- <buildpathentry kind="src" path="SourceFolder"/>
- <buildpathentry kind="con" path="org.eclipse.dltk.launching.INTERPRETER_CONTAINER"/>
-</buildpath>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EditorProject/.project b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EditorProject/.project
deleted file mode 100644
index 5e0721c..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EditorProject/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>EditorProject</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.dltk.core.scriptbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.dltk.tcl.core.nature</nature>
- </natures>
-</projectDescription>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EditorProject/SourceFolder/Script1.tcl b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EditorProject/SourceFolder/Script1.tcl
deleted file mode 100644
index 386edca..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EditorProject/SourceFolder/Script1.tcl
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# WARNING: for correct work of tests declaration of procedures
-# must be after call.
-#
-
-set globalVar 0
-
-namespace eval ns1 {
-namespace eval ns2 {
-
- set nsVar 0
-
- proc proc1 { param1 param2 } {
- upvar $param2 upVar
- set localVar 0
-
- puts $globalVar
- puts $localVar
- puts $param1
- puts $upVar
-
- ns1::proc2
- ns1::proc3
- globalProc
- proc4
- }
-
- proc proc4 { } {
- }
-
- proc1 1 $nsVar
-}
-
-proc proc3 { } {
-}
-
-}
-
-proc ns1::proc2 { } {
-}
-
-proc globalProc { } {
-}
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyProjectWithAltInterpreter/.buildpath b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyProjectWithAltInterpreter/.buildpath
deleted file mode 100644
index 072d53f..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyProjectWithAltInterpreter/.buildpath
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<buildpath>
- <buildpathentry kind="src" path=""/>
- <buildpathentry kind="con" path="org.eclipse.dltk.launching.INTERPRETER_CONTAINER/org.eclipse.dltk.internal.debug.ui.launcher.GenericTclInstallType/AltTclInterpreter"/>
-</buildpath>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyProjectWithAltInterpreter/.project b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyProjectWithAltInterpreter/.project
deleted file mode 100644
index 012838d..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyProjectWithAltInterpreter/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>EmptyProjectWithAltInterpreter</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.dltk.core.scriptbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.dltk.tcl.core.nature</nature>
- </natures>
-</projectDescription>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyTclProject/.buildpath b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyTclProject/.buildpath
deleted file mode 100644
index 47f1b52..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyTclProject/.buildpath
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<buildpath>
- <buildpathentry kind="src" path=""/>
- <buildpathentry kind="con" path="org.eclipse.dltk.launching.INTERPRETER_CONTAINER"/>
-</buildpath>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyTclProject/.project b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyTclProject/.project
deleted file mode 100644
index f4c5d5c..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyTclProject/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>EmptyTclProject</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.dltk.core.scriptbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.dltk.tcl.core.nature</nature>
- </natures>
-</projectDescription>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyTclProjectWithoutLib/.buildpath b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyTclProjectWithoutLib/.buildpath
deleted file mode 100644
index 823a98c..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyTclProjectWithoutLib/.buildpath
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<buildpath>
- <buildpathentry kind="src" path=""/>
-</buildpath>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyTclProjectWithoutLib/.project b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyTclProjectWithoutLib/.project
deleted file mode 100644
index 267473d..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EmptyTclProjectWithoutLib/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>EmptyTclProjectWithoutLib</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.dltk.core.scriptbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.dltk.tcl.core.nature</nature>
- </natures>
-</projectDescription>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/.buildpath b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/.buildpath
deleted file mode 100644
index f036fd6..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/.buildpath
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<buildpath>
- <buildpathentry kind="src" path="src"/>
- <buildpathentry kind="con" path="org.eclipse.dltk.launching.INTERPRETER_CONTAINER"/>
-</buildpath>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/.project b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/.project
deleted file mode 100644
index 4ed15c6..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>EtalonTclProject</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.dltk.core.scriptbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.dltk.tcl.core.nature</nature>
- </natures>
-</projectDescription>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/data/textFile.txt b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/data/textFile.txt
deleted file mode 100644
index 68ca53b..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/data/textFile.txt
+++ /dev/null
@@ -1 +0,0 @@
-Text file
\ No newline at end of file
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/src/com/com.xored/pkgIndex.tcl b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/src/com/com.xored/pkgIndex.tcl
deleted file mode 100644
index e69de29..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/src/com/com.xored/pkgIndex.tcl
+++ /dev/null
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/src/com/com.xored/tclFile.tcl b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/src/com/com.xored/tclFile.tcl
deleted file mode 100644
index e69de29..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/src/com/com.xored/tclFile.tcl
+++ /dev/null
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/src/com/pkgIndex.tcl b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/src/com/pkgIndex.tcl
deleted file mode 100644
index e69de29..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/EtalonTclProject/src/com/pkgIndex.tcl
+++ /dev/null
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/Launch/.buildpath b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/Launch/.buildpath
deleted file mode 100644
index 47f1b52..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/Launch/.buildpath
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<buildpath>
- <buildpathentry kind="src" path=""/>
- <buildpathentry kind="con" path="org.eclipse.dltk.launching.INTERPRETER_CONTAINER"/>
-</buildpath>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/Launch/.project b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/Launch/.project
deleted file mode 100644
index 0d7a3f8..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/Launch/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>Launch</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.dltk.core.scriptbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.dltk.tcl.core.nature</nature>
- </natures>
-</projectDescription>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/Launch/CorrectScript.tcl b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/Launch/CorrectScript.tcl
deleted file mode 100644
index 4ea2a5d..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/Launch/CorrectScript.tcl
+++ /dev/null
@@ -1,2 +0,0 @@
-set var "Hello world !!!"
-puts $var
\ No newline at end of file
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/Launch/InvalidScript.tcl b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/Launch/InvalidScript.tcl
deleted file mode 100644
index 96175a1..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/Launch/InvalidScript.tcl
+++ /dev/null
@@ -1,2 +0,0 @@
-set var1 "Hello world !!!"
-puts $var
\ No newline at end of file
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/.buildpath b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/.buildpath
deleted file mode 100644
index ea55bff..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/.buildpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<buildpath>
- <buildpathentry kind="src" path="SourceFolder1"/>
- <buildpathentry kind="src" path="SourceFolder2"/>
- <buildpathentry kind="src" path="NestedFolder"/>
-
- <buildpathentry kind="con" path="org.eclipse.dltk.launching.INTERPRETER_CONTAINER"/>
-</buildpath>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/.project b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/.project
deleted file mode 100644
index 4ed15c6..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>EtalonTclProject</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.dltk.core.scriptbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.dltk.tcl.core.nature</nature>
- </natures>
-</projectDescription>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/File6.ext b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/File6.ext
deleted file mode 100644
index e69de29..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/File6.ext
+++ /dev/null
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/Folder1/File1.ext b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/Folder1/File1.ext
deleted file mode 100644
index e69de29..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/Folder1/File1.ext
+++ /dev/null
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/Folder1/Script1.tcl b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/Folder1/Script1.tcl
deleted file mode 100644
index e69de29..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/Folder1/Script1.tcl
+++ /dev/null
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/Folder2/File2.ext b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/Folder2/File2.ext
deleted file mode 100644
index e69de29..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/Folder2/File2.ext
+++ /dev/null
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/Folder2/Script2.tcl b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/Folder2/Script2.tcl
deleted file mode 100644
index e69de29..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/Folder2/Script2.tcl
+++ /dev/null
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/NestedFolder/Nested2/zzz.tcl b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/NestedFolder/Nested2/zzz.tcl
deleted file mode 100644
index e69de29..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/NestedFolder/Nested2/zzz.tcl
+++ /dev/null
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/Script5.tcl b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/Script5.tcl
deleted file mode 100644
index e69de29..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/Script5.tcl
+++ /dev/null
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/SourceFolder1/File3.ext b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/SourceFolder1/File3.ext
deleted file mode 100644
index e69de29..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/SourceFolder1/File3.ext
+++ /dev/null
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/SourceFolder1/Script3.tcl b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/SourceFolder1/Script3.tcl
deleted file mode 100644
index e69de29..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/SourceFolder1/Script3.tcl
+++ /dev/null
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/SourceFolder2/File4.ext b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/SourceFolder2/File4.ext
deleted file mode 100644
index e69de29..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/SourceFolder2/File4.ext
+++ /dev/null
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/SourceFolder2/Script4.tcl b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/SourceFolder2/Script4.tcl
deleted file mode 100644
index e69de29..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/ProjectContent/SourceFolder2/Script4.tcl
+++ /dev/null
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/RootInBuildPath/.buildpath b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/RootInBuildPath/.buildpath
deleted file mode 100644
index 47f1b52..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/RootInBuildPath/.buildpath
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<buildpath>
- <buildpathentry kind="src" path=""/>
- <buildpathentry kind="con" path="org.eclipse.dltk.launching.INTERPRETER_CONTAINER"/>
-</buildpath>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/RootInBuildPath/.project b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/RootInBuildPath/.project
deleted file mode 100644
index 64303d3..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/RootInBuildPath/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>RootInBuildPath</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.dltk.core.scriptbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.dltk.tcl.core.nature</nature>
- </natures>
-</projectDescription>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/RootInBuildPath/Script5.tcl b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/RootInBuildPath/Script5.tcl
deleted file mode 100644
index e69de29..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/RootInBuildPath/Script5.tcl
+++ /dev/null
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/TclProjectForBuildpathTesting/.buildpath b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/TclProjectForBuildpathTesting/.buildpath
deleted file mode 100644
index 81fa646..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/TclProjectForBuildpathTesting/.buildpath
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<buildpath>
- <buildpathentry kind="src" path="src"/>
- <buildpathentry kind="con" path="org.eclipse.dltk.launching.INTERPRETER_CONTAINER"/>
-</buildpath>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/TclProjectForBuildpathTesting/.project b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/TclProjectForBuildpathTesting/.project
deleted file mode 100644
index 4ed15c6..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/TclProjectForBuildpathTesting/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>EtalonTclProject</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.dltk.core.scriptbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.dltk.tcl.core.nature</nature>
- </natures>
-</projectDescription>
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/TclProjectForBuildpathTesting/src/aaa.tcl b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/TclProjectForBuildpathTesting/src/aaa.tcl
deleted file mode 100644
index 130ee90..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/TclProjectForBuildpathTesting/src/aaa.tcl
+++ /dev/null
@@ -1,6 +0,0 @@
-proc aaa {} {
- puts "zzz"
-}
-
-aaa
-bbb
\ No newline at end of file
diff --git a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/TclProjectForBuildpathTesting/src/bbb.tcl b/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/TclProjectForBuildpathTesting/src/bbb.tcl
deleted file mode 100644
index 05378f0..0000000
--- a/tcl/tests/org.eclipse.dltk.tcl.ui.tests.swtbot/workspace/TclProjectForBuildpathTesting/src/bbb.tcl
+++ /dev/null
@@ -1,3 +0,0 @@
-proc bbb {} {
- aaa
-}