Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-02-16 18:50:31 -0500
committerspingel2010-02-16 18:50:31 -0500
commit04bf644b7baa6f90dc9259bae309bec9a764226d (patch)
treed33c03c3def7dfb24ea8c125dfd070730b8732b9 /bundles/org.eclipse.equinox.p2.tests.discovery
parent28e7440a4d694780df7ee7606a570a74a35ede7c (diff)
downloadrt.equinox.p2-04bf644b7baa6f90dc9259bae309bec9a764226d.tar.gz
rt.equinox.p2-04bf644b7baa6f90dc9259bae309bec9a764226d.tar.xz
rt.equinox.p2-04bf644b7baa6f90dc9259bae309bec9a764226d.zip
bug 295273 - [discovery] move Mylyn Connector Discovery UI into P2
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests.discovery')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.classpath11
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.gitignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.core.prefs342
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.pde.prefs24
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/META-INF/MANIFEST.MF18
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/build.properties19
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/plugin.properties17
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/plugin.xml83
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/AllDiscoveryTests.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/DiscoveryTestConstants.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/BundleDiscoveryStrategyTest.java97
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryRemoteTest.java85
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryTest.java161
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/DirectoryParserTest.java118
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/RemoteBundleDiscoveryStrategyTest.java74
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/AbstractMockFactory.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogCategoryMockFactory.java66
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogItemMockFactory.java125
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockBundleDiscoveryStrategy.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockCatalogSource.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockDiscoveryStrategy.java89
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogCategoryComparatorTest.java80
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogConnectorComparatorTest.java84
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/.project17
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/build.properties1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/feature.xml20
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/.project17
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/build.properties1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/feature.xml24
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/artifacts.jarbin0 -> 589 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/content.jarbin0 -> 994 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test1_1.0.0.201001200403.jarbin0 -> 387 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test2_1.0.0.201001200403.jarbin0 -> 407 bytes
39 files changed, 1897 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.classpath b/bundles/org.eclipse.equinox.p2.tests.discovery/.classpath
new file mode 100644
index 000000000..c5eb0e976
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/.classpath
@@ -0,0 +1,11 @@
+<?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">
+ <accessrules>
+ <accessrule kind="accessible" pattern="**/internal/**"/>
+ </accessrules>
+ </classpathentry>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.cvsignore b/bundles/org.eclipse.equinox.p2.tests.discovery/.cvsignore
new file mode 100644
index 000000000..ba077a403
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.gitignore b/bundles/org.eclipse.equinox.p2.tests.discovery/.gitignore
new file mode 100644
index 000000000..ba077a403
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/.gitignore
@@ -0,0 +1 @@
+bin
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.project b/bundles/org.eclipse.equinox.p2.tests.discovery/.project
new file mode 100644
index 000000000..319ac847b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.equinox.p2.tests.discovery</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.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..6c30227a0
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,342 @@
+#Tue May 12 20:42:43 PDT 2009
+eclipse.preferences.version=1
+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.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+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=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+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.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+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=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+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.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+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=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+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,NORMAL
+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=80
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=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=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=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=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=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_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=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=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=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..8d68e732b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,63 @@
+#Thu Sep 11 16:27:18 PDT 2008
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Mylyn based on Eclipse
+formatter_settings_version=11
+internal.default.compliance=default
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+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">/**\r\n * @return the ${bare_field_name}\r\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">/**\r\n * @param ${param} the ${bare_field_name} to set\r\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">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\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">/**\r\n * @author ${user}\r\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">/**\r\n * \r\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">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) 2010 Tasktop Technologies and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * Tasktop Technologies - initial API and implementation\r\n *******************************************************************************/\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</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">\r\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">\r\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">\r\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">\r\n</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\r\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\r\n${body_statement}</template><template autoinsert\="false" 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}\r\n// ignore</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">/**\r\n * ${tags}\r\n * ${see_to_target}\r\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">/**\r\n * @return the ${bare_field_name}\r\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">/**\r\n * @param ${param} the ${bare_field_name} to set\r\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">/**\r\n * ${tags}\r\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">/**\r\n * \r\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">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\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">/**\r\n * \r\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">/**\r\n * ${tags}\r\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)\r\n * ${see_to_overridden}\r\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">/**\r\n * ${tags}\r\n * ${see_to_target}\r\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}\r\n${package_declaration}\r\n\r\n${typecomment}\r\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">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" 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\r\n${exception_var}.printStackTrace();</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\r\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}\r\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>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=true
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs b/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 000000000..d8c6d26af
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Mon Jun 25 03:02:37 GMT 2007
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.team.ui.prefs b/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 000000000..2fa52d061
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Tue Feb 16 15:42:58 PST 2010
+commit.comment.template=${connector.task.prefix} ${task.key} - ${task.description}
+eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.pde.prefs
new file mode 100644
index 000000000..5937a85ac
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,24 @@
+#Tue May 20 17:39:22 PDT 2008
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=2
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-bundle-classpath-entries=1
+compilers.p.missing-packages=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=0
+compilers.p.unknown-class=0
+compilers.p.unknown-element=0
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=0
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests.discovery/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..e5f8331d0
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.equinox.p2.tests.discovery;singleton:=true
+Bundle-Version: 3.4.0.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.equinox.p2.discovery;bundle-version="1.0.0",
+ org.eclipse.equinox.p2.discovery.compatiblity;bundle-version="1.0.0",
+ org.eclipse.equinox.p2.ui.discovery;bundle-version="1.0.0",
+ org.junit,
+ org.eclipse.core.runtime;bundle-version="3.1.0",
+ org.eclipse.ui;bundle-version="3.1.0"
+Export-Package: org.eclipse.equinox.p2.discovery.tests;x-internal:=true,
+ org.eclipse.equinox.p2.discovery.tests.core;x-internal:=true,
+ org.eclipse.equinox.p2.discovery.tests.core.mock;x-internal:=true,
+ org.eclipse.equinox.p2.discovery.tests.core.util;x-internal:=true
+Bundle-Vendor: %Bundle-Provider
+Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/about.html b/bundles/org.eclipse.equinox.p2.tests.discovery/about.html
new file mode 100644
index 000000000..bc6e2b493
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>July 3, 2008</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</a>.</p>
+
+
+</body>
+</html>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/build.properties b/bundles/org.eclipse.equinox.p2.tests.discovery/build.properties
new file mode 100644
index 000000000..16fc97f5d
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/build.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Tasktop Technologies - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties,\
+ testdata/
+
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/plugin.properties b/bundles/org.eclipse.equinox.p2.tests.discovery/plugin.properties
new file mode 100644
index 000000000..6d6397f85
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/plugin.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Tasktop Technologies - initial API and implementation
+###############################################################################
+Bundle-Vendor = Eclipse.org - Equinox
+Bundle-Name = Equinox Provisioning Discovery Tests
+connectorCategory.description = a category for testing purposes
+connectorCategory.name = Test Category
+certification.name = Test Certification
+certification.url = http://eclipse.org/mylyn
+certification.description = Description
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/plugin.xml b/bundles/org.eclipse.equinox.p2.tests.discovery/plugin.xml
new file mode 100644
index 000000000..78af283ee
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/plugin.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?><!--
+ Copyright (c) 2009 Tasktop Technologies and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Tasktop Technologies - initial API and implementation
+ -->
+
+<plugin>
+ <extension
+ point="org.eclipse.mylyn.discovery.core.connectorDiscovery">
+ <connectorCategory
+ description="%connectorCategory.description"
+ id="org.eclipse.mylyn.discovery.tests.connectorCategory1"
+ name="%connectorCategory.name">
+ </connectorCategory>
+ <connectorDescriptor
+ categoryId="org.eclipse.mylyn.discovery.tests.connectorCategory1"
+ description="a fictitious test connector that does nothing"
+ id="org.eclipse.mylyn.discovery.tests.connectorDescriptor1"
+ kind="task"
+ license="UTL (Unit Test License)"
+ name="Test Connector"
+ provider="UnitTesting"
+ siteUrl="http://foo.nodomain/site">
+ </connectorDescriptor>
+ <connectorDescriptor
+ categoryId="org.eclipse.mylyn.discovery.tests.connectorCategory1"
+ description="Trac Connector"
+ id="org.eclipse.mylyn.discovery.test1"
+ kind="task"
+ license="License"
+ name="Installable Test Connector"
+ provider="Eclipse Mylyn"
+ siteUrl="http://localhost/discovery/">
+ </connectorDescriptor>
+ <connectorDescriptor
+ categoryId="org.eclipse.mylyn.discovery.tests.connectorCategory1"
+ description="Trac Connector"
+ id="org.eclipse.mylyn.discovery.2tests"
+ kind="task"
+ license="License"
+ name="2 Installable Test Connector"
+ provider="Eclipse Mylyn"
+ siteUrl="http://localhost/discovery/">
+ <iu
+ id="org.eclipse.mylyn.discovery.test1">
+ </iu>
+ <iu
+ id="org.eclipse.mylyn.discovery.test2">
+ </iu>
+ </connectorDescriptor>
+ <certification
+ id="org.eclipse.mylyn.discovery.tests.certification1"
+ name="%certification.name"
+ url="%certification.url">
+ <description>
+ %certification.description
+ </description>
+ </certification>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="menu:help?after=additions">
+ <command
+ commandId="org.eclipse.equinox.p2.ui.discovery.commands.ShowBundleCatalog"
+ label="Show Bundle Catalog..."
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.equinox.p2.ui.discovery.commands.ShowRepositoryCatalog"
+ label="Show Repository Catalog..."
+ style="push">
+ </command>
+ </menuContribution>
+ </extension>
+
+</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/AllDiscoveryTests.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/AllDiscoveryTests.java
new file mode 100644
index 000000000..4cd29eb0f
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/AllDiscoveryTests.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.p2.discovery.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.equinox.p2.discovery.tests.core.BundleDiscoveryStrategyTest;
+import org.eclipse.equinox.p2.discovery.tests.core.ConnectorDiscoveryRemoteTest;
+import org.eclipse.equinox.p2.discovery.tests.core.ConnectorDiscoveryTest;
+import org.eclipse.equinox.p2.discovery.tests.core.DirectoryParserTest;
+import org.eclipse.equinox.p2.discovery.tests.core.RemoteBundleDiscoveryStrategyTest;
+
+/**
+ * @author Steffen Pingel
+ */
+public class AllDiscoveryTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Tests for org.eclipse.mylyn.discovery");
+ suite.addTestSuite(ConnectorDiscoveryTest.class);
+ suite.addTestSuite(DirectoryParserTest.class);
+ suite.addTestSuite(BundleDiscoveryStrategyTest.class);
+ suite.addTestSuite(RemoteBundleDiscoveryStrategyTest.class);
+ suite.addTestSuite(ConnectorDiscoveryRemoteTest.class);
+ return suite;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/DiscoveryTestConstants.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/DiscoveryTestConstants.java
new file mode 100644
index 000000000..3da5ab452
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/DiscoveryTestConstants.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.p2.discovery.tests;
+
+/**
+ * @author David Green
+ */
+public abstract class DiscoveryTestConstants {
+
+ /**
+ * The URL of the mylyn discovery directory, may be overridden using the system property
+ * <tt>mylyn.discovery.directory</tt>.
+ */
+ public static final String DISCOVERY_URL = System.getProperty("mylyn.discovery.directory",
+ "http://www.eclipse.org/mylyn/discovery/directory-3.3.xml");
+
+ private DiscoveryTestConstants() {
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/BundleDiscoveryStrategyTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/BundleDiscoveryStrategyTest.java
new file mode 100644
index 000000000..01f8915c7
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/BundleDiscoveryStrategyTest.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.p2.discovery.tests.core;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.discovery.Policy;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.equinox.internal.p2.discovery.model.Certification;
+import org.eclipse.equinox.p2.discovery.tests.core.mock.MockBundleDiscoveryStrategy;
+
+/**
+ * @author David Green
+ */
+public class BundleDiscoveryStrategyTest extends TestCase {
+
+ private MockBundleDiscoveryStrategy discoveryStrategy;
+
+ private final List<CatalogCategory> categories = new ArrayList<CatalogCategory>();
+
+ private final List<CatalogItem> connectors = new ArrayList<CatalogItem>();
+
+ private final List<Certification> certifications = new ArrayList<Certification>();
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ discoveryStrategy = new MockBundleDiscoveryStrategy();
+ discoveryStrategy.setPolicy(new Policy(true));
+ discoveryStrategy.setCategories(categories);
+ discoveryStrategy.setItems(connectors);
+ discoveryStrategy.setCertifications(certifications);
+ }
+
+ public void testDiscovery() throws CoreException {
+ discoveryStrategy.performDiscovery(new NullProgressMonitor());
+
+ assertFalse(categories.isEmpty());
+ assertFalse(connectors.isEmpty());
+ CatalogCategory category = findCategoryById("org.eclipse.mylyn.discovery.tests.connectorCategory1");
+ assertNotNull(category);
+ CatalogItem connector = findConnectorById("org.eclipse.mylyn.discovery.tests.connectorDescriptor1");
+ assertNotNull(connector);
+ Certification certification = findCertificationById("org.eclipse.mylyn.discovery.tests.certification1");
+ assertNotNull(certification);
+ }
+
+ public void testDiscoveryNoCategoriesPolicy() throws CoreException {
+ discoveryStrategy.setPolicy(new Policy(false));
+ discoveryStrategy.performDiscovery(new NullProgressMonitor());
+
+ assertTrue(categories.isEmpty());
+ }
+
+ private CatalogItem findConnectorById(String id) {
+ for (CatalogItem descriptor : connectors) {
+ if (id.equals(descriptor.getId())) {
+ return descriptor;
+ }
+ }
+ return null;
+ }
+
+ private CatalogCategory findCategoryById(String id) {
+ for (CatalogCategory descriptor : categories) {
+ if (id.equals(descriptor.getId())) {
+ return descriptor;
+ }
+ }
+ return null;
+ }
+
+ private Certification findCertificationById(String id) {
+ for (Certification descriptor : certifications) {
+ if (id.equals(descriptor.getId())) {
+ return descriptor;
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryRemoteTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryRemoteTest.java
new file mode 100644
index 000000000..df01213ea
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryRemoteTest.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.p2.discovery.tests.core;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.discovery.Catalog;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.equinox.p2.discovery.tests.DiscoveryTestConstants;
+
+/**
+ * A test that uses the real discovery directory and verifies that it works, and that all referenced update sites appear
+ * to be available.
+ *
+ * @author David Green
+ */
+public class ConnectorDiscoveryRemoteTest extends TestCase {
+
+ private Catalog connectorDiscovery;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ connectorDiscovery = new Catalog();
+ connectorDiscovery.setVerifyUpdateSiteAvailability(false);
+
+ connectorDiscovery.getDiscoveryStrategies().clear();
+ RemoteBundleDiscoveryStrategy remoteStrategy = new RemoteBundleDiscoveryStrategy();
+ remoteStrategy.setDirectoryUrl(DiscoveryTestConstants.DISCOVERY_URL);
+ connectorDiscovery.getDiscoveryStrategies().add(remoteStrategy);
+ }
+
+ public void testRemoteDirectory() throws CoreException {
+ connectorDiscovery.performDiscovery(new NullProgressMonitor());
+
+ assertFalse(connectorDiscovery.getCategories().isEmpty());
+ assertFalse(connectorDiscovery.getItems().isEmpty());
+ }
+
+// public void testVerifyAvailability() throws CoreException {
+// connectorDiscovery.performDiscovery(new NullProgressMonitor());
+// for (CatalogItem connector : connectorDiscovery.getConnectors()) {
+// assertNull(connector.getAvailable());
+// }
+// connectorDiscovery.verifySiteAvailability(new NullProgressMonitor());
+//
+// assertFalse(connectorDiscovery.getConnectors().isEmpty());
+//
+// int unavailableCount = 0;
+// for (CatalogItem connector : connectorDiscovery.getConnectors()) {
+// assertNotNull(connector.getAvailable());
+// if (!connector.getAvailable()) {
+// ++unavailableCount;
+// }
+// }
+// if (unavailableCount > 0) {
+// fail(String.format("%s unavailable: %s", unavailableCount, computeUnavailableConnetorDescriptorNames()));
+// }
+// }
+
+ private String computeUnavailableConnetorDescriptorNames() {
+ String message = "";
+ for (CatalogItem connector : connectorDiscovery.getItems()) {
+ if (!connector.getAvailable()) {
+ if (message.length() > 0) {
+ message += ", ";
+ }
+ message += connector.getName();
+ }
+ }
+ return message;
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryTest.java
new file mode 100644
index 000000000..3a8eb6f84
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryTest.java
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.discovery.tests.core;
+
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.discovery.Catalog;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.equinox.p2.discovery.tests.core.mock.CatalogItemMockFactory;
+import org.eclipse.equinox.p2.discovery.tests.core.mock.MockDiscoveryStrategy;
+import org.osgi.framework.Version;
+
+/**
+ * @author David Green
+ */
+public class ConnectorDiscoveryTest extends TestCase {
+
+ private Catalog connectorDiscovery;
+
+ private MockDiscoveryStrategy mockDiscoveryStrategy;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ connectorDiscovery = new Catalog();
+ mockDiscoveryStrategy = new MockDiscoveryStrategy();
+ connectorDiscovery.getDiscoveryStrategies().add(mockDiscoveryStrategy);
+ }
+
+ public void testPlatformFilter_None() throws CoreException {
+ connectorDiscovery.performDiscovery(new NullProgressMonitor());
+ assertEquals(mockDiscoveryStrategy.getConnectorCount(), connectorDiscovery.getItems().size());
+ }
+
+ public void testPlatformFilter_NegativeMatch() throws CoreException {
+ mockDiscoveryStrategy.setConnectorMockFactory(new CatalogItemMockFactory() {
+ @Override
+ protected void populateMockData() {
+ super.populateMockData();
+ platformFilter("(& (osgi.os=macosx) (osgi.ws=carbon))");
+ }
+ });
+ // test to ensure that all non-matching platform filters are not discovered
+ Dictionary<Object, Object> environment = new Properties();
+ environment.put("osgi.os", "win32");
+ environment.put("osgi.ws", "windows");
+ connectorDiscovery.setEnvironment(environment);
+ connectorDiscovery.performDiscovery(new NullProgressMonitor());
+
+ assertTrue(connectorDiscovery.getItems().isEmpty());
+ }
+
+ public void testPlatformFilter_PositiveMatch() throws CoreException {
+ mockDiscoveryStrategy.setConnectorMockFactory(new CatalogItemMockFactory() {
+ @Override
+ protected void populateMockData() {
+ super.populateMockData();
+ platformFilter("(& (osgi.os=macosx) (osgi.ws=carbon))");
+ }
+ });
+ Dictionary<Object, Object> environment = new Properties();
+
+ // test to ensure that all matching platform filters are discovered
+ environment.put("osgi.os", "macosx");
+ environment.put("osgi.ws", "carbon");
+ connectorDiscovery.setEnvironment(environment);
+ connectorDiscovery.performDiscovery(new NullProgressMonitor());
+
+ assertFalse(connectorDiscovery.getItems().isEmpty());
+ assertEquals(mockDiscoveryStrategy.getConnectorCount(), connectorDiscovery.getItems().size());
+ }
+
+ public void testFeatureFilter_PositiveMatch() throws CoreException {
+ mockDiscoveryStrategy.setConnectorMockFactory(new CatalogItemMockFactory() {
+ @Override
+ protected void populateMockData() {
+ super.populateMockData();
+ featureFilter("com.foo.bar.feature", "[1.0,2.0)");
+ }
+ });
+ Map<String, Version> featureToVersion = new HashMap<String, Version>();
+ featureToVersion.put("com.foo.bar.feature", new Version("1.1"));
+ connectorDiscovery.setFeatureToVersion(featureToVersion);
+ connectorDiscovery.performDiscovery(new NullProgressMonitor());
+
+ assertFalse(connectorDiscovery.getItems().isEmpty());
+ assertEquals(mockDiscoveryStrategy.getConnectorCount(), connectorDiscovery.getItems().size());
+ }
+
+ public void testFeatureFilter_NegativeMatch_VersionMismatch() throws CoreException {
+ mockDiscoveryStrategy.setConnectorMockFactory(new CatalogItemMockFactory() {
+ @Override
+ protected void populateMockData() {
+ super.populateMockData();
+ featureFilter("com.foo.bar.feature", "[1.2,2.0)");
+ }
+ });
+ Map<String, Version> featureToVersion = new HashMap<String, Version>();
+ featureToVersion.put("com.foo.bar.feature", new Version("1.1"));
+ connectorDiscovery.setFeatureToVersion(featureToVersion);
+ connectorDiscovery.performDiscovery(new NullProgressMonitor());
+
+ assertTrue(connectorDiscovery.getItems().isEmpty());
+ }
+
+ public void testFeatureFilter_NegativeMatch_NotPresent() throws CoreException {
+ mockDiscoveryStrategy.setConnectorMockFactory(new CatalogItemMockFactory() {
+ @Override
+ protected void populateMockData() {
+ super.populateMockData();
+ featureFilter("com.foo.bar.feature", "[1.2,2.0)");
+ }
+ });
+ Map<String, Version> featureToVersion = new HashMap<String, Version>();
+ connectorDiscovery.setFeatureToVersion(featureToVersion);
+ connectorDiscovery.performDiscovery(new NullProgressMonitor());
+
+ assertTrue(connectorDiscovery.getItems().isEmpty());
+ }
+
+ public void testCategorization() throws CoreException {
+ connectorDiscovery.performDiscovery(new NullProgressMonitor());
+ assertTrue(!connectorDiscovery.getItems().isEmpty());
+ assertTrue(!connectorDiscovery.getCategories().isEmpty());
+
+ for (CatalogItem connector : connectorDiscovery.getItems()) {
+ assertNotNull(connector.getCategory());
+ assertEquals(connector.getCategoryId(), connector.getCategory().getId());
+ assertTrue(connector.getCategory().getItems().contains(connector));
+ }
+ }
+
+ public void testMultipleStrategies() throws CoreException {
+ MockDiscoveryStrategy strategy = new MockDiscoveryStrategy();
+ strategy.setConnectorMockFactory(mockDiscoveryStrategy.getConnectorMockFactory());
+ strategy.setCategoryMockFactory(mockDiscoveryStrategy.getCategoryMockFactory());
+ connectorDiscovery.getDiscoveryStrategies().add(strategy);
+
+ connectorDiscovery.performDiscovery(new NullProgressMonitor());
+
+ assertEquals(mockDiscoveryStrategy.getConnectorMockFactory().getCreatedCount(),
+ connectorDiscovery.getItems().size());
+ assertEquals(mockDiscoveryStrategy.getCategoryMockFactory().getCreatedCount(),
+ connectorDiscovery.getCategories().size());
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/DirectoryParserTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/DirectoryParserTest.java
new file mode 100644
index 000000000..2172df478
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/DirectoryParserTest.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.p2.discovery.tests.core;
+
+import java.io.IOException;
+import java.io.StringReader;
+
+import junit.framework.TestCase;
+
+import org.eclipse.equinox.internal.p2.discovery.compatibility.Directory;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.DirectoryParser;
+
+/**
+ * @author David Green
+ */
+public class DirectoryParserTest extends TestCase {
+
+ private DirectoryParser parser;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ parser = new DirectoryParser();
+ }
+
+ public void testParse() throws IOException {
+ Directory directory = parser.parse(new StringReader(
+ "<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\"/></directory>"));
+ assertNotNull(directory);
+ assertEquals(1, directory.getEntries().size());
+ assertEquals("http://foo.bar.nodomain/baz.jar", directory.getEntries().get(0).getLocation());
+ }
+
+ public void testParseBadFormat() throws IOException {
+ try {
+ parser.parse(new StringReader(
+ "<directory2 xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\"/></directory2>"));
+ fail("Expected exception");
+ } catch (IOException e) {
+ // expected
+ }
+ }
+
+ public void testParseMalformed() throws IOException {
+ try {
+ parser.parse(new StringReader(
+ "<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\">"));
+ fail("Expected exception");
+ } catch (IOException e) {
+ // expected
+ }
+ }
+
+ public void testParseUnexpectedElementsAndAttributes() throws IOException {
+ Directory directory = parser.parse(new StringReader(
+ "<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\" id=\"asdf\"><baz/></entry><foo/></directory>"));
+ assertNotNull(directory);
+ assertEquals(1, directory.getEntries().size());
+ assertEquals("http://foo.bar.nodomain/baz.jar", directory.getEntries().get(0).getLocation());
+ }
+
+ public void testParseNoNS() throws IOException {
+ Directory directory = parser.parse(new StringReader(
+ "<directory><entry url=\"http://foo.bar.nodomain/baz.jar\"/></directory>"));
+ assertNotNull(directory);
+ assertEquals(1, directory.getEntries().size());
+ assertEquals("http://foo.bar.nodomain/baz.jar", directory.getEntries().get(0).getLocation());
+ }
+
+ public void testParsePermitCategoriesTrue() throws IOException {
+ Directory directory = parser.parse(new StringReader(
+ "<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\" permitCategories=\"true\"/></directory>"));
+ assertNotNull(directory);
+ assertEquals(1, directory.getEntries().size());
+ assertEquals(true, directory.getEntries().get(0).isPermitCategories());
+ }
+
+ public void testParsePermitCategoriesFalse() throws IOException {
+ Directory directory = parser.parse(new StringReader(
+ "<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\" permitCategories=\"false\"/></directory>"));
+ assertNotNull(directory);
+ assertEquals(1, directory.getEntries().size());
+ assertEquals(false, directory.getEntries().get(0).isPermitCategories());
+ }
+
+ public void testParsePermitCategoriesNotSpecified() throws IOException {
+ Directory directory = parser.parse(new StringReader(
+ "<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\"/></directory>"));
+ assertNotNull(directory);
+ assertEquals(1, directory.getEntries().size());
+ assertEquals(false, directory.getEntries().get(0).isPermitCategories());
+ }
+
+ public void testParsePermitCategoriesSpecifiedBadly() throws IOException {
+ Directory directory = parser.parse(new StringReader(
+ "<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\" permitCategories=\"\"/></directory>"));
+ assertNotNull(directory);
+ assertEquals(1, directory.getEntries().size());
+ assertEquals(false, directory.getEntries().get(0).isPermitCategories());
+ }
+
+ public void testParsePermitCategoriesSpecifiedBadly2() throws IOException {
+ Directory directory = parser.parse(new StringReader(
+ "<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\" permitCategories=\"asdf\"/></directory>"));
+ assertNotNull(directory);
+ assertEquals(1, directory.getEntries().size());
+ assertEquals(false, directory.getEntries().get(0).isPermitCategories());
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/RemoteBundleDiscoveryStrategyTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/RemoteBundleDiscoveryStrategyTest.java
new file mode 100644
index 000000000..80a4f478f
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/RemoteBundleDiscoveryStrategyTest.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.discovery.tests.core;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.equinox.internal.p2.discovery.model.Certification;
+import org.eclipse.equinox.p2.discovery.tests.DiscoveryTestConstants;
+
+/**
+ * @author David Green
+ */
+public class RemoteBundleDiscoveryStrategyTest extends TestCase {
+
+ private RemoteBundleDiscoveryStrategy discoveryStrategy;
+
+ @Override
+ protected void setUp() throws Exception {
+ discoveryStrategy = new RemoteBundleDiscoveryStrategy();
+ discoveryStrategy.setDirectoryUrl(DiscoveryTestConstants.DISCOVERY_URL);
+ discoveryStrategy.setCategories(new ArrayList<CatalogCategory>());
+ discoveryStrategy.setItems(new ArrayList<CatalogItem>());
+ discoveryStrategy.setCertifications(new ArrayList<Certification>());
+ }
+
+ public void testPerformDiscovery() throws CoreException, IOException {
+ discoveryStrategy.performDiscovery(new NullProgressMonitor());
+ assertFalse(discoveryStrategy.getCategories().isEmpty());
+ for (CatalogCategory category : discoveryStrategy.getCategories()) {
+// System.out.println(String.format("%s: %s: %s", category.getId(), category.getName(),
+// category.getDescription()));
+ assertNotNull(category.getId());
+ assertNotNull(category.getName());
+ assertNotNull(category.getDescription());
+ }
+ assertFalse(discoveryStrategy.getItems().isEmpty());
+ for (CatalogItem connector : discoveryStrategy.getItems()) {
+// System.out.println(String.format("%s: %s: %s", connector.getId(), connector.getName(),
+// connector.getDescription()));
+ assertNotNull(connector.getId());
+ assertNotNull(connector.getTags());
+ assertNotNull(connector.getName());
+ assertNotNull(connector.getDescription());
+
+ // we _know_ that the bundle must have a plugin.xml... so verify that the source is working correctly
+ assertNotNull(connector.getSource());
+ URL pluginXmlUrl = connector.getSource().getResource("plugin.xml");
+// System.out.println("URL: " + pluginXmlUrl);
+ InputStream in = pluginXmlUrl.openStream();
+ assertNotNull(in);
+ in.close();
+ }
+
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/AbstractMockFactory.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/AbstractMockFactory.java
new file mode 100644
index 000000000..dc398199f
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/AbstractMockFactory.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.discovery.tests.core.mock;
+
+/**
+ *
+ * @author David Green
+ */
+public abstract class AbstractMockFactory<MockType> {
+
+ protected int seed = 0;
+
+ private MockType mockObject;
+
+ protected MockCatalogSource source = new MockCatalogSource();
+
+ public final MockType get() {
+ MockType object = getMockObject();
+ mockObject = null;
+ return object;
+ }
+
+ public final MockType getMockObject() {
+ if (mockObject == null) {
+ ++seed;
+ mockObject = createMockObject();
+ populateMockData();
+ }
+ return mockObject;
+ }
+
+ protected abstract void populateMockData();
+
+ protected abstract MockType createMockObject();
+
+ /**
+ * get the number of objects created by this factory
+ */
+ public int getCreatedCount() {
+ return seed;
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogCategoryMockFactory.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogCategoryMockFactory.java
new file mode 100644
index 000000000..2f4e60ac1
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogCategoryMockFactory.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.discovery.tests.core.mock;
+
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
+import org.eclipse.equinox.internal.p2.discovery.model.Icon;
+
+/**
+ * @author David Green
+ */
+public class CatalogCategoryMockFactory extends AbstractMockFactory<CatalogCategory> {
+
+ CatalogCategory category;
+
+ @Override
+ protected CatalogCategory createMockObject() {
+ return new CatalogCategory();
+ }
+
+ @Override
+ protected void populateMockData() {
+ // mock up some data
+
+ getMockObject().setSource(source);
+
+ name("Category " + seed).id(CatalogCategoryMockFactory.class.getPackage().getName() + ".connector" + seed)
+ .description("A category of things, " + seed);
+
+ Icon icon = new Icon();
+ icon.setImage128("images/ico128.png");
+ icon.setImage16("images/ico16.png");
+ icon.setImage32("images/ico32.png");
+ icon.setImage64("images/ico64.png");
+
+ getMockObject().setIcon(icon);
+ }
+
+ public CatalogCategoryMockFactory description(String description) {
+ getMockObject().setDescription(description);
+ return this;
+ }
+
+ public CatalogCategoryMockFactory icon(Icon icon) {
+ getMockObject().setIcon(icon);
+ return this;
+ }
+
+ public CatalogCategoryMockFactory id(String id) {
+ getMockObject().setId(id);
+ return this;
+ }
+
+ public CatalogCategoryMockFactory name(String name) {
+ getMockObject().setName(name);
+ return this;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogItemMockFactory.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogItemMockFactory.java
new file mode 100644
index 000000000..0fd641fc7
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogItemMockFactory.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.discovery.tests.core.mock;
+
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.equinox.internal.p2.discovery.model.FeatureFilter;
+import org.eclipse.equinox.internal.p2.discovery.model.Icon;
+import org.eclipse.equinox.internal.p2.discovery.model.Overview;
+import org.eclipse.equinox.internal.p2.discovery.model.Tag;
+
+/**
+ * @author David Green
+ */
+public class CatalogItemMockFactory extends AbstractMockFactory<CatalogItem> {
+
+ public CatalogItemMockFactory() {
+ }
+
+ @Override
+ protected void populateMockData() {
+
+ // mock up some data
+
+ getMockObject().setSource(source);
+
+ name("Connector " + seed).id(CatalogItemMockFactory.class.getPackage().getName() + ".connector" + seed)
+ .siteUrl("http://example.nodomain/some/path/updateSite3.x/")
+ .tag(new Tag("", ""))
+ .license(seed % 2 == 0 ? "EPL 1.0" : "APL 2.0")
+ .description("a connector for the Example Task System versions 1.0 - 5.3")
+ .categoryId("example")
+ .provider("Testing 123 Inc.");
+
+ Icon icon = new Icon();
+ icon.setImage128("images/ico128.png");
+ icon.setImage16("images/ico16.png");
+ icon.setImage32("images/ico32.png");
+ icon.setImage64("images/ico64.png");
+
+ Overview overview = new Overview();
+ overview.setScreenshot("images/screenshot-main.png");
+ overview.setSummary("some long text that summarizes the connector");
+ overview.setUrl("http://example.nodomain/some/path/updateSite3.x/overview.html");
+
+ icon(icon).overview(overview);
+ overview.setItem(getMockObject());
+ }
+
+ @Override
+ protected CatalogItem createMockObject() {
+ return new CatalogItem();
+ }
+
+ public CatalogItemMockFactory categoryId(String categoryId) {
+ getMockObject().setCategoryId(categoryId);
+ return this;
+ }
+
+ public CatalogItemMockFactory description(String description) {
+ getMockObject().setDescription(description);
+ return this;
+ }
+
+ public CatalogItemMockFactory icon(Icon icon) {
+ getMockObject().setIcon(icon);
+ return this;
+ }
+
+ public CatalogItemMockFactory id(String id) {
+ getMockObject().setId(id);
+ return this;
+ }
+
+ public CatalogItemMockFactory tag(Tag tag) {
+ getMockObject().addTag(tag);
+ return this;
+ }
+
+ public CatalogItemMockFactory license(String license) {
+ getMockObject().setLicense(license);
+ return this;
+ }
+
+ public CatalogItemMockFactory name(String name) {
+ getMockObject().setName(name);
+ return this;
+ }
+
+ public CatalogItemMockFactory overview(Overview overview) {
+ getMockObject().setOverview(overview);
+ return this;
+ }
+
+ public CatalogItemMockFactory platformFilter(String platformFilter) {
+ getMockObject().setPlatformFilter(platformFilter);
+ return this;
+ }
+
+ public CatalogItemMockFactory provider(String provider) {
+ getMockObject().setProvider(provider);
+ return this;
+ }
+
+ public CatalogItemMockFactory siteUrl(String siteUrl) {
+ getMockObject().setSiteUrl(siteUrl);
+ return this;
+ }
+
+ public CatalogItemMockFactory featureFilter(String featureId, String versionRange) {
+ FeatureFilter featureFilter = new FeatureFilter();
+ featureFilter.setItem(getMockObject());
+ featureFilter.setFeatureId(featureId);
+ featureFilter.setVersion(versionRange);
+ getMockObject().getFeatureFilter().add(featureFilter);
+ return this;
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockBundleDiscoveryStrategy.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockBundleDiscoveryStrategy.java
new file mode 100644
index 000000000..ac6069da1
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockBundleDiscoveryStrategy.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.p2.discovery.tests.core.mock;
+
+import org.eclipse.core.runtime.IContributor;
+import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
+import org.eclipse.equinox.internal.p2.discovery.Policy;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.BundleDiscoveryStrategy;
+
+/**
+ * a discovery strategy for bundles where the policy can be arbitrarily set
+ *
+ * @author David Green
+ */
+public class MockBundleDiscoveryStrategy extends BundleDiscoveryStrategy {
+ private Policy policy = Policy.defaultPolicy();
+
+ @Override
+ protected AbstractCatalogSource computeDiscoverySource(IContributor contributor) {
+ AbstractCatalogSource discoverySource = super.computeDiscoverySource(contributor);
+ discoverySource.setPolicy(policy);
+ return discoverySource;
+ }
+
+ public Policy getPolicy() {
+ return policy;
+ }
+
+ public void setPolicy(Policy policy) {
+ this.policy = policy;
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockCatalogSource.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockCatalogSource.java
new file mode 100644
index 000000000..ad140a808
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockCatalogSource.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.discovery.tests.core.mock;
+
+import java.net.URL;
+
+import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
+
+/**
+ * @author David Green
+ */
+public class MockCatalogSource extends AbstractCatalogSource {
+
+ @Override
+ public Object getId() {
+ return "mock:mock";
+ }
+
+ @Override
+ public URL getResource(String resourceName) {
+ return null;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockDiscoveryStrategy.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockDiscoveryStrategy.java
new file mode 100644
index 000000000..137b43668
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockDiscoveryStrategy.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.discovery.tests.core.mock;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.internal.p2.discovery.AbstractDiscoveryStrategy;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+
+/**
+ * @author David Green
+ */
+public class MockDiscoveryStrategy extends AbstractDiscoveryStrategy {
+
+ private int connectorCount = 15;
+
+ private int categoryCount = 5;
+
+ protected CatalogItemMockFactory connectorMockFactory = new CatalogItemMockFactory();
+
+ protected CatalogCategoryMockFactory categoryMockFactory = new CatalogCategoryMockFactory();
+
+ @Override
+ public void performDiscovery(IProgressMonitor monitor) throws CoreException {
+ for (int x = 0; x < categoryCount; ++x) {
+ CatalogCategory mockCategory = createDiscoveryCategory();
+ getCategories().add(mockCategory);
+ }
+ for (int x = 0; x < connectorCount; ++x) {
+ CatalogItem mockConnector = createDiscoveryConnector();
+ // put the connector in a category
+ if (!getCategories().isEmpty()) {
+ int categoryIndex = x % getCategories().size();
+ mockConnector.setCategoryId(getCategories().get(categoryIndex).getId());
+ }
+ getItems().add(mockConnector);
+ }
+ }
+
+ protected CatalogCategory createDiscoveryCategory() {
+ return categoryMockFactory.get();
+ }
+
+ protected CatalogItem createDiscoveryConnector() {
+ return connectorMockFactory.get();
+ }
+
+ public CatalogCategoryMockFactory getCategoryMockFactory() {
+ return categoryMockFactory;
+ }
+
+ public void setCategoryMockFactory(CatalogCategoryMockFactory categoryMockFactory) {
+ this.categoryMockFactory = categoryMockFactory;
+ }
+
+ public CatalogItemMockFactory getConnectorMockFactory() {
+ return connectorMockFactory;
+ }
+
+ public void setConnectorMockFactory(CatalogItemMockFactory connectorMockFactory) {
+ this.connectorMockFactory = connectorMockFactory;
+ }
+
+ public int getConnectorCount() {
+ return connectorCount;
+ }
+
+ public void setConnectorCount(int connectorCount) {
+ this.connectorCount = connectorCount;
+ }
+
+ public int getCategoryCount() {
+ return categoryCount;
+ }
+
+ public void setCategoryCount(int categoryCount) {
+ this.categoryCount = categoryCount;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogCategoryComparatorTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogCategoryComparatorTest.java
new file mode 100644
index 000000000..40f9cbf98
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogCategoryComparatorTest.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.p2.discovery.tests.core.util;
+
+import junit.framework.TestCase;
+
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
+import org.eclipse.equinox.internal.p2.discovery.util.CatalogCategoryComparator;
+
+public class CatalogCategoryComparatorTest extends TestCase {
+
+ private CatalogCategoryComparator comparator;
+
+ private CatalogCategory category1;
+
+ private CatalogCategory category2;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ comparator = new CatalogCategoryComparator();
+ category1 = new CatalogCategory();
+ category2 = new CatalogCategory();
+ }
+
+ public void testSortByRelevanceInequal() {
+ category1.setRelevance("100");
+ category2.setRelevance("50");
+ assertEquals(-1, comparator.compare(category1, category2));
+ assertEquals(1, comparator.compare(category2, category1));
+ }
+
+ public void testSortByRelevanceOneNotSpecified() {
+ category1.setRelevance("10");
+ assertEquals(-1, comparator.compare(category1, category2));
+ assertEquals(1, comparator.compare(category2, category1));
+ }
+
+ public void testSortByRelevanceSame() {
+ category1.setRelevance("10");
+ category1.setName("test");
+ category1.setId("1");
+ category2.setRelevance("10");
+ category2.setName("test");
+ category2.setId("1");
+ assertEquals(0, comparator.compare(category1, category2));
+ assertEquals(0, comparator.compare(category2, category1));
+ }
+
+ public void testSortByRelevanceSameIdsDiffer() {
+ category1.setRelevance("10");
+ category1.setName("test");
+ category1.setId("a");
+ category2.setRelevance("10");
+ category2.setName("test");
+ category2.setId("b");
+ assertEquals(-1, comparator.compare(category1, category2));
+ assertEquals(1, comparator.compare(category2, category1));
+ }
+
+ public void testSortByRelevanceSameNamesDiffer() {
+ category1.setRelevance("10");
+ category1.setName("a");
+ category1.setId("a");
+ category2.setRelevance("10");
+ category2.setName("b");
+ category2.setId("a");
+ assertEquals(-1, comparator.compare(category1, category2));
+ assertEquals(1, comparator.compare(category2, category1));
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogConnectorComparatorTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogConnectorComparatorTest.java
new file mode 100644
index 000000000..57e82c464
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogConnectorComparatorTest.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.p2.discovery.tests.core.util;
+
+import junit.framework.TestCase;
+
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.equinox.internal.p2.discovery.model.Group;
+import org.eclipse.equinox.internal.p2.discovery.util.CatalogItemComparator;
+
+public class CatalogConnectorComparatorTest extends TestCase {
+
+ private CatalogCategory category;
+
+ private CatalogItemComparator comparator;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ category = new CatalogCategory();
+ comparator = new CatalogItemComparator();
+ }
+
+ private Group addGroup(String id) {
+ Group group = new Group();
+ group.setId(id);
+ category.getGroup().add(group);
+ return group;
+ }
+
+ private CatalogItem addConnectorDescriptor(String id, String name, String groupId) {
+ CatalogItem connector = new CatalogItem();
+ connector.setId(id);
+ connector.setName(name);
+ connector.setGroupId(groupId);
+ connector.setCategory(category);
+ category.getItems().add(connector);
+ return connector;
+ }
+
+ public void testOrderByGroup() {
+ addGroup("1");
+ addGroup("2");
+ CatalogItem t1 = addConnectorDescriptor("b", "btest", "2");
+ CatalogItem t2 = addConnectorDescriptor("a", "atest", "2");
+ CatalogItem t3 = addConnectorDescriptor("c", "ctest", "1");
+ CatalogItem t4 = addConnectorDescriptor("d", "dtest", "1");
+ CatalogItem t5 = addConnectorDescriptor("0", "0test", null);
+
+ assertEquals(-1, comparator.compare(t2, t1));
+ assertEquals(1, comparator.compare(t1, t2));
+ assertEquals(-1, comparator.compare(t3, t4));
+ assertEquals(1, comparator.compare(t4, t3));
+
+ assertEquals(-1, comparator.compare(t1, t5));
+ assertEquals(1, comparator.compare(t5, t1));
+ assertEquals(-1, comparator.compare(t2, t5));
+ assertEquals(1, comparator.compare(t5, t2));
+ assertEquals(-1, comparator.compare(t3, t5));
+ assertEquals(1, comparator.compare(t5, t3));
+ assertEquals(-1, comparator.compare(t4, t5));
+ assertEquals(1, comparator.compare(t5, t4));
+
+ assertEquals(-1, comparator.compare(t3, t1));
+ assertEquals(1, comparator.compare(t1, t3));
+ assertEquals(-1, comparator.compare(t3, t2));
+ assertEquals(1, comparator.compare(t2, t3));
+
+ assertEquals(-1, comparator.compare(t4, t1));
+ assertEquals(1, comparator.compare(t1, t4));
+ assertEquals(-1, comparator.compare(t4, t2));
+ assertEquals(1, comparator.compare(t2, t4));
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/.project b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/.project
new file mode 100644
index 000000000..8d093325e
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.mylyn.discovery.test1-feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/build.properties b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/build.properties
new file mode 100644
index 000000000..64f93a9f0
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/build.properties
@@ -0,0 +1 @@
+bin.includes = feature.xml
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/feature.xml b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/feature.xml
new file mode 100644
index 000000000..e5b89e0a5
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/feature.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.mylyn.discovery.test1"
+ label="Discovery Test Feature 1"
+ version="1.0.0.qualifier"
+ provider-name="Eclipse Mylyn">
+
+ <description url="http://www.example.com/description">
+ [Enter Feature Description here.]
+ </description>
+
+ <copyright url="http://www.example.com/copyright">
+ [Enter Copyright Description here.]
+ </copyright>
+
+ <license url="http://www.example.com/license">
+ [Enter License Description here.]
+ </license>
+
+</feature>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/.project b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/.project
new file mode 100644
index 000000000..647d36dee
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.mylyn.discovery.test2-feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/build.properties b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/build.properties
new file mode 100644
index 000000000..64f93a9f0
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/build.properties
@@ -0,0 +1 @@
+bin.includes = feature.xml
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/feature.xml b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/feature.xml
new file mode 100644
index 000000000..f2f089a23
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/feature.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.mylyn.discovery.test2"
+ label="Discovery Test Feature 2"
+ version="1.0.0.qualifier"
+ provider-name="Eclipse Mylyn">
+
+ <description url="http://www.example.com/description">
+ [Enter Feature Description here.]
+ </description>
+
+ <copyright url="http://www.example.com/copyright">
+ [Enter Copyright Description here.]
+ </copyright>
+
+ <license url="http://www.example.com/license">
+ [Enter License Description here.]
+ </license>
+
+ <includes
+ id="org.eclipse.mylyn.discovery.test1"
+ version="0.0.0"/>
+
+</feature>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/artifacts.jar b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/artifacts.jar
new file mode 100644
index 000000000..7a37f6f91
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/artifacts.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/content.jar b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/content.jar
new file mode 100644
index 000000000..78e190ba1
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/content.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test1_1.0.0.201001200403.jar b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test1_1.0.0.201001200403.jar
new file mode 100644
index 000000000..4ede52590
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test1_1.0.0.201001200403.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test2_1.0.0.201001200403.jar b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test2_1.0.0.201001200403.jar
new file mode 100644
index 000000000..52b43d8ab
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test2_1.0.0.201001200403.jar
Binary files differ

Back to the top