Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2011-08-05 01:09:27 -0400
committerIgor Fedorenko2011-08-05 01:09:27 -0400
commit61820ff65bb40aaf98c5302942733ae244dabe7f (patch)
treeff320c7d3c2693a0d4897bef0649c031078fc098
parent55bb6dd084da70138e6fd4800a514ee94abdb743 (diff)
downloadm2e-core-61820ff65bb40aaf98c5302942733ae244dabe7f.tar.gz
m2e-core-61820ff65bb40aaf98c5302942733ae244dabe7f.tar.xz
m2e-core-61820ff65bb40aaf98c5302942733ae244dabe7f.zip
353956 - remove swtbot-based integration test plumbing
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.integration.tests.common/.classpath7
-rw-r--r--org.eclipse.m2e.integration.tests.common/.gitignore1
-rw-r--r--org.eclipse.m2e.integration.tests.common/.project34
-rw-r--r--org.eclipse.m2e.integration.tests.common/.settings/org.eclipse.jdt.core.prefs370
-rw-r--r--org.eclipse.m2e.integration.tests.common/.settings/org.eclipse.jdt.ui.prefs14
-rw-r--r--org.eclipse.m2e.integration.tests.common/META-INF/MANIFEST.MF36
-rw-r--r--org.eclipse.m2e.integration.tests.common/OSGI-INF/l10n/bundle.properties3
-rw-r--r--org.eclipse.m2e.integration.tests.common/about.html28
-rw-r--r--org.eclipse.m2e.integration.tests.common/build.properties18
-rw-r--r--org.eclipse.m2e.integration.tests.common/pom.xml28
-rw-r--r--org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/ContextMenuHelper.java151
-rw-r--r--org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/HyperlinkBot.java52
-rw-r--r--org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SWTBotMenuEx.java47
-rw-r--r--org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SectionBot.java84
-rw-r--r--org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SonatypeSWTBot.java114
-rw-r--r--org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SonatypeSWTBotTree.java108
-rw-r--r--org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SwtbotUtil.java78
-rw-r--r--org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/UIIntegrationTestCase.java1491
-rw-r--r--org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/UIThreadTask.java55
-rw-r--r--org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/matchers/ContainsMnemonic.java57
-rw-r--r--org.eclipse.m2e.parent/pom.xml1
-rw-r--r--org.eclipse.m2e.sdk.feature/feature.xml14
22 files changed, 0 insertions, 2791 deletions
diff --git a/org.eclipse.m2e.integration.tests.common/.classpath b/org.eclipse.m2e.integration.tests.common/.classpath
deleted file mode 100644
index 798048dd..00000000
--- a/org.eclipse.m2e.integration.tests.common/.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="target/classes"/>
-</classpath>
diff --git a/org.eclipse.m2e.integration.tests.common/.gitignore b/org.eclipse.m2e.integration.tests.common/.gitignore
deleted file mode 100644
index ea8c4bf7..00000000
--- a/org.eclipse.m2e.integration.tests.common/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/target
diff --git a/org.eclipse.m2e.integration.tests.common/.project b/org.eclipse.m2e.integration.tests.common/.project
deleted file mode 100644
index 56bb33c3..00000000
--- a/org.eclipse.m2e.integration.tests.common/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.m2e.integration.tests.common</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>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.m2e.integration.tests.common/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.m2e.integration.tests.common/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 149db3a0..00000000
--- a/org.eclipse.m2e.integration.tests.common/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,370 +0,0 @@
-#Wed Dec 22 17:22:22 EST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
-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.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
-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_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_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=2
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=1
-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=1
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-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=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=120
-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.format_guardian_clause_on_one_line=false
-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=true
-org.eclipse.jdt.core.formatter.indentation.size=2
-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_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=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=do not 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=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=do not 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=do not 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=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=do not 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=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=do not 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.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=120
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
-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=space
-org.eclipse.jdt.core.formatter.tabulation.size=2
-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.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.m2e.integration.tests.common/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.m2e.integration.tests.common/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index fb3a058c..00000000
--- a/org.eclipse.m2e.integration.tests.common/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,14 +0,0 @@
-#Tue Nov 30 18:50:43 EST 2010
-eclipse.preferences.version=1
-formatter_profile=_m2 plugin
-formatter_settings_version=11
-org.eclipse.jdt.ui.exception.name=ex
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;org.w3c;org.xml;org.apache;com;junit;org.eclipse;org.codehaus;org.apache.lucene;org.apache.maven;org.sonatype;org.eclipse.m2e;
-org.eclipse.jdt.ui.javadoc=true
-org.eclipse.jdt.ui.keywordthis=true
-org.eclipse.jdt.ui.ondemandthreshold=99
-org.eclipse.jdt.ui.overrideannotation=false
-org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return Returns the ${bare_field_name}.\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} The ${bare_field_name} to set.\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************&\#13;\n * Copyright (c) 2010 Sonatype, Inc.&\#13;\n * All rights reserved. This program and the accompanying materials&\#13;\n * are made available under the terms of the Eclipse Public License v1.0&\#13;\n * which accompanies this distribution, and is available at&\#13;\n * http\://www.eclipse.org/legal/epl-v10.html&\#13;\n *&\#13;\n * Contributors\:&\#13;\n * Sonatype, Inc. - initial API and implementation&\#13;\n *******************************************************************************/</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * ${type_name}\n *\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\nMavenLogger.log(${exception_var});</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method ${enclosing_method}\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\nMavenLogger.log(${exception_var});</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/org.eclipse.m2e.integration.tests.common/META-INF/MANIFEST.MF b/org.eclipse.m2e.integration.tests.common/META-INF/MANIFEST.MF
deleted file mode 100644
index 853c9370..00000000
--- a/org.eclipse.m2e.integration.tests.common/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,36 +0,0 @@
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
-Bundle-Name: %Bundle-Name
-Manifest-Version: 1.0
-Bundle-Vendor: %Bundle-Vendor
-Bundle-ClassPath: .
-Bundle-SymbolicName: org.eclipse.m2e.integration.tests.common;singleton:=true
-Bundle-ManifestVersion: 2
-Eclipse-LazyStart: true
-MavenArtifact-GroupId: org.eclipse.m2e
-Bundle-Version: 1.0.200.qualifier
-MavenArtifact-ArtifactId: org.eclipse.m2e.integration.test.common
-Export-Package: org.eclipse.m2e.integration.tests.common;x-internal:=true,
- org.eclipse.m2e.integration.tests.common.matchers;x-internal:=true
-Require-Bundle: org.junit4;bundle-version="4.4.0",
- org.hamcrest,
- org.hamcrest.library,
- org.eclipse.swtbot.eclipse.finder;resolution:=optional,
- org.eclipse.swtbot.swt.finder;resolution:=optional,
- org.eclipse.swtbot.junit4_x;resolution:=optional,
- org.apache.log4j,
- org.eclipse.ui,
- org.eclipse.ui.ide,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.swt,
- org.eclipse.ui.forms,
- org.eclipse.search,
- org.eclipse.ui.editors,
- org.eclipse.m2e.editor,
- org.eclipse.m2e.editor.xml,
- org.eclipse.m2e.model.edit,
- org.eclipse.m2e.core,
- org.eclipse.m2e.maven.runtime,
- org.eclipse.m2e.tests.common,
- org.eclipse.m2e.core.ui
-
diff --git a/org.eclipse.m2e.integration.tests.common/OSGI-INF/l10n/bundle.properties b/org.eclipse.m2e.integration.tests.common/OSGI-INF/l10n/bundle.properties
deleted file mode 100644
index ce31d365..00000000
--- a/org.eclipse.m2e.integration.tests.common/OSGI-INF/l10n/bundle.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-#Properties file for org.eclipse.m2e.integration.tests.common
-Bundle-Vendor = Eclipse m2e
-Bundle-Name = Maven Integration Tests Plug-in \ No newline at end of file
diff --git a/org.eclipse.m2e.integration.tests.common/about.html b/org.eclipse.m2e.integration.tests.common/about.html
deleted file mode 100644
index 70e4b67c..00000000
--- a/org.eclipse.m2e.integration.tests.common/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>October 29, 2010</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/org.eclipse.m2e.integration.tests.common/build.properties b/org.eclipse.m2e.integration.tests.common/build.properties
deleted file mode 100644
index 31788075..00000000
--- a/org.eclipse.m2e.integration.tests.common/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (c) 2008-2010 Sonatype, 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:
-# Sonatype, Inc. - initial API and implementation
-#
-
-source.. = src/
-output.. = target/classes/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- OSGI-INF/l10n/bundle.properties
-
diff --git a/org.eclipse.m2e.integration.tests.common/pom.xml b/org.eclipse.m2e.integration.tests.common/pom.xml
deleted file mode 100644
index c5ea01c9..00000000
--- a/org.eclipse.m2e.integration.tests.common/pom.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2009 Sonatype, 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
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>org.eclipse.m2e.parent</artifactId>
- <version>1.0.200-SNAPSHOT</version>
- <relativePath>../org.eclipse.m2e.parent</relativePath>
- </parent>
-
- <artifactId>org.eclipse.m2e.integration.tests.common</artifactId>
- <packaging>eclipse-plugin</packaging>
-
- <name>Maven Integration for Eclipse System Tests Common</name>
-
- <build>
- <sourceDirectory>src</sourceDirectory>
- </build>
-
-</project>
diff --git a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/ContextMenuHelper.java b/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/ContextMenuHelper.java
deleted file mode 100644
index 6c20407c..00000000
--- a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/ContextMenuHelper.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2010 Sonatype, 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:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.integration.tests.common;
-
-import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withMnemonic;
-import static org.hamcrest.Matchers.allOf;
-import static org.hamcrest.Matchers.instanceOf;
-
-import java.util.Arrays;
-
-import org.hamcrest.Matcher;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
-import org.eclipse.swtbot.swt.finder.results.VoidResult;
-import org.eclipse.swtbot.swt.finder.results.WidgetResult;
-import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot;
-
-public class ContextMenuHelper {
-
- public static void clickContextMenu(
- final AbstractSWTBot<? extends Control> bot,
- final Matcher<? extends org.eclipse.swt.widgets.Widget>...matchers) {
- // show
- final MenuItem menuItem = UIThreadRunnable
- .syncExec(new WidgetResult<MenuItem>() {
- @SuppressWarnings("unchecked")
- public MenuItem run() {
- MenuItem menuItem = null;
- Control control = bot.widget;
- Menu menu = control.getMenu();
- for (Matcher<? extends org.eclipse.swt.widgets.Widget> m : matchers) {
- Matcher<?> matcher = allOf(
- instanceOf(MenuItem.class), m);
- menuItem = show(menu, matcher);
- if (menuItem != null) {
- menu = menuItem.getMenu();
- } else {
- hide(menu);
-
- throw new WidgetNotFoundException(
- "ContextMenuHelper was looking for: '"
- + m + "' but only found: '"
- + availableItems(menu) + "'");
-
- }
- }
-
- return menuItem;
- }
-
- });
- if (menuItem == null) {
- throw new WidgetNotFoundException("Could not find menu: "
- + Arrays.asList(matchers));
- }
-
- // click
- click(menuItem);
-
- // hide
- UIThreadRunnable.syncExec(new VoidResult() {
- public void run() {
- hide(menuItem.getParent());
- }
- });
-
- }
-
- /**
- * Clicks the context menu matching the text.
- *
- * @param text
- * the text on the context menu.
- * @throws WidgetNotFoundException
- * if the widget is not found.
- */
- public static void clickContextMenu(
- final AbstractSWTBot<? extends Control> bot, final String... texts) {
- Matcher<Widget>[] matchers = new Matcher[texts.length];
- for (int i = 0; i < texts.length; i++) {
- matchers[i] = withMnemonic(texts[i]);
- }
- clickContextMenu(bot, matchers);
- }
-
- static MenuItem show(final Menu menu, final Matcher<?> matcher) {
- if (menu != null) {
- menu.notifyListeners(SWT.Show, new Event());
- MenuItem[] items = menu.getItems();
- for (final MenuItem menuItem : items) {
- if (matcher.matches(menuItem)) {
- return menuItem;
- }
- }
- menu.notifyListeners(SWT.Hide, new Event());
- }
- return null;
- }
-
- static String availableItems(Menu menu) {
- StringBuilder sb = new StringBuilder();
-
- if (menu != null) {
- MenuItem[] items = menu.getItems();
- for (final MenuItem menuItem : items) {
- sb.append(menuItem.getText().replace("&", ""));
-
- sb.append(", ");
- }
- }
- return sb.toString();
-
- }
-
- private static void click(final MenuItem menuItem) {
- final Event event = new Event();
- event.time = (int) System.currentTimeMillis();
- event.widget = menuItem;
- event.display = menuItem.getDisplay();
- event.type = SWT.Selection;
-
- UIThreadRunnable.asyncExec(menuItem.getDisplay(), new VoidResult() {
- public void run() {
- menuItem.notifyListeners(SWT.Selection, event);
- }
- });
- }
-
- static void hide(final Menu menu) {
- menu.notifyListeners(SWT.Hide, new Event());
- if (menu.getParentMenu() != null) {
- hide(menu.getParentMenu());
- }
- }
-} \ No newline at end of file
diff --git a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/HyperlinkBot.java b/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/HyperlinkBot.java
deleted file mode 100644
index 4e5e95d7..00000000
--- a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/HyperlinkBot.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2010 Sonatype, 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:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.integration.tests.common;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swtbot.swt.finder.ReferenceBy;
-import org.eclipse.swtbot.swt.finder.SWTBotWidget;
-import org.eclipse.swtbot.swt.finder.Style;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.utils.MessageFormat;
-import org.eclipse.swtbot.swt.finder.utils.SWTUtils;
-import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl;
-import org.eclipse.ui.forms.widgets.Hyperlink;
-import org.hamcrest.SelfDescribing;
-
-@SWTBotWidget( clasz = Hyperlink.class, style = @Style( name = "SWT.NONE", value = SWT.NONE ), preferredName = "hyperlink", referenceBy = { ReferenceBy.LABEL, ReferenceBy.MNEMONIC } )//$NON-NLS-1$
-public class HyperlinkBot
- extends AbstractSWTBotControl<Hyperlink>
-{
-
- public HyperlinkBot( Hyperlink h )
- throws WidgetNotFoundException
- {
- this( h, null );
- }
-
- public HyperlinkBot( Hyperlink h, SelfDescribing selfDescribing )
- {
- super( h, selfDescribing );
- }
-
- public HyperlinkBot click()
- {
- log.debug( MessageFormat.format( "Clicking on {0}", SWTUtils.getText( widget ) ) ); //$NON-NLS-1$
- waitForEnabled();
- Event e = createEvent();
- e.character = SWT.CR;
- notify( SWT.KeyDown, e );
- log.debug( MessageFormat.format( "Clicked on {0}", SWTUtils.getText( widget ) ) ); //$NON-NLS-1$
- return this;
- }
-}
diff --git a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SWTBotMenuEx.java b/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SWTBotMenuEx.java
deleted file mode 100644
index 469f1eea..00000000
--- a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SWTBotMenuEx.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2010 Sonatype, 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:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.integration.tests.common;
-
-import java.util.List;
-
-import org.eclipse.m2e.integration.tests.common.matchers.ContainsMnemonic;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.finders.MenuFinder;
-import org.eclipse.swtbot.swt.finder.results.WidgetResult;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
-import org.hamcrest.Matcher;
-
-
-public class SWTBotMenuEx extends SWTBotMenu {
-
- public SWTBotMenuEx(SWTBotMenu bot) {
- super(bot.widget);
- }
-
- public SWTBotMenu menuContains(final String menuName) throws WidgetNotFoundException {
- final Matcher<MenuItem> matcher = ContainsMnemonic.containsMnemonic(menuName);
- MenuItem menuItem = syncExec(new WidgetResult<MenuItem>() {
- public MenuItem run() {
- Menu bar = widget.getMenu();
- List<MenuItem> menus = new MenuFinder().findMenus(bar, matcher, true);
- if(!menus.isEmpty()) {
- return menus.get(0);
- }
- return null;
- }
- });
- return new SWTBotMenu(menuItem, matcher);
- }
-
-}
diff --git a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SectionBot.java b/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SectionBot.java
deleted file mode 100644
index c0fafa97..00000000
--- a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SectionBot.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2010 Sonatype, 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:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.integration.tests.common;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swtbot.swt.finder.ReferenceBy;
-import org.eclipse.swtbot.swt.finder.SWTBotWidget;
-import org.eclipse.swtbot.swt.finder.Style;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.results.BoolResult;
-import org.eclipse.swtbot.swt.finder.results.VoidResult;
-import org.eclipse.swtbot.swt.finder.utils.MessageFormat;
-import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl;
-import org.eclipse.ui.forms.widgets.Section;
-import org.hamcrest.SelfDescribing;
-
-@SWTBotWidget(clasz = Section.class, style = @Style(name = "SWT.NONE", value = SWT.NONE), preferredName = "section", referenceBy = { ReferenceBy.LABEL, ReferenceBy.MNEMONIC })//$NON-NLS-1$
-public class SectionBot extends AbstractSWTBotControl<Section> {
-
- public SectionBot(Section s) throws WidgetNotFoundException {
- this(s, null);
- }
-
- public SectionBot(Section s, SelfDescribing selfDescribing) {
- super(s, selfDescribing);
- }
-
- public boolean isExpanded() {
- return syncExec(new BoolResult() {
- public Boolean run() {
- return widget.isExpanded();
- }
- });
- }
-
- public void setExpanded(final boolean expand) {
- waitForEnabled();
- asyncExec(new VoidResult() {
- public void run() {
- log
- .debug(MessageFormat
- .format(
- "Expanding section {0}. Setting state to {1}", widget, (expand ? "expanded" //$NON-NLS-1$ //$NON-NLS-2$
- : "collapsed"))); //$NON-NLS-1$
- widget.setExpanded(expand);
- }
- });
- }
-
- public void expand() {
- waitForEnabled();
- asyncExec(new VoidResult() {
- public void run() {
- if (!widget.isExpanded()) {
- log.debug(MessageFormat.format("Expanding section {0}.",
- widget));
- widget.setExpanded(true);
- }
- }
- });
- }
-
- public void collapse() {
- waitForEnabled();
- asyncExec(new VoidResult() {
- public void run() {
- if (widget.isExpanded()) {
- log.debug(MessageFormat.format("Collapsing section {0}.",
- widget));
- widget.setExpanded(false);
- }
- }
- });
- }
-}
diff --git a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SonatypeSWTBot.java b/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SonatypeSWTBot.java
deleted file mode 100644
index 1221c1f6..00000000
--- a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SonatypeSWTBot.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2010 Sonatype, 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:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.integration.tests.common;
-
-import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.allOf;
-import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.widgetOfType;
-import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withId;
-import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withLabel;
-import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withStyle;
-import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withText;
-
-import org.hamcrest.Matcher;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotCCombo;
-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.ui.forms.widgets.Hyperlink;
-import org.eclipse.ui.forms.widgets.Section;
-
-
-public class SonatypeSWTBot extends SWTWorkbenchBot {
-
- public SWTBotText textWithName(String value) {
- return textWithName(value, 0);
- }
-
- @SuppressWarnings("unchecked")
- public SWTBotText textWithName(String value, int index) {
- Matcher<Widget> matcher = allOf(widgetOfType(Text.class), withId("name", value));
- return new SWTBotText((Text) widget(matcher, index), matcher);
- }
-
- public SWTBotCheckBox checkBoxWithName(String name) {
- return checkBoxWithName(name, 0);
- }
-
- @SuppressWarnings("unchecked")
- public SWTBotCCombo ccomboBoxWithName(String value, int index) {
- Matcher<Widget> matcher = allOf(widgetOfType(CCombo.class), withId("name", value));
- return new SWTBotCCombo((CCombo) widget(matcher, index), matcher);
- }
-
- public SWTBotCCombo ccomboBoxWithName(String value) {
- return ccomboBoxWithName(value, 0);
- }
-
- @SuppressWarnings("unchecked")
- public SWTBotCheckBox checkBoxWithName(String name, int index) {
- Matcher<Widget> matcher = allOf(widgetOfType(Button.class), withId("name", name), withStyle(SWT.CHECK, "SWT.CHECK"));
- return new SWTBotCheckBox((Button) widget(matcher, index), matcher);
- }
-
- @SuppressWarnings("unchecked")
- public HyperlinkBot hyperlink(String text) {
- return new HyperlinkBot((Hyperlink) widget(allOf(widgetOfType(Hyperlink.class), withText(text))));
- }
-
- @SuppressWarnings("unchecked")
- public HyperlinkBot hyperlinkWithLabel(String label) {
- return new HyperlinkBot((Hyperlink) widget(allOf(widgetOfType(Hyperlink.class), withLabel(label))));
- }
-
- @SuppressWarnings("unchecked")
- public SectionBot section(String title) {
- return new SectionBot((Section) widget(allOf(widgetOfType(Section.class), withText(title))));
- }
-
- @SuppressWarnings("unchecked")
- public SectionBot sectionWithName(String value) {
- return new SectionBot((Section) widget(allOf(widgetOfType(Section.class), withId("name", value))));
- }
-
- public boolean waitForShellToClose(String title) {
- SWTBotShell shell = activeShell();
- if(title != null && title.equals(shell.getText())) {
- return waitForShellToClose(shell);
- }
- return false;
- }
-
- public boolean waitForShellToClose(SWTBotShell shell) {
- if(shell != null) {
- for(int i = 0; i < 50; i++ ) {
- if(!shell.isOpen()) {
- return true;
- }
- sleep(200);
- }
- shell.close();
- }
- return false;
- }
-
- @Override
- public SonatypeSWTBotTree tree() {
- return new SonatypeSWTBotTree(super.tree());
- }
-}
diff --git a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SonatypeSWTBotTree.java b/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SonatypeSWTBotTree.java
deleted file mode 100644
index 8a24d8d5..00000000
--- a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SonatypeSWTBotTree.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2010 Sonatype, 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:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.integration.tests.common;
-
-import java.lang.reflect.Field;
-import java.util.Arrays;
-
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.results.ArrayResult;
-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.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
-import org.hamcrest.Matcher;
-import org.hamcrest.SelfDescribing;
-
-public class SonatypeSWTBotTree extends SWTBotTree {
-
- public SonatypeSWTBotTree(Tree tree, SelfDescribing description)
- throws WidgetNotFoundException {
- super(tree, description);
- }
-
- public SonatypeSWTBotTree(Tree tree) throws WidgetNotFoundException {
- super(tree);
- }
-
- public SonatypeSWTBotTree(SWTBotTree tree) {
- this(tree.widget, getDescription(tree));
- }
-
- private static SelfDescribing getDescription(SWTBotTree tree) {
- try {
- Field f = AbstractSWTBot.class.getDeclaredField("description");
- return (SelfDescribing) f.get(tree);
- } catch (Exception e) {
- return null;
- }
- }
-
- public SWTBotTreeItem getTreeItem(final Matcher<Widget>... matchers) {
- try {
- new SWTBot().waitUntil(new DefaultCondition() {
- public String getFailureMessage() {
- return "Could not find node with text " + Arrays.toString(matchers) + "\nAvailable items: " + Arrays.toString(getItemsText()); //$NON-NLS-1$
- }
-
- public boolean test() throws Exception {
- return getItem(matchers) != null;
- }
- });
- } catch (TimeoutException e) {
- throw new WidgetNotFoundException(
- "Timed out waiting for tree item " + Arrays.toString(matchers), e); //$NON-NLS-1$
- }
- return new SWTBotTreeItem(getItem(matchers));
- }
-
- protected String[] getItemsText() {
- return syncExec(new ArrayResult<String>() {
- public String[] run() {
- TreeItem[] treeItems = widget.getItems();
- String[] names = new String[treeItems.length];
-
- for (int i = 0; i < treeItems.length; i++) {
- TreeItem treeItem = treeItems[i];
- names[i] = treeItem.getText();
- }
-
- return names;
- }
- });
- }
-
- protected TreeItem getItem(final Matcher<Widget>... matchers) {
- return syncExec(new WidgetResult<TreeItem>() {
- public TreeItem run() {
- TreeItem[] treeItems = widget.getItems();
- item: for (TreeItem treeItem : treeItems) {
- for (Matcher<Widget> matcher : matchers) {
- if (!matcher.matches(treeItem)) {
- continue item;
- }
- }
-
- return treeItem;
- }
-
- return null;
- }
- });
- }
-}
diff --git a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SwtbotUtil.java b/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SwtbotUtil.java
deleted file mode 100644
index 1deaec1e..00000000
--- a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/SwtbotUtil.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2010 Sonatype, 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:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.integration.tests.common;
-
-import org.eclipse.jface.bindings.keys.KeyStroke;
-import org.eclipse.swt.SWT;
-import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
-import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
-import org.eclipse.swtbot.swt.finder.waits.ICondition;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
-
-public class SwtbotUtil {
-
- private static final boolean OS_MAC = "carbon".equals( SWT.getPlatform() ) || "cocoa".equals( SWT.getPlatform() );
-
- public static boolean waitForClose(SWTBotShell shell) {
- for (int i = 0; i < 50; i++) {
- if (!shell.isOpen()) {
- return true;
- }
- sleep(200);
- }
- shell.close();
- return false;
- }
-
- private static void sleep(int i) {
- try {
- Thread.sleep(i);
- } catch (InterruptedException ex) {
- // ;)
- }
- }
-
- public static ICondition waitForLoad(final SWTBotTable table) {
- return new DefaultCondition() {
- public boolean test() throws Exception {
- return table.rowCount() != 0;
- }
-
- public String getFailureMessage() {
- return "Table still empty";
- }
- };
-
- }
-
- public static KeyStroke[] getUndoShortcut() {
- return Keystrokes.toKeys(OS_MAC ? SWT.COMMAND : SWT.CONTROL, 'z');
- }
-
- public static KeyStroke[] getRedoShortcut() {
- return Keystrokes.toKeys(OS_MAC ? SWT.COMMAND : SWT.CONTROL, 'y');
- }
-
- public static KeyStroke[] getPasteShortcut() {
- return Keystrokes.toKeys(OS_MAC ? SWT.COMMAND : SWT.CONTROL, 'v');
- }
-
- public static KeyStroke[] getMaximizeEditorShortcut() {
- return Keystrokes.toKeys(OS_MAC ? SWT.COMMAND : SWT.CONTROL, 'm');
- }
-
- public static KeyStroke[] getCloseShortcut() {
- return Keystrokes.toKeys(OS_MAC ? SWT.COMMAND : SWT.CONTROL, 'w');
- }
-
-}
diff --git a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/UIIntegrationTestCase.java b/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/UIIntegrationTestCase.java
deleted file mode 100644
index 8df80e71..00000000
--- a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/UIIntegrationTestCase.java
+++ /dev/null
@@ -1,1491 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2010 Sonatype, 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:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.integration.tests.common;
-
-import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withMnemonic;
-import static org.hamcrest.Matchers.startsWith;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.MalformedURLException;
-import java.net.Socket;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
-import org.hamcrest.Matcher;
-import org.hamcrest.Matchers;
-import org.hamcrest.text.StringStartsWith;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.runner.RunWith;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.Version;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
-import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
-import org.eclipse.swtbot.swt.finder.results.Result;
-import org.eclipse.swtbot.swt.finder.results.VoidResult;
-import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
-import org.eclipse.swtbot.swt.finder.utils.SWTUtils;
-import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
-import org.eclipse.swtbot.swt.finder.waits.ICondition;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
-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.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IPerspectiveDescriptor;
-import org.eclipse.ui.IPerspectiveRegistry;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPreferenceConstants;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.internal.IPreferenceConstants;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.eclipse.ui.internal.util.PrefUtil;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.progress.UIJob;
-
-import org.codehaus.plexus.util.IOUtil;
-
-import org.apache.maven.model.Model;
-
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.embedder.IMavenConfiguration;
-import org.eclipse.m2e.core.embedder.MavenModelManager;
-import org.eclipse.m2e.core.embedder.MavenRuntime;
-import org.eclipse.m2e.core.embedder.MavenRuntimeManager;
-import org.eclipse.m2e.core.internal.IMavenConstants;
-import org.eclipse.m2e.core.internal.MavenPluginActivator;
-import org.eclipse.m2e.core.internal.index.nexus.NexusIndexManager;
-import org.eclipse.m2e.core.internal.repository.RepositoryRegistry;
-import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.m2e.core.project.IMavenProjectImportResult;
-import org.eclipse.m2e.core.project.MavenProjectInfo;
-import org.eclipse.m2e.core.project.ProjectImportConfiguration;
-import org.eclipse.m2e.core.project.ResolverConfiguration;
-import org.eclipse.m2e.core.repository.IRepository;
-import org.eclipse.m2e.core.repository.IRepositoryRegistry;
-import org.eclipse.m2e.editor.pom.MavenPomEditor;
-import org.eclipse.m2e.integration.tests.common.matchers.ContainsMnemonic;
-import org.eclipse.m2e.tests.common.FileHelpers;
-import org.eclipse.m2e.tests.common.JobHelpers;
-import org.eclipse.m2e.tests.common.JobHelpers.IJobMatcher;
-import org.eclipse.m2e.tests.common.WorkspaceHelpers;
-
-
-/**
- * @author rseddon
- * @author Marvin Froeder
- */
-@SuppressWarnings("restriction")
-@RunWith(SWTBotJunit4ClassRunner.class)
-public abstract class UIIntegrationTestCase {
- private static final String DEFAULT_PROJECT_GROUP = "org.sonatype.test";
-
- public static final String PACKAGE_EXPLORER_VIEW_ID = "org.eclipse.jdt.ui.PackageExplorer";
-
- protected static SonatypeSWTBot bot;
-
- protected static final IProgressMonitor monitor = new NullProgressMonitor();
-
- private static JobHelpers.IJobMatcher EDITOR_JOB_MATCHER = new JobHelpers.IJobMatcher() {
- public boolean matches(Job job) {
- // wait for the job from MavenPomEditor.doSave()
- return (job instanceof UIJob) && "Saving".equals(job.getName());
- }
- };
-
- private static String oldSettings;
-
- @BeforeClass
- public final static void beforeClass() throws Exception {
- bot = new SonatypeSWTBot();
-
- SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
- SWTBotPreferences.TIMEOUT = 10 * 1000;
-
- // close the Welcome view if it's open
- try {
- SWTBotView view = bot.activeView();
- if(view != null && "org.eclipse.ui.internal.introview".equals(view.getViewReference().getId())) {
- view.close();
- }
- } catch(WidgetNotFoundException e) {
- // no active view
- }
-
- SWTBotShell[] shells = bot.shells();
- for(SWTBotShell shell : shells) {
- final Shell widget = shell.widget;
- Object parent = UIThreadRunnable.syncExec(shell.display, new Result<Object>() {
- public Object run() {
- return widget.isDisposed() ? null : widget.getParent();
- }
- });
-
- if(parent == null) {
- continue;
- }
-
- shell.close();
- }
-
- List<? extends SWTBotEditor> editors = bot.editors();
- for(SWTBotEditor e : editors) {
- e.close();
- }
-
- // Clean out projects left over from previous test runs.
- clearProjects();
-
- // Turn off eclipse features which make tests unreliable.
- WorkbenchPlugin.getDefault().getPreferenceStore().setValue(IPreferenceConstants.RUN_IN_BACKGROUND, true);
-
- PrefUtil.getAPIPreferenceStore().setValue(IWorkbenchPreferenceConstants.ENABLE_ANIMATIONS, false);
-
- // fullScreen();
- MavenPluginActivator.getDefault(); // force m2e to load so its indexing jobs will
- // be scheduled.
-
- openPerspective("org.eclipse.jdt.ui.JavaPerspective");
-
- closeView("org.eclipse.ui.views.ContentOutline");
- closeView("org.eclipse.mylyn.tasks.ui.views.tasks");
-
- oldSettings = getUserSettings();
- setUserSettings("settings.xml");
- }
-
- @AfterClass
- public final static void afterClass() throws Exception {
- if(oldSettings != null && !oldSettings.equals(getUserSettings())) {
- setUserSettings(oldSettings);
- }
- }
-
- @Before
- public final void waitMenu() {
- // The following seems to be needed to run SWTBot tests in Xvfb (the 'fake' X-server).
- // see http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.swtbot/msg01134.html
- UIThreadRunnable.syncExec(new VoidResult() {
- public void run() {
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().forceActive();
- }
- });
-
- bot.waitUntil(new DefaultCondition() {
-
- public boolean test() throws Exception {
- return bot.menu("File").isEnabled();
- }
-
- public String getFailureMessage() {
- return "Menu bar not available";
- }
- });
- }
-
- @AfterClass
- public final static void sleep() throws Exception {
- removeServer();
- clearProjects();
- takeScreenShot("cleared projects");
- }
-
- @After
- public final void finalShot() throws IOException {
- takeScreenShot(getClass().getSimpleName());
- }
-
- public static File takeScreenShot(String classifier) throws IOException {
- File parent = new File("target/screenshots");
- parent.mkdirs();
- File output = getCanonicalFile(File.createTempFile("swtbot-", "-" + classifier + ".png", parent));
- output.getParentFile().mkdirs();
- SWTUtils.captureScreenshot(output.getAbsolutePath());
- return output;
- }
-
- protected static File getCanonicalFile(File file) {
- try {
- return file.getCanonicalFile();
- } catch(IOException e) {
- return file.getAbsoluteFile();
- }
- }
-
- public static File takeScreenShot() throws IOException {
- return takeScreenShot("screen");
- }
-
- public static Exception takeScreenShot(Throwable e) throws Exception {
- File shot = takeScreenShot("exception");
- throw new Exception(e.getMessage() + " - " + shot, e);
- }
-
- protected void importZippedProject(File f) throws Exception {
- try {
- bot.menu("File").menu("Import...").click();
- SWTBotShell shell = bot.shell("Import");
- try {
- shell.activate();
-
- bot.tree().expandNode("General").select("Existing Projects into Workspace");
- bot.button("Next >").click();
- // bot.button("Select root directory:").click();
- bot.radio("Select archive file:").click();
- bot.text(1).setText(f.getCanonicalPath());
-
- bot.button("Refresh").click();
- bot.button("Finish").click();
- } catch(Throwable e) {
- takeScreenShot(e);
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
-
- waitForAllBuildsToComplete();
- } finally {
- f.delete();
- }
- }
-
- public static void waitForAllBuildsToComplete() {
- waitForAllEditorsToSave();
- JobHelpers.waitForJobsToComplete();
- }
-
- protected static void waitForAllLaunchesToComplete(int maxWaitMillis) {
- waitForAllEditorsToSave();
- JobHelpers.waitForLaunchesToComplete(maxWaitMillis);
- }
-
- protected static void waitForAllEditorsToSave() {
- JobHelpers.waitForJobs(EDITOR_JOB_MATCHER, 30 * 1000);
- }
-
- protected void createNewFolder(String projectName, String folderName) {
- // Add a new src folder with simple source file
- SWTBotTree tree = selectProject(projectName, true);
-
- ContextMenuHelper.clickContextMenu(tree, "New", "Folder");
-
- SWTBotShell shell = bot.shell("New Folder");
- try {
- shell.activate();
-
- bot.textWithLabel("Folder name:").setText(folderName);
- bot.button("Finish").click();
-
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
- }
-
- protected File importMavenProjects(String pluginId, String projectPath) throws Exception {
- File tempDir = unzipProject(pluginId, projectPath);
- waitForAllBuildsToComplete();
- // try {
- // getUI().click(new ButtonLocator("Cancel"));
- // // if there is a dialog up here, take a screenshot but get rid of it
- // // - so we can keep going
- // ScreenCapture.createScreenCapture();
- // } catch (Exception e) {
- // // make sure that there are no dialogs up here
- // }fi
- try {
- bot.menu("File").menu("Import...").click();
-
- SWTBotShell shell = bot.shell("Import");
- try {
- shell.activate();
-
- bot.tree().expandNode("Maven").select("Existing Maven Projects");
- bot.button("Next >").click();
- SWTBotCombo combo = bot.comboBoxWithLabel("Root Directory:");
- combo.setFocus();
- combo.setText(tempDir.getCanonicalPath());
-
- bot.button("Refresh").setFocus();
-
- bot.waitUntil(new ICondition() {
- private SWTBotButton next;
-
- public boolean test() throws Exception {
- return next.isEnabled();
- }
-
- public void init(SWTBot bot) {
- next = bot.button("Next >");
- }
-
- public String getFailureMessage() {
- return "Next button is not enabled";
- }
- });
-
- bot.button("Finish").click();
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
-
- waitForAllBuildsToComplete();
-
- } catch(Exception ex) {
- deleteDirectory(tempDir);
- throw ex;
- }
-
- return tempDir;
- }
-
- protected void openResource(String resourceName) {
- bot.menu("Navigate").menu("Open Resource...").click();
- SWTBotShell shell = bot.shell("Open Resource");
- try {
- shell.activate();
-
- bot.text().setText(resourceName);
- bot.button("Open").click();
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
- }
-
- protected void openType(String typeName) {
- bot.menu("Navigate").menu("Open Type...").click();
- SWTBotShell shell = bot.shell("Open Type");
- try {
- shell.activate();
-
- bot.text().setText(typeName);
- bot.button("OK").click();
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
- }
-
- protected void checkoutProjectsFromSVN(String url) throws Exception {
- bot.menu("File").menu("Import...").click();
-
- SWTBotShell shell = bot.shell("Import");
- try {
- shell.activate();
-
- bot.tree().expandNode("Maven").select("Check out Maven Projects from SCM");
- bot.button("Next >").click();
- // for some reason, in eclipse 3.5.1 and WT, the direct combo
- // selection
- // is
- // not triggering the UI events, so the finish button never gets
- // enabled
- // getUI().click(new ComboItemLocator("svn", new
- // NamedWidgetLocator("mavenCheckoutLocation.typeCombo")));
- // getUI().setFocus(
- // new NamedWidgetLocator("mavenCheckoutLocation.typeCombo"));
- // for (int i = 0; i < 9; i++) {
- // getUI().keyClick(WT.ARROW_DOWN);
- // }
- try {
- bot.comboBoxWithLabel("SCM URL:").setSelection("svn");
- } catch(RuntimeException ex) {
- throw new RuntimeException("Available options: " + Arrays.asList(bot.comboBoxWithLabel("SCM URL:").items()), ex);
- }
- bot.comboBox(1).setText(url);
-
- bot.button("Finish").click();
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
-
- waitForAllBuildsToComplete();
- }
-
- public void importZippedProject(String pluginID, String pluginPath) throws Exception {
- File f = copyPluginResourceToTempFile(pluginID, pluginPath);
- try {
- importZippedProject(f);
- } finally {
- f.delete();
- }
- }
-
- protected IViewPart showView(final String id) throws Exception {
- IViewPart part = (IViewPart) UIThreadTask.executeOnEventQueue(new UIThreadTask() {
- public Object runEx() throws Exception {
- IViewPart part = getActivePage().showView(id);
-
- return part;
- }
- });
-
- waitForAllBuildsToComplete();
- Assert.assertFalse(part == null);
-
- SWTBotView view = bot.viewById(id);
- view.show();
-
- return part;
- }
-
- protected static SWTBotView openView(final String id) {
- SWTBotView view;
- try {
- view = bot.viewById(id);
- } catch(WidgetNotFoundException e) {
- IViewPart part;
- try {
- part = (IViewPart) UIThreadTask.executeOnEventQueue(new UIThreadTask() {
- public Object runEx() throws Exception {
- IViewPart part = getActivePage().showView(id);
-
- return part;
- }
- });
- } catch(Exception ex) {
- throw new RuntimeException(ex);
- }
-
- Assert.assertFalse(part == null);
-
- view = bot.viewById(id);
- }
- view.show();
-
- return view;
- }
-
- protected void updateProjectConfiguration(String projectName) throws Exception {
- SWTBotTree tree = selectProject(projectName, true);
-
- ContextMenuHelper.clickContextMenu(tree, "Maven", "Update Project Configuration");
-
- waitForAllBuildsToComplete();
- }
-
- protected void openIssueTracking(String projectName) throws Exception {
- SWTBotTree tree = selectProject("test-project", true);
-
- ContextMenuHelper.clickContextMenu(tree, "Maven", "Open Issue Tracker");
-
- waitForAllBuildsToComplete();
- }
-
- protected SWTBotTree selectProject(String projectName) {
- return selectProject(projectName, true);
- }
-
- protected SWTBotTree selectProject(String projectName, boolean searchForIt) {
- SWTBotTree tree = bot.viewById(PACKAGE_EXPLORER_VIEW_ID).bot().tree();
- SWTBotTreeItem treeItem = null;
- try {
- treeItem = tree.getTreeItem(projectName);
- } catch(WidgetNotFoundException ex) {
- if(searchForIt) {
- SWTBotTreeItem[] allItems = tree.getAllItems();
- for(SWTBotTreeItem item : allItems) {
- // workaround required due to SVN/CVS that does add extra
- // informations to project name
- if(item.getText().contains(projectName)) {
- treeItem = item;
- break;
- }
- }
- }
-
- if(treeItem == null) {
- throw ex;
- }
- }
- treeItem.select();
- return tree;
- }
-
- protected List<SWTBotTreeItem> findItems(SWTBotTreeItem tree, Matcher<String> matcher) {
- List<SWTBotTreeItem> items = new ArrayList<SWTBotTreeItem>();
- SWTBotTreeItem[] allItems = tree.getItems();
- for(SWTBotTreeItem item : allItems) {
- if(matcher.matches(item.getText())) {
- items.add(item);
- }
- }
-
- return items;
- }
-
- protected SWTBotTreeItem findItem(SWTBotTreeItem tree, Matcher<String> matcher) {
- List<SWTBotTreeItem> items = findItems(tree, matcher);
- Assert.assertEquals(1, items.size());
- return items.get(0);
- }
-
- protected SWTBotTreeItem selectNode(SWTBotTree tree, Matcher<String> matcher) {
- SWTBotTreeItem treeItem = null;
- SWTBotTreeItem[] allItems = tree.getAllItems();
- for(SWTBotTreeItem item : allItems) {
- if(matcher.matches(item.getText())) {
- treeItem = item;
- break;
- }
- }
-
- if(treeItem != null) {
- treeItem.select();
- }
- return treeItem;
- }
-
- protected void installTomcat6() throws Exception {
-
- String tomcatInstallLocation = System.getProperty(TOMCAT_INSTALL_LOCATION_PROPERTY);
- if(tomcatInstallLocation == null) {
- tomcatInstallLocation = DEFAULT_TOMCAT_INSTALL_LOCATION;
- }
-
- Assert.assertTrue("Can't locate tomcat installation: " + tomcatInstallLocation,
- new File(tomcatInstallLocation).exists());
- // Install the Tomcat server
-
- Thread.sleep(5000);
-
- showView(SERVERS_VIEW_ID);
- SWTBotView serversView = bot.viewById(SERVERS_VIEW_ID);
-
- SWTBotTree tree = serversView.bot().tree();
- Assert.assertEquals("Server view already contains a server " + tree.getAllItems(), 0, tree.getAllItems().length);
-
- ContextMenuHelper.clickContextMenu(tree, "New", "Server");
-
- SWTBotShell shell = bot.shell("New Server");
- try {
- shell.activate();
-
- bot.tree().expandNode("Apache").select("Tomcat v6.0 Server");
- bot.button("Next >").click();
-
- SWTBotButton b = bot.button("Finish");
- if(!b.isEnabled()) {
- // First time...
- bot.textWithLabel("Tomcat installation &directory:").setText(tomcatInstallLocation);
- }
- b.click();
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
-
- waitForAllBuildsToComplete();
- }
-
- protected void deployProjectsIntoTomcat() throws Exception {
- // Deploy the test project into tomcat
- SWTBotView serversView = bot.viewById(SERVERS_VIEW_ID);
- serversView.show();
- serversView.setFocus();
-
- SWTBotTree tree = serversView.bot().tree().select(0);
- if(isEclipseVersion(3, 5)) {
- ContextMenuHelper.clickContextMenu(tree, "Add and Remove...");
- } else {
- ContextMenuHelper.clickContextMenu(tree, "Add and Remove Projects...");
- }
- String title = isEclipseVersion(3, 5) ? "Add and Remove..." : "Add and Remove Projects";
-
- SWTBotShell shell = bot.shell(title);
- try {
- shell.activate();
- bot.button("Add All >>").click();
- bot.button("Finish").click();
- } catch(Throwable ex) {
- takeScreenShot(ex);
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
-
- ContextMenuHelper.clickContextMenu(tree, "Start");
-
- waitForAllBuildsToComplete();
- if(!waitForServer(8080, 10000)) {
- ContextMenuHelper.clickContextMenu(tree, Matchers.anyOf(withMnemonic("Start"), withMnemonic("Restart")));
- waitForAllBuildsToComplete();
- waitForServer(8080, 10000);
- }
- }
-
- protected static void shutdownServer() {
- try {
- // shutdown the server
- SWTBotView serversView = bot.viewById(SERVERS_VIEW_ID);
- serversView.show();
- SWTBotTree tree = serversView.bot().tree().select(0);
-
- ContextMenuHelper.clickContextMenu(tree, "Stop");
-
- waitForAllBuildsToComplete();
-
- SWTBotShell shell = bot.shell("Terminate Server");
- try {
- shell.activate();
- bot.button("OK").click();
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
- } catch(WidgetNotFoundException ex) {
- // this only happen when server takes too long to stop
- }
- }
-
- public static void removeServer() {
- // shutdown the server
- try {
- SWTBotView serversView = bot.viewById(SERVERS_VIEW_ID);
- SWTBotTree tree = serversView.bot().tree();
-
- for(int i = 0; i < tree.getAllItems().length; i++ ) {
- SWTBotTree server = tree.select(0);
-
- // stop it first
- try {
- ContextMenuHelper.clickContextMenu(server, "Stop");
- } catch(Exception e) {
- // was not started
- }
- waitForAllBuildsToComplete();
-
- ContextMenuHelper.clickContextMenu(server, "Delete");
-
- SWTBotShell shell = bot.shell("Delete Server");
- try {
- shell.activate();
-
- bot.button("OK").click();
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
- }
-
- waitForAllBuildsToComplete();
- } catch(WidgetNotFoundException e) {
- // not an issue, mean this is not a server test
- return;
- } catch(SWTException e) {
- if(e.getCause() instanceof WidgetNotFoundException) {
- return; // not a problem
- }
- throw e;
- }
- }
-
- protected void restartServer(boolean republish) throws Exception {
- // shutdown the server
- SWTBotView serversView = bot.viewById(SERVERS_VIEW_ID);
- serversView.show();
-
- SWTBotTree tree;
- try {
- tree = serversView.bot().tree().select(0);
- } catch(WidgetNotFoundException ex) {
- takeScreenShot(ex);
- throw ex;
- }
-
- shutdownServer();
-
- if(republish) {
- ContextMenuHelper.clickContextMenu(tree, "Publish");
- waitForAllBuildsToComplete();
- }
-
- ContextMenuHelper.clickContextMenu(tree, "Start");
- waitForAllBuildsToComplete();
- }
-
- protected void findText(String src) {
- findTextWithWrap(src, false);
- }
-
- public static final String FIND_REPLACE = "Find/Replace";
-
- protected void findTextWithWrap(String src, boolean wrap) {
- bot.menu("Edit").menu("Find/Replace...").click();
-
- SWTBotShell shell = bot.shell(FIND_REPLACE);
- try {
- shell.activate();
-
- bot.comboBoxWithLabel("Find:").setText(src);
- if(wrap) {
- bot.checkBox("Wrap search").select();
- } else {
- bot.checkBox("Wrap search").deselect();
- }
-
- bot.button("Find").click();
- bot.button("Close").click();
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
- }
-
- protected void replaceText(String src, String target) {
- replaceTextWithWrap(src, target, false);
- }
-
- protected void replaceTextWithWrap(String src, String target, boolean wrap) {
- bot.menu("Edit").menu("Find/Replace...").click();
-
- SWTBotShell shell = bot.shell(FIND_REPLACE);
- try {
- shell.activate();
-
- bot.comboBoxWithLabel("Find:").setText(src);
- bot.comboBoxWithLabel("Replace with:").setText(target);
-
- if(wrap) {
- bot.checkBox("Wrap search").select();
- } else {
- bot.checkBox("Wrap search").deselect();
- }
-
- bot.button("Replace All").click();
-
- bot.button("Close").click();
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
-
- }
-
- public static boolean isEclipseVersion(int major, int minor) {
- Bundle bundle = ResourcesPlugin.getPlugin().getBundle();
- String version = (String) bundle.getHeaders().get(org.osgi.framework.Constants.BUNDLE_VERSION);
- Version v = org.osgi.framework.Version.parseVersion(version);
- return v.getMajor() == major && v.getMinor() == minor;
- }
-
- protected static IWorkbenchPage getActivePage() {
- IWorkbench workbench = PlatformUI.getWorkbench();
- return workbench.getWorkbenchWindows()[0].getActivePage();
- }
-
- protected File copyPluginResourceToTempFile(String plugin, String file) throws MalformedURLException, IOException {
- URL url = FileLocator.find(Platform.getBundle(plugin), new Path("/" + file), null);
- return copyPluginResourceToTempFile(plugin, url);
- }
-
- protected File copyPluginResourceToTempFile(String plugin, URL url) throws MalformedURLException, IOException {
- File f = File.createTempFile("temp", "." + new Path(url.getFile()).getFileExtension());
- InputStream is = new BufferedInputStream(url.openStream());
- FileOutputStream os = new FileOutputStream(f);
- try {
- IOUtil.copy(is, os);
- } finally {
- is.close();
- os.close();
- }
-
- return f;
- }
-
- /**
- * Import a project and assert it has no markers of SEVERITY_ERROR
- */
- protected File doImport(String pluginId, String projectPath) throws Exception {
- return doImport(pluginId, projectPath, true);
- }
-
- protected File doImport(String pluginId, String projectPath, boolean assertNoErrors) throws Exception {
- File tempDir = importMavenProjects(pluginId, projectPath);
- if(assertNoErrors) {
- assertProjectsHaveNoErrors();
- }
- return tempDir;
- }
-
- protected void assertProjectsHaveNoErrors() throws Exception {
- StringBuffer messages = new StringBuffer();
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- int count = 0;
- for(IProject project : projects) {
- if("Servers".equals(project.getName())) {
- continue;
- }
- if(count >= 10) {
- break;
- }
- IMarker[] markers = project.findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
- for(int i = 0; i < markers.length; i++ ) {
- if(markers[i].getAttribute(IMarker.SEVERITY, 0) == IMarker.SEVERITY_ERROR) {
- count++ ;
- messages.append('\t');
- if(messages.length() > 0) {
- messages.append(System.getProperty("line.separator"));
- }
- messages.append(project.getName() + ":" + markers[i].getAttribute(IMarker.LOCATION, "unknown location") + " "
- + markers[i].getAttribute(IMarker.MESSAGE, "unknown message"));
- }
- }
- }
- if(count > 0) {
- Assert.fail("One or more compile errors found:" + System.getProperty("line.separator") + messages);
- }
- }
-
- private static void unzipFile(String pluginId, String pluginPath, File dest) throws IOException {
- URL url = FileLocator.find(Platform.getBundle(pluginId), new Path("/" + pluginPath), null);
- InputStream is = new BufferedInputStream(url.openStream());
- ZipInputStream zis = new ZipInputStream(is);
- try {
- ZipEntry entry = zis.getNextEntry();
- while(entry != null) {
- File f = new File(dest, entry.getName());
- if(entry.isDirectory()) {
- f.mkdirs();
- } else {
- if(!f.getParentFile().exists()) {
- f.getParentFile().mkdirs();
- }
- OutputStream os = new BufferedOutputStream(new FileOutputStream(f));
- try {
- IOUtil.copy(zis, os);
- } finally {
- os.close();
- }
- }
- zis.closeEntry();
- entry = zis.getNextEntry();
- }
- } finally {
- zis.close();
- }
- }
-
- public static File unzipProject(String pluginId, String pluginPath) throws Exception {
- File tempDir = createTempDir("sonatype");
- unzipFile(pluginId, pluginPath, tempDir);
- return tempDir;
- }
-
- protected static File createTempDir(String prefix) throws IOException {
- File temp = null;
- temp = File.createTempFile(prefix, "");
- if(!temp.delete()) {
- throw new IOException("Unable to delete temp file:" + temp.getName());
- }
- if(!temp.mkdir()) {
- throw new IOException("Unable to create temp dir:" + temp.getName());
- }
- return temp;
- }
-
- private void deleteDirectory(File dir) {
- File[] fileArray = dir.listFiles();
- if(fileArray != null) {
- for(int i = 0; i < fileArray.length; i++ ) {
- if(fileArray[i].isDirectory())
- deleteDirectory(fileArray[i]);
- else
- fileArray[i].delete();
- }
- }
- dir.delete();
- }
-
- // Location of tomcat 6 installation which can be used by Eclipse WTP tests
- private static final String DEFAULT_TOMCAT_INSTALL_LOCATION = "target/tomcat/apache-tomcat-6.0.24";
-
- // Set this system property to override DEFAULT_TOMCAT_INSTALL_LOCATION
- private static final String TOMCAT_INSTALL_LOCATION_PROPERTY = "tomcat.install.location";
-
- public static final String SERVERS_VIEW_ID = "org.eclipse.wst.server.ui.ServersView";
-
- public static final String TOMCAT_SERVER_NAME = "Tomcat.*";
-
- public static void clearProjects() throws Exception {
- WorkspaceHelpers.cleanWorkspace();
- }
-
- protected MavenPomEditor openPomFile(String name) throws Exception {
-
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IFile file = root.getFile(new Path(name));
-
- final IEditorInput editorInput = new FileEditorInput(file);
- MavenPomEditor editor = (MavenPomEditor) UIThreadTask.executeOnEventQueue(new UIThreadTask() {
-
- public Object runEx() throws Exception {
- IEditorPart part = getActivePage().openEditor(editorInput, "org.eclipse.m2e.editor.MavenPomEditor", true);
- if(part instanceof MavenPomEditor) {
- return part;
- }
- return null;
- }
- });
-
- waitForAllBuildsToComplete();
-
- return editor;
- }
-
-// protected Model getModel(final MavenPomEditor editor) throws Exception {
-// Model model = (Model) UIThreadTask.executeOnEventQueue(new UIThreadTask() {
-//
-// public Object runEx() throws Exception {
-// return editor.readProjectDocument();
-// }
-// });
-// return model;
-// }
-
- /**
- * Create an archetype project and assert that it has proper natures & builders, and no error markers
- */
- protected IProject createArchetypeProject(final String archetypeName, String projectName) throws Exception {
- try {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- Assert.assertFalse(project.exists());
-
- bot.menu("File").menu("New").menu("Project...").click();
-
- SWTBotShell shell = bot.shell("New Project");
- try {
- shell.activate();
-
- bot.tree().expandNode("Maven").select("Maven Project");
- // click the first next button
- bot.button("Next >").click();
- bot.checkBox("Create a simple project (skip archetype selection)").deselect();
-
- // then the first page with only 'default' values
- bot.button("Next >").click();
- bot.comboBoxWithId("name", "catalogsCombo").setSelection(0);
-
- bot.waitUntil(SwtbotUtil.waitForLoad(bot.table()));
-
- // now select the quickstart row
- bot.table().select(bot.table().indexOf(archetypeName, 1));
-
- // and then click next
- bot.button("Next >").click();
-
- // then fill in the last page details
- bot.comboBoxWithLabel("Group Id:").setText(DEFAULT_PROJECT_GROUP);
- bot.comboBoxWithLabel("Artifact Id:").setText(projectName);
-
- bot.button("Finish").click();
- } catch(Throwable ex) {
- throw new Exception("Failed to create project for archetype:" + archetypeName + " - " + takeScreenShot(), ex);
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
-
- waitForAllBuildsToComplete();
-
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- Assert.assertTrue(project.exists());
- assertProjectsHaveNoErrors();
- Assert.assertTrue("archtype project \"" + archetypeName + "\" created without Maven nature",
- project.hasNature(IMavenConstants.NATURE_ID));
-
- selectProject(projectName, true);
-
- return project;
- } catch(Throwable ex) {
- throw new Exception("Failed to create project for archetype:" + archetypeName + " - " + takeScreenShot(), ex);
- }
- }
-
- /**
- * Create an archetype project and assert that it has proper natures & builders, and no error markers
- */
- protected IProject createSimpleMavenProject(String projectName) throws Exception {
- try {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- Assert.assertFalse(project.exists());
-
- bot.menu("File").menu("New").menu("Project...").click();
-
- SWTBotShell shell = bot.shell("New Project");
- try {
- shell.activate();
-
- bot.tree().expandNode("Maven").select("Maven Project");
-
- bot.button("Next >").click();
-
- bot.checkBox("Create a simple project (skip archetype selection)").click();
-
- bot.button("Next >").click();
-
- // then fill in the last page details
- bot.comboBoxWithLabel("Group Id:").setText(DEFAULT_PROJECT_GROUP);
- bot.comboBoxWithLabel("Artifact Id:").setText(projectName);
-
- bot.button("Finish").click();
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
-
- waitForAllBuildsToComplete();
-
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- Assert.assertTrue(project.exists());
- assertProjectsHaveNoErrors();
- Assert.assertTrue(projectName + " created without Maven nature", project.hasNature(IMavenConstants.NATURE_ID));
-
- selectProject(projectName, true);
-
- return project;
- } catch(Throwable ex) {
- throw new Exception("Failed to create project for archetype:" + projectName + " - " + takeScreenShot(), ex);
- }
- }
-
- protected IEditorPart openFile(IProject project, String relPath) throws Exception {
-
- final IFile f = project.getFile(relPath);
-
- IEditorPart editor = (IEditorPart) UIThreadTask.executeOnEventQueue(new UIThreadTask() {
-
- public Object runEx() throws Exception {
- return IDE.openEditor(getActivePage(), f, true);
- }
- });
-
- return editor;
- }
-
- private static boolean xmlPrefsSet = false;
-
- protected void setXmlPrefs() throws Exception {
- if(!xmlPrefsSet && isEclipseVersion(3, 5)) {
- // Disable new xml completion behavior to preserver compatibility
- // with previous versions.
- bot.menu("Window").menu("Preferences").click();
-
- SWTBotShell shell = bot.shell("Preferences");
- try {
- shell.activate();
-
- bot.tree().expandNode("XML").expandNode("XML Files").expandNode("Editor").select("Typing");
-
- bot.checkBox("Insert a matching end tag").select();
-
- bot.button("OK").click();
-
- xmlPrefsSet = true;
-
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
- }
- }
-
- protected IProject createQuickstartProject(String projectName) throws Exception {
- return createArchetypeProject("maven-archetype-quickstart", projectName);
- }
-
- protected void save() {
- bot.menu("File").menu("Save").click();
- }
-
- protected static void assertWizardError(final String message) throws Exception {
- assertWizardMessage(message, WizardPage.ERROR);
- }
-
- protected static void assertWizardMessage(final String message) throws Exception {
- assertWizardMessage(message, WizardPage.INFORMATION);
- }
-
- protected static void assertWizardMessage(final String message, final int severity) throws Exception {
- bot.sleep(1000);
- final AssertionError[] error = new AssertionError[] {null};
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- try {
- Object data = bot.activeShell().widget.getData();
- assertTrue("Current dialog is expected to be a wizard", data instanceof WizardDialog);
-
- boolean error = severity == WizardPage.ERROR;
-
- IWizardPage page = ((WizardDialog) data).getCurrentPage();
- String wizardMessage = error ? page.getErrorMessage() : page.getMessage();
- String prefix = error ? "Wizard error " : "Wizard message ";
-
- if(message == null) {
- assertNull(prefix + "should be null", wizardMessage);
- } else {
- assertNotNull(prefix + "should not be null", wizardMessage);
- assertEquals(prefix + "is not as expected", message, wizardMessage.trim());
- }
- } catch(AssertionError e) {
- error[0] = e;
- }
- }
- });
- if(error[0] != null) {
- takeScreenShot(error[0]);
- }
- }
-
- protected void addDependency(IProject project, String groupId, String artifactId, String version) {
- addDependency(project.getName(), groupId, artifactId, version);
- }
-
- @SuppressWarnings("unchecked")
- protected void addDependency(String projectName, String groupId, String artifactId, String version) {
- ContextMenuHelper.clickContextMenu(selectProject(projectName), "Maven", "Add Dependency");
-
- SWTBotShell shell = bot.shell("Add Dependency");
- try {
- shell.activate();
-
- String s = org.eclipse.m2e.core.ui.internal.Messages.MavenPomSelectionComponent_search_title;
- bot.textWithLabel(s).setText(artifactId);
- SWTBotTreeItem node = bot.tree().getTreeItem(ContainsMnemonic.containsMnemonic(groupId),
- ContainsMnemonic.containsMnemonic(artifactId));
- node.expand();
- String[] selection = findNodeName(node, startsWith(version));
- assertEquals("The matcher is expected to find one node", 1, selection.length);
- node.getNode(selection[0]).doubleClick();
-
- // bot.button("OK").click();
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
- }
-
- protected String[] findNodeName(SWTBotTreeItem node, Matcher<String> matcher) {
- List<String> nodes = new ArrayList<String>();
- List<String> items = node.getNodes();
- for(String text : items) {
- if(matcher.matches(text)) {
- nodes.add(text);
- }
- }
- return nodes.toArray(new String[0]);
- }
-
- protected void cleanProjects() {
- bot.menu("Project").menu("Clean...").click();
-
- SWTBotShell shell = bot.shell("Clean");
- try {
- shell.activate();
- bot.radio("Clean all projects").click();
- bot.button("ok").click();
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
-
- waitForAllBuildsToComplete();
- }
-
- protected static void closeView(final String id) throws Exception {
- IViewPart view = (IViewPart) UIThreadTask.executeOnEventQueue(new UIThreadTask() {
-
- public Object runEx() throws Exception {
- IViewPart view = getActivePage().findView(id);
-
- return view;
- }
- });
-
- if(view != null) {
- bot.viewById(id).close();
- }
- }
-
- protected static void openPerspective(final String id) throws Exception {
- // select Java perspective
- bot.perspectiveById(id).activate();
-
- UIThreadTask.executeOnEventQueue(new UIThreadTask() {
-
- public Object runEx() throws Exception {
- IPerspectiveRegistry perspectiveRegistry = PlatformUI.getWorkbench().getPerspectiveRegistry();
- IPerspectiveDescriptor perspective = perspectiveRegistry.findPerspectiveWithId(id);
- getActivePage().setPerspective(perspective);
-
- return null;
- }
- });
- }
-
- protected void switchToExternalMaven() throws Exception {
- MavenRuntime newRuntime = MavenRuntimeManager.createExternalRuntime("C:\\apache-maven-2.1.0");
- List<MavenRuntime> currRuntimes = MavenPlugin.getMavenRuntimeManager().getMavenRuntimes();
- ArrayList<MavenRuntime> list = new ArrayList<MavenRuntime>(currRuntimes);
- list.add(newRuntime);
- MavenPlugin.getMavenRuntimeManager().setRuntimes(list);
- MavenPlugin.getMavenRuntimeManager().setDefaultRuntime(newRuntime);
- }
-
- protected void updateLocalIndex() throws Exception {
- SWTBotView view = openView("org.eclipse.m2e.core.views.MavenRepositoryView");
- SWTBotTree tree = view.bot().tree();
- findItem(tree.expandNode("Local Repositories"), StringStartsWith.startsWith("Local Repository")).select();
- ContextMenuHelper.clickContextMenu(tree, "Rebuild Index");
-
- SWTBotShell shell = bot.shell("Rebuild Index");
- try {
- shell.activate();
- bot.button("OK").click();
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
-
- JobHelpers.waitForJobs(new IJobMatcher() {
-
- public boolean matches(Job job) {
- return "Rebuilding Indexes".matches(job.getName());
- }
- }, 5 * 60 * 1000);
-
- waitForAllBuildsToComplete();
-
- showView("org.eclipse.m2e.core.views.MavenRepositoryView");
- }
-
- protected void excludeArtifact(String projectName, String jarName, String plugin) throws Exception {
- SWTBotTree tree = selectProject(projectName);
- findItem(tree.expandNode(projectName).expandNode("Maven Dependencies"), StringStartsWith.startsWith(jarName))
- .select();
- ContextMenuHelper.clickContextMenu(tree, "Maven", "Exclude Maven Artifact...");
- SWTBotShell shell = bot.shell("Exclude: " + plugin);
- try {
- shell.activate();
- bot.button("OK").click();
- } finally {
- SwtbotUtil.waitForClose(shell);
- }
-
- waitForAllBuildsToComplete();
- }
-
- protected static boolean waitForServer(int port, int timeout) {
- Socket socket = new Socket();
- try {
- socket.bind(null);
- } catch(IOException e) {
- return false;
- }
- try {
- for(int i = 0; i <= timeout / 100; i++ ) {
- try {
- socket.connect(new InetSocketAddress(InetAddress.getByName(null), port), 100);
- return true;
- } catch(IOException e) {
- // ignored, retry
- }
- }
- return false;
- } finally {
- try {
- socket.close();
- } catch(IOException e) {
- // ignored
- }
- }
- }
-
- protected String retrieveWebPage(String urlString) throws IOException, InterruptedException {
- int i = 0;
- do {
- URL url = new URL(urlString);
- URLConnection conn;
- try {
- conn = url.openConnection();
- } catch(IOException e) {
- continue;
- }
- conn.setDoInput(true);
- try {
- conn.connect();
- } catch(IOException e) {
- Thread.sleep(1000);
- continue;
- }
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- IOUtil.copy(conn.getInputStream(), out);
-
- try {
- conn.getInputStream().close();
- } catch(IOException e) {
- // not relevant
- }
-
- return new String(out.toByteArray(), "UTF-8");
- } while(i < 10);
-
- return null;
- }
-
- protected void copy(final String str) throws Exception {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- Clipboard clipboard = new Clipboard(Display.getDefault());
- TextTransfer transfer = TextTransfer.getInstance();
- clipboard.setContents(new String[] {str}, new Transfer[] {transfer});
- clipboard.dispose();
- }
- });
- }
-
- protected static String setUserSettings(String settingsFile) throws CoreException {
- if(settingsFile != null) {
- settingsFile = new File(settingsFile).getAbsolutePath();
- }
- IMavenConfiguration mavenConfiguration = MavenPlugin.getMavenConfiguration();
- String oldUserSettingsFile = mavenConfiguration.getUserSettingsFile();
- mavenConfiguration.setUserSettingsFile(settingsFile);
- return oldUserSettingsFile;
- }
-
- protected static String getUserSettings() {
- IMavenConfiguration mavenConfiguration = MavenPlugin.getMavenConfiguration();
- return mavenConfiguration.getUserSettingsFile();
- }
-
- protected static void updateRepositoryRegistry() {
- try {
- ((RepositoryRegistry) MavenPlugin.getRepositoryRegistry()).updateRegistry(monitor);
- } catch(CoreException e) {
- throw new IllegalStateException(e);
- }
- }
-
- protected static void updateIndex(String repoUrl) {
- IRepositoryRegistry repositoryRegistry = MavenPlugin.getRepositoryRegistry();
- for(IRepository repository : repositoryRegistry.getRepositories(IRepositoryRegistry.SCOPE_SETTINGS)) {
- if(repository.getUrl().equals(repoUrl)) {
- try {
- NexusIndexManager indexManager = (NexusIndexManager) MavenPlugin.getIndexManager();
- indexManager.updateIndex(repository, true, monitor);
- } catch(CoreException e) {
- throw new IllegalStateException(e);
- }
- }
- }
- }
-
- protected static IProject[] importProjects(String basedir, String[] pomNames) throws IOException, CoreException {
- MavenModelManager mavenModelManager = MavenPlugin.getMavenModelManager();
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
-
- File src = new File(basedir);
- File dst = new File(root.getLocation().toFile(), src.getName());
- FileHelpers.copyDir(src, dst);
-
- final ArrayList<MavenProjectInfo> projectInfos = new ArrayList<MavenProjectInfo>();
- for(String pomName : pomNames) {
- File pomFile = new File(dst, pomName);
- Model model = mavenModelManager.readMavenModel(pomFile);
- MavenProjectInfo projectInfo = new MavenProjectInfo(pomName, pomFile, model, null);
- setBasedirRename(projectInfo);
- projectInfos.add(projectInfo);
- }
-
- final ProjectImportConfiguration importConfiguration = new ProjectImportConfiguration(new ResolverConfiguration());
-
- final ArrayList<IMavenProjectImportResult> importResults = new ArrayList<IMavenProjectImportResult>();
-
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- importResults.addAll(MavenPlugin.getProjectConfigurationManager().importProjects(projectInfos,
- importConfiguration, monitor));
- }
- }, MavenPlugin.getProjectConfigurationManager().getRule(), IWorkspace.AVOID_UPDATE, monitor);
-
- IProject[] projects = new IProject[projectInfos.size()];
- for(int i = 0; i < projectInfos.size(); i++ ) {
- IMavenProjectImportResult importResult = importResults.get(i);
- Assert.assertSame(projectInfos.get(i), importResult.getMavenProjectInfo());
- projects[i] = importResult.getProject();
- Assert.assertNotNull("Failed to import project " + projectInfos, projects[i]);
-
- /*
- * Sanity check: make sure they were all imported
- */
- Model model = projectInfos.get(0).getModel();
- IMavenProjectFacade facade = MavenPlugin.getMavenProjectRegistry().create(projects[i], monitor);
- if(facade == null) {
- Assert
- .fail("Project " + model.getGroupId() + "-" + model.getArtifactId() + "-" + model.getVersion()
- + " was not imported. Errors: "
- + WorkspaceHelpers.toString(WorkspaceHelpers.findErrorMarkers(projects[i])));
- }
- }
-
- return projects;
- }
-
- private static void setBasedirRename(MavenProjectInfo projectInfo) throws IOException {
- File workspaceRoot = ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile();
- File basedir = projectInfo.getPomFile().getParentFile().getCanonicalFile();
-
- projectInfo.setBasedirRename(basedir.getParentFile().equals(workspaceRoot) ? MavenProjectInfo.RENAME_REQUIRED
- : MavenProjectInfo.RENAME_NO);
- }
-}
diff --git a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/UIThreadTask.java b/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/UIThreadTask.java
deleted file mode 100644
index e233abbc..00000000
--- a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/UIThreadTask.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2010 Sonatype, 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:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.integration.tests.common;
-
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Executes a task on the UI thread. Task can return an object to caller, and
- * any exceptions which occur will be re-thrown in the calling thread.
- */
-public abstract class UIThreadTask implements Runnable {
- private Object result = null;
-
- private Exception exception = null;
-
- final public void run() {
- try {
- result = runEx();
- } catch (Exception ex) {
- exception = ex;
- }
- }
-
- public Exception getException() {
- return exception;
- }
-
- public Object getResult() {
- return result;
- }
-
- public abstract Object runEx() throws Exception;
-
- public static Object executeOnEventQueue(UIThreadTask task)
- throws Exception {
- if (Display.getDefault().getThread() == Thread.currentThread()) {
- task.run();
- } else {
- Display.getDefault().syncExec(task);
- }
- if (task.getException() != null) {
- throw task.getException();
- }
- return task.getResult();
- }
-}
diff --git a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/matchers/ContainsMnemonic.java b/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/matchers/ContainsMnemonic.java
deleted file mode 100644
index 1f9e82fa..00000000
--- a/org.eclipse.m2e.integration.tests.common/src/org/eclipse/m2e/integration/tests/common/matchers/ContainsMnemonic.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2010 Sonatype, 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:
- * Sonatype, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.m2e.integration.tests.common.matchers;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher;
-import org.eclipse.swtbot.swt.finder.utils.SWTUtils;
-import org.hamcrest.Description;
-import org.hamcrest.Factory;
-import org.hamcrest.Matcher;
-
-public class ContainsMnemonic<T extends Widget> extends AbstractMatcher<T> {
- private final String text;
-
- ContainsMnemonic(String text) {
- this.text = text;
- }
-
- String getText(Object obj) throws NoSuchMethodException,
- IllegalAccessException, InvocationTargetException {
- String text = ((String) SWTUtils.invokeMethod(obj, "getText"))
- .replaceAll(Text.DELIMITER, "\n");
- return text.replaceAll("&", "").split("\t")[0];
- }
-
- public void describeTo(Description description) {
- description
- .appendText("contains mnemonic '").appendText(text).appendText("'"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- protected boolean doMatch(Object obj) {
- try {
- return getText(obj).contains(text);
- } catch (Exception e) {
- // do nothing
- }
- return false;
- }
-
- @Factory
- public static <T extends Widget> Matcher<T> containsMnemonic(String text) {
- return new ContainsMnemonic<T>(text);
- }
-
-}
diff --git a/org.eclipse.m2e.parent/pom.xml b/org.eclipse.m2e.parent/pom.xml
index 5a0b4b03..4f2bf58b 100644
--- a/org.eclipse.m2e.parent/pom.xml
+++ b/org.eclipse.m2e.parent/pom.xml
@@ -116,7 +116,6 @@
<!-- common test helpers -->
<module>../org.eclipse.m2e.tests.common</module>
- <module>../org.eclipse.m2e.integration.tests.common</module>
<!-- Logging -->
<module>../org.eclipse.m2e.logback.appender</module>
diff --git a/org.eclipse.m2e.sdk.feature/feature.xml b/org.eclipse.m2e.sdk.feature/feature.xml
index 0cd74672..b66e6a4a 100644
--- a/org.eclipse.m2e.sdk.feature/feature.xml
+++ b/org.eclipse.m2e.sdk.feature/feature.xml
@@ -33,20 +33,6 @@
version="0.0.0"
unpack="false"/>
- <plugin
- id="org.eclipse.m2e.integration.tests.common"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.m2e.integration.tests.common.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
<!-- source bundles from main feature -->
<plugin

Back to the top