diff options
author | Quentin Le Menez | 2018-03-11 16:28:18 +0000 |
---|---|---|
committer | Quentin Le Menez | 2018-03-11 22:39:35 +0000 |
commit | 6a85d3a05d3bd942dba8e71edf82e97dce813b91 (patch) | |
tree | c58695b63c497d3af16b69f1634d3eb2de0deb49 /tests/junit/framework | |
parent | ba98ab1ef4202d0489df0ae2dd2aee8fe6f378d4 (diff) | |
download | org.eclipse.papyrus-6a85d3a05d3bd942dba8e71edf82e97dce813b91.tar.gz org.eclipse.papyrus-6a85d3a05d3bd942dba8e71edf82e97dce813b91.tar.xz org.eclipse.papyrus-6a85d3a05d3bd942dba8e71edf82e97dce813b91.zip |
[Releng] [Photon] Delete old Dev framework and add a new Toolsmiths one
- Delete the old Dev releng profile and replace it with a Toolsmith one
- Add new features: Junit, Releng, Diagramgen and Debug to be released
- Move the junit framework at the root of the junit test folder
- Remove Toolsmiths from the main build as it will have its own
- Repopulate the SDK feature and distribute the excess features in theit own root parent
- Add a new views feature
- Moved the assistants to the toolsmiths folder and put them in the toolsmiths build
Change-Id: I1c0331b25607baaf1cfcc635d9c7b0d9c6d73e63
Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
Diffstat (limited to 'tests/junit/framework')
42 files changed, 3723 insertions, 3 deletions
diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.classpath b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.classpath new file mode 100644 index 00000000000..7c3a2a77507 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.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/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"> + <accessrules> + <accessrule kind="accessible" pattern="org/eclipse/pde/api/tools/internal/provisional/**"/> + </accessrules> + </classpathentry> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.gitignore b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.gitignore new file mode 100644 index 00000000000..b7c02c4cfac --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.gitignore @@ -0,0 +1 @@ +/apireports/ diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.project b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.project new file mode 100644 index 00000000000..71d475068f6 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.project @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.bundles.tests</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.oomph.version.VersionBuilder</name> + <arguments> + <dictionary> + <key>check.maven.pom</key> + <value>true</value> + </dictionary> + <dictionary> + <key>ignore.lower.bound.dependency.ranges</key> + <value>true</value> + </dictionary> + <dictionary> + <key>release.path</key> + <value>/org.eclipse.papyrus.releng.dev.release/release.xml</value> + </dictionary> + </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.oomph.version.VersionNature</nature> + <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature> + </natures> +</projectDescription> diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.settings/org.eclipse.core.resources.prefs b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000000..896a9a53a53 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/<project>=UTF-8
\ No newline at end of file diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.settings/org.eclipse.core.runtime.prefs b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 00000000000..5a0ad22d2a7 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..b3aa6d60f94 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,291 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=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.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=260 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +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=260 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="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\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.settings/org.eclipse.pde.api.tools.prefs b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 00000000000..23fb95e120f --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,98 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_ANNOTATION=Ignore +INVALID_JAVADOC_TAG=Ignore +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +MISSING_EE_DESCRIPTIONS=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=Enabled +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Warning +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/META-INF/MANIFEST.MF b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..6eb39e52f5e --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/META-INF/MANIFEST.MF @@ -0,0 +1,26 @@ +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui;bundle-version="[3.107.0,4.0.0)", + org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)", + org.eclipse.pde.runtime;bundle-version="[3.5.0,4.0.0)", + org.eclipse.ui.ide;bundle-version="[3.12.0,4.0.0)", + org.eclipse.pde;bundle-version="[3.12.0,4.0.0)", + org.eclipse.pde.core;bundle-version="[3.11.0,4.0.0)", + org.eclipse.update.configurator;bundle-version="[3.3.0,4.0.0)", + org.junit;bundle-version="[4.12.0,5.0.0)", + org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)";visibility:=reexport, + org.eclipse.papyrus.junit.utils;bundle-version="[2.0.0,3.0.0)", + org.eclipse.core.resources;bundle-version="[3.11.0,4.0.0)", + org.eclipse.pde.api.tools;bundle-version="[1.0.1,2.0.0)", + org.eclipse.jdt.core;bundle-version="[3.11.0,4.0.0)", + org.eclipse.ui.ide;bundle-version="[3.11.0,4.0.0)" +Export-Package: org.eclipse.papyrus.bundles.tests +Bundle-Vendor: %Bundle-Vendor +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.3.0.qualifier +Bundle-Name: %Bundle-Name +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.bundles.tests.Activator +Bundle-Description: %pluginDescription +Bundle-SymbolicName: org.eclipse.papyrus.bundles.tests;singleton:=true +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Import-Package: org.apache.commons.lang3.text.translate;version="3.1.0" diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/OSGI-INF/l10n/bundle.properties b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/OSGI-INF/l10n/bundle.properties new file mode 100644 index 00000000000..ab1126caaed --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,4 @@ +#Properties file for org.eclipse.papyrus.bundles.tests +Bundle-Vendor = Eclipse Modeling Project +Bundle-Name = Papyrus Bundles Tests +pluginDescription = This plugin provides some Tests on the Bundle
\ No newline at end of file diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/about.html b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/about.html new file mode 100644 index 00000000000..d35d5aed64c --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/about.html @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>June 5, 2007</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). 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, "Program" 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 ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + +</body> +</html> diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/build.properties b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/build.properties new file mode 100644 index 00000000000..966a41640e7 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/build.properties @@ -0,0 +1,9 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + OSGI-INF/,\ + about.html,\ + build.properties,\ + resources/ +src.includes = about.html diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/org.eclipse.papyrus.bundles.tests.launch b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/org.eclipse.papyrus.bundles.tests.launch new file mode 100644 index 00000000000..bc3145a817b --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/org.eclipse.papyrus.bundles.tests.launch @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig"> +<booleanAttribute key="append.args" value="true"/> +<booleanAttribute key="askclear" value="false"/> +<booleanAttribute key="automaticAdd" value="true"/> +<booleanAttribute key="automaticValidate" value="false"/> +<stringAttribute key="bootstrap" value=""/> +<stringAttribute key="checked" value="[NONE]"/> +<booleanAttribute key="clearConfig" value="true"/> +<booleanAttribute key="clearws" value="true"/> +<booleanAttribute key="clearwslog" value="false"/> +<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/> +<booleanAttribute key="default" value="true"/> +<booleanAttribute key="includeOptional" value="true"/> +<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/AllTests.java"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="1"/> +</listAttribute> +<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> +<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> +<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> +<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> +<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.bundles.tests.AllTests"/> +<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.bundles.tests"/> +<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/> +<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms60m -Xmx1024m -DsuppressRawWhenUnchecked=true "/> +<stringAttribute key="pde.version" value="3.3"/> +<stringAttribute key="product" value="org.eclipse.platform.ide"/> +<booleanAttribute key="run_in_ui_thread" value="true"/> +<stringAttribute key="selected_target_plugins" value="ch.qos.logback.classic@default:default,ch.qos.logback.core@default:default,ch.qos.logback.slf4j@default:false,com.collabnet.subversion.merge@default:default,com.ess.regexutil@default:default,com.google.guava@default:default,com.google.inject@default:default,com.ibm.icu@default:default,com.jcraft.jsch@default:default,com.sun.el@default:default,com.sun.jna@default:default,com.sun.syndication@default:default,javax.activation@default:default,javax.annotation@default:default,javax.el@default:default,javax.inject@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.xml.bind@default:default,javax.xml.stream@default:default,javax.xml@default:default,lpg.runtime.java@default:default,net.sf.eclipsecs.branding@default:default,net.sf.eclipsecs.checkstyle@default:default,net.sf.eclipsecs.core@default:default,net.sf.eclipsecs.doc@default:default,net.sf.eclipsecs.ui@default:default,net.sf.jautodoc.velocity@default:default,net.sf.jautodoc@default:default,net.sourceforge.nattable.core@default:default,net.sourceforge.pmd.eclipse.plugin@default:default,org.antlr.runtime@default:default,org.apache.ant@default:default,org.apache.batik.bridge@default:default,org.apache.batik.css@default:default,org.apache.batik.dom.svg@default:default,org.apache.batik.dom@default:default,org.apache.batik.ext.awt@default:default,org.apache.batik.parser@default:default,org.apache.batik.pdf@default:default,org.apache.batik.svggen@default:default,org.apache.batik.transcoder@default:default,org.apache.batik.util.gui@default:default,org.apache.batik.util@default:default,org.apache.batik.xml@default:default,org.apache.commons.cli@default:default,org.apache.commons.codec@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.lang@default:default,org.apache.commons.logging*1.0.4.v201101211617@default:default,org.apache.commons.logging*1.1.1.v201101211721@default:default,org.apache.derby@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.apache.jasper.glassfish@default:default,org.apache.log4j@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.apache.lucene@default:default,org.apache.ws.commons.util@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.apache.xmlrpc@default:default,org.eclipse.acceleo.common@default:default,org.eclipse.acceleo.engine@default:default,org.eclipse.acceleo.model@default:default,org.eclipse.acceleo.profiler@default:default,org.eclipse.amalgam.discovery.core@default:default,org.eclipse.amalgam.discovery.modeling@default:default,org.eclipse.amalgam.discovery.ui@default:default,org.eclipse.ant.core@default:default,org.eclipse.ant.launching@default:default,org.eclipse.ant.ui@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare.win32@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.externaltools@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.cvs@default:default,org.eclipse.debug.core@default:default,org.eclipse.debug.ui@default:default,org.eclipse.draw2d.doc.isv@default:default,org.eclipse.draw2d@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.egit.core@default:default,org.eclipse.egit.doc@default:default,org.eclipse.egit.ui@default:default,org.eclipse.egit@default:default,org.eclipse.emf.ant@default:default,org.eclipse.emf.cdo.common.db@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.location@default:default,org.eclipse.emf.cdo.migrator@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.server.db@default:default,org.eclipse.emf.cdo.server.net4j@default:default,org.eclipse.emf.cdo.server.ocl@default:default,org.eclipse.emf.cdo.server.product@default:default,org.eclipse.emf.cdo.server@default:default,org.eclipse.emf.cdo.team@default:default,org.eclipse.emf.cdo.ui.ide@default:default,org.eclipse.emf.cdo.ui.location@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.emf.cheatsheets@default:default,org.eclipse.emf.codegen.ecore.ui@default:default,org.eclipse.emf.codegen.ecore@default:default,org.eclipse.emf.codegen.ui@default:default,org.eclipse.emf.codegen@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.compare.diagram.ecoretools@default:default,org.eclipse.emf.compare.diagram@default:default,org.eclipse.emf.compare.diff.edit@default:default,org.eclipse.emf.compare.diff@default:default,org.eclipse.emf.compare.doc@default:default,org.eclipse.emf.compare.epatch@default:default,org.eclipse.emf.compare.match@default:default,org.eclipse.emf.compare.mpatch.apply.generic@default:default,org.eclipse.emf.compare.mpatch.apply@default:default,org.eclipse.emf.compare.mpatch.binding@default:default,org.eclipse.emf.compare.mpatch.common@default:default,org.eclipse.emf.compare.mpatch.doc@default:default,org.eclipse.emf.compare.mpatch.edit@default:default,org.eclipse.emf.compare.mpatch.editor@default:default,org.eclipse.emf.compare.mpatch.emfdiff2mpatch.edit@default:default,org.eclipse.emf.compare.mpatch.emfdiff2mpatch.generic@default:default,org.eclipse.emf.compare.mpatch.emfdiff2mpatch@default:default,org.eclipse.emf.compare.mpatch.example@default:default,org.eclipse.emf.compare.mpatch.transform@default:default,org.eclipse.emf.compare.mpatch@default:default,org.eclipse.emf.compare.ui.capabilities@default:default,org.eclipse.emf.compare.ui@default:default,org.eclipse.emf.compare@default:default,org.eclipse.emf.converter@default:default,org.eclipse.emf.databinding.edit@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.emf.doc@default:default,org.eclipse.emf.ecore.change.edit@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.editor@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.ecoretools.diagram.ui.outline@default:default,org.eclipse.emf.ecoretools.diagram@default:default,org.eclipse.emf.ecoretools.doc@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.emf.eef.codegen.ecore@default:default,org.eclipse.emf.eef.codegen.launcher@default:default,org.eclipse.emf.example.installer@default:default,org.eclipse.emf.examples.library.edit@default:default,org.eclipse.emf.examples.library@default:default,org.eclipse.emf.exporter@default:default,org.eclipse.emf.facet.aggregate.doc@default:default,org.eclipse.emf.facet.aggregate.metamodel.notgenerated@default:default,org.eclipse.emf.facet.aggregate.metamodel@default:default,org.eclipse.emf.facet.capabilities@default:default,org.eclipse.emf.facet.common.core@default:default,org.eclipse.emf.facet.common.sdk.core@default:default,org.eclipse.emf.facet.common.sdk.ui@default:default,org.eclipse.emf.facet.common.ui@default:default,org.eclipse.emf.facet.custom.core@default:default,org.eclipse.emf.facet.custom.doc@default:default,org.eclipse.emf.facet.custom.metamodel.edit@default:default,org.eclipse.emf.facet.custom.metamodel@default:default,org.eclipse.emf.facet.custom.sdk.core@default:default,org.eclipse.emf.facet.custom.ui@default:default,org.eclipse.emf.facet.doc@default:default,org.eclipse.emf.facet.ecore@default:default,org.eclipse.emf.facet.efacet.catalog@default:default,org.eclipse.emf.facet.efacet.core@default:default,org.eclipse.emf.facet.efacet.doc@default:default,org.eclipse.emf.facet.efacet.edit@default:default,org.eclipse.emf.facet.efacet.editor@default:default,org.eclipse.emf.facet.efacet.metamodel.edit@default:default,org.eclipse.emf.facet.efacet.metamodel@default:default,org.eclipse.emf.facet.efacet.ui@default:default,org.eclipse.emf.facet.efacet@default:default,org.eclipse.emf.facet.infra.browser.custom.core@default:default,org.eclipse.emf.facet.infra.browser.custom.edit@default:default,org.eclipse.emf.facet.infra.browser.custom.editor@default:default,org.eclipse.emf.facet.infra.browser.custom.examples.uml@default:default,org.eclipse.emf.facet.infra.browser.custom.ui@default:default,org.eclipse.emf.facet.infra.browser.custom@default:default,org.eclipse.emf.facet.infra.browser.doc@default:default,org.eclipse.emf.facet.infra.browser.uicore.examples.cnf@default:default,org.eclipse.emf.facet.infra.browser.uicore@default:default,org.eclipse.emf.facet.infra.browser@default:default,org.eclipse.emf.facet.infra.common.core@default:default,org.eclipse.emf.facet.infra.common.ui@default:default,org.eclipse.emf.facet.infra.facet.core@default:default,org.eclipse.emf.facet.infra.facet.edit@default:default,org.eclipse.emf.facet.infra.facet.editor@default:default,org.eclipse.emf.facet.infra.facet.ui@default:default,org.eclipse.emf.facet.infra.facet@default:default,org.eclipse.emf.facet.infra.query.core@default:default,org.eclipse.emf.facet.infra.query.edit@default:default,org.eclipse.emf.facet.infra.query.editor@default:default,org.eclipse.emf.facet.infra.query.ui@default:default,org.eclipse.emf.facet.infra.query@default:default,org.eclipse.emf.facet.query.java.core@default:default,org.eclipse.emf.facet.query.java.metamodel@default:default,org.eclipse.emf.facet.query.java.ui@default:default,org.eclipse.emf.facet.query.java@default:default,org.eclipse.emf.facet.util.core@default:default,org.eclipse.emf.facet.util.emf.catalog@default:default,org.eclipse.emf.facet.util.emf.core@default:default,org.eclipse.emf.facet.util.emf.doc@default:default,org.eclipse.emf.facet.util.emf.ui@default:default,org.eclipse.emf.facet.util.ui@default:default,org.eclipse.emf.facet.widgets.celleditors.ecore.tests.samplemm@default:default,org.eclipse.emf.facet.widgets.celleditors.ecore@default:default,org.eclipse.emf.facet.widgets.celleditors.edit@default:default,org.eclipse.emf.facet.widgets.celleditors.editor@default:default,org.eclipse.emf.facet.widgets.celleditors@default:default,org.eclipse.emf.facet.widgets.nattable.doc@default:default,org.eclipse.emf.facet.widgets.nattable.examples.ecore@default:default,org.eclipse.emf.facet.widgets.nattable.instance.edit@default:default,org.eclipse.emf.facet.widgets.nattable.instance@default:default,org.eclipse.emf.facet.widgets.nattable.tableconfiguration.edit@default:default,org.eclipse.emf.facet.widgets.nattable.tableconfiguration.editor@default:default,org.eclipse.emf.facet.widgets.nattable.tableconfiguration@default:default,org.eclipse.emf.facet.widgets.nattable.workbench@default:default,org.eclipse.emf.facet.widgets.nattable@default:default,org.eclipse.emf.facet.widgets.table.doc@default:default,org.eclipse.emf.facet.widgets.table.metamodel.edit@default:default,org.eclipse.emf.facet.widgets.table.metamodel@default:default,org.eclipse.emf.facet.widgets.table.ui.nattable@default:default,org.eclipse.emf.facet.widgets.table.ui.workbench@default:default,org.eclipse.emf.facet.widgets.table.ui@default:default,org.eclipse.emf.facet.widgets@default:default,org.eclipse.emf.importer.ecore@default:default,org.eclipse.emf.importer.java@default:default,org.eclipse.emf.importer.rose@default:default,org.eclipse.emf.importer@default:default,org.eclipse.emf.mapping.ecore.editor@default:default,org.eclipse.emf.mapping.ecore2ecore.editor@default:default,org.eclipse.emf.mapping.ecore2ecore@default:default,org.eclipse.emf.mapping.ecore2xml.ui@default:default,org.eclipse.emf.mapping.ecore2xml@default:default,org.eclipse.emf.mapping.ecore@default:default,org.eclipse.emf.mapping.ui@default:default,org.eclipse.emf.mapping.xsd2ecore.editor@default:default,org.eclipse.emf.mapping.xsd2ecore@default:default,org.eclipse.emf.mapping@default:default,org.eclipse.emf.mwe.core@default:default,org.eclipse.emf.mwe.utils@default:default,org.eclipse.emf.mwe2.language@default:default,org.eclipse.emf.mwe2.launch@default:default,org.eclipse.emf.mwe2.lib@default:default,org.eclipse.emf.mwe2.runtime@default:default,org.eclipse.emf.query.doc@default:default,org.eclipse.emf.query.examples@default:default,org.eclipse.emf.query.ocl@default:default,org.eclipse.emf.query@default:default,org.eclipse.emf.transaction.doc@default:default,org.eclipse.emf.transaction.examples@default:default,org.eclipse.emf.transaction.ui@default:default,org.eclipse.emf.transaction@default:default,org.eclipse.emf.validation.doc@default:default,org.eclipse.emf.validation.examples@default:default,org.eclipse.emf.validation.ocl@default:default,org.eclipse.emf.validation.ui.ide@default:default,org.eclipse.emf.validation.ui@default:default,org.eclipse.emf.validation@default:default,org.eclipse.emf.workspace.doc@default:default,org.eclipse.emf.workspace.examples.library.editor@default:default,org.eclipse.emf.workspace.examples@default:default,org.eclipse.emf.workspace.ui@default:default,org.eclipse.emf.workspace@default:default,org.eclipse.emf@default:default,org.eclipse.epp.mpc.core@default:default,org.eclipse.epp.mpc.help.ui@default:default,org.eclipse.epp.mpc.ui@default:default,org.eclipse.epp.package.modeling@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.console@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.discovery.compatibility@default:default,org.eclipse.equinox.p2.discovery@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.publisher.eclipse@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.transport.ecf@default:default,org.eclipse.equinox.p2.ui.discovery@default:default,org.eclipse.equinox.p2.ui.importexport@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.gef.doc.isv@default:default,org.eclipse.gef.examples.ui.pde@default:default,org.eclipse.gef@default:default,org.eclipse.gmf.examples.runtime.ui.pde@default:default,org.eclipse.gmf.runtime.common.core@default:default,org.eclipse.gmf.runtime.common.ui.action.ide@default:default,org.eclipse.gmf.runtime.common.ui.action@default:default,org.eclipse.gmf.runtime.common.ui.printing.win32@default:false,org.eclipse.gmf.runtime.common.ui.printing@default:default,org.eclipse.gmf.runtime.common.ui.services.action@default:default,org.eclipse.gmf.runtime.common.ui.services.dnd.ide@default:default,org.eclipse.gmf.runtime.common.ui.services.dnd@default:default,org.eclipse.gmf.runtime.common.ui.services.properties@default:default,org.eclipse.gmf.runtime.common.ui.services@default:default,org.eclipse.gmf.runtime.common.ui@default:default,org.eclipse.gmf.runtime.diagram.core@default:default,org.eclipse.gmf.runtime.diagram.ui.actions@default:default,org.eclipse.gmf.runtime.diagram.ui.dnd@default:default,org.eclipse.gmf.runtime.diagram.ui.geoshapes@default:default,org.eclipse.gmf.runtime.diagram.ui.printing.render@default:default,org.eclipse.gmf.runtime.diagram.ui.printing@default:default,org.eclipse.gmf.runtime.diagram.ui.properties@default:default,org.eclipse.gmf.runtime.diagram.ui.providers.ide@default:default,org.eclipse.gmf.runtime.diagram.ui.providers@default:default,org.eclipse.gmf.runtime.diagram.ui.render@default:default,org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide@default:default,org.eclipse.gmf.runtime.diagram.ui.resources.editor@default:default,org.eclipse.gmf.runtime.diagram.ui@default:default,org.eclipse.gmf.runtime.draw2d.ui.render.awt@default:default,org.eclipse.gmf.runtime.draw2d.ui.render@default:default,org.eclipse.gmf.runtime.draw2d.ui@default:default,org.eclipse.gmf.runtime.emf.clipboard.core@default:default,org.eclipse.gmf.runtime.emf.commands.core@default:default,org.eclipse.gmf.runtime.emf.core@default:default,org.eclipse.gmf.runtime.emf.type.core@default:default,org.eclipse.gmf.runtime.emf.type.ui@default:default,org.eclipse.gmf.runtime.emf.ui.properties@default:default,org.eclipse.gmf.runtime.emf.ui@default:default,org.eclipse.gmf.runtime.gef.ui@default:default,org.eclipse.gmf.runtime.notation.edit@default:default,org.eclipse.gmf.runtime.notation.providers@default:default,org.eclipse.gmf.runtime.notation@default:default,org.eclipse.gmf.runtime.sdk@default:default,org.eclipse.gmf@default:default,org.eclipse.gmt.modisco.infra.common.core@default:default,org.eclipse.gmt.modisco.infra.common.ui@default:default,org.eclipse.gmt.modisco.infra.discoverymanager@default:default,org.eclipse.gmt.modisco.xml.discoverer@default:default,org.eclipse.gmt.modisco.xml@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.help@default:default,org.eclipse.jdt.annotation@default:default,org.eclipse.jdt.apt.core@default:default,org.eclipse.jdt.apt.pluggable.core@default:default,org.eclipse.jdt.apt.ui@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.jdt.core@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jdt.doc.isv@default:default,org.eclipse.jdt.doc.user@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.jdt.junit4.runtime@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.jdt@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.jmx@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.jgit@default:default,org.eclipse.jsch.core@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.m2m.qvt.oml.common@default:default,org.eclipse.m2m.qvt.oml.cst.parser@default:default,org.eclipse.m2m.qvt.oml.ecore.imperativeocl@default:default,org.eclipse.m2m.qvt.oml.emf.util@default:default,org.eclipse.m2m.qvt.oml@default:default,org.eclipse.modisco.infra.discovery.core@default:default,org.eclipse.modisco.infra.discovery.ui@default:default,org.eclipse.modisco.infra.discovery@default:default,org.eclipse.modisco.xml.discoverer@default:default,org.eclipse.mylyn.bugzilla.core@default:default,org.eclipse.mylyn.bugzilla.ide@default:default,org.eclipse.mylyn.bugzilla.ui@default:default,org.eclipse.mylyn.commons.core@default:default,org.eclipse.mylyn.commons.identity.core@default:default,org.eclipse.mylyn.commons.identity@default:default,org.eclipse.mylyn.commons.net@default:default,org.eclipse.mylyn.commons.notifications.core@default:default,org.eclipse.mylyn.commons.notifications.feed@default:default,org.eclipse.mylyn.commons.notifications.ui@default:default,org.eclipse.mylyn.commons.notifications@default:default,org.eclipse.mylyn.commons.repositories.core@default:default,org.eclipse.mylyn.commons.repositories.ui@default:default,org.eclipse.mylyn.commons.repositories@default:default,org.eclipse.mylyn.commons.screenshots@default:default,org.eclipse.mylyn.commons.team@default:default,org.eclipse.mylyn.commons.ui@default:default,org.eclipse.mylyn.commons.workbench@default:default,org.eclipse.mylyn.commons.xmlrpc@default:default,org.eclipse.mylyn.context.core@default:default,org.eclipse.mylyn.context.tasks.ui@default:default,org.eclipse.mylyn.context.ui@default:default,org.eclipse.mylyn.discovery.core@default:default,org.eclipse.mylyn.discovery.ui@default:default,org.eclipse.mylyn.help.ui@default:default,org.eclipse.mylyn.ide.ant@default:default,org.eclipse.mylyn.ide.ui@default:default,org.eclipse.mylyn.java.tasks@default:default,org.eclipse.mylyn.java.ui@default:default,org.eclipse.mylyn.monitor.core@default:default,org.eclipse.mylyn.monitor.ui@default:default,org.eclipse.mylyn.pde.ui@default:default,org.eclipse.mylyn.resources.ui@default:default,org.eclipse.mylyn.tasks.bugs@default:default,org.eclipse.mylyn.tasks.core@default:default,org.eclipse.mylyn.tasks.index.core@default:default,org.eclipse.mylyn.tasks.index.ui@default:default,org.eclipse.mylyn.tasks.search@default:default,org.eclipse.mylyn.tasks.ui@default:default,org.eclipse.mylyn.team.cvs@default:default,org.eclipse.mylyn.team.ui@default:default,org.eclipse.mylyn.wikitext.confluence.core@default:default,org.eclipse.mylyn.wikitext.confluence.ui@default:default,org.eclipse.mylyn.wikitext.core@default:default,org.eclipse.mylyn.wikitext.help.ui@default:default,org.eclipse.mylyn.wikitext.mediawiki.core@default:default,org.eclipse.mylyn.wikitext.mediawiki.ui@default:default,org.eclipse.mylyn.wikitext.tasks.ui@default:default,org.eclipse.mylyn.wikitext.textile.core@default:default,org.eclipse.mylyn.wikitext.textile.ui@default:default,org.eclipse.mylyn.wikitext.tracwiki.core@default:default,org.eclipse.mylyn.wikitext.tracwiki.ui@default:default,org.eclipse.mylyn.wikitext.twiki.core@default:default,org.eclipse.mylyn.wikitext.twiki.ui@default:default,org.eclipse.mylyn.wikitext.ui@default:default,org.eclipse.net4j.db.derby@default:default,org.eclipse.net4j.db.h2@default:default,org.eclipse.net4j.db@default:default,org.eclipse.net4j.http.common@default:default,org.eclipse.net4j.http.server@default:default,org.eclipse.net4j.http@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default,org.eclipse.ocl.common.ui@default:default,org.eclipse.ocl.common@default:default,org.eclipse.ocl.doc@default:default,org.eclipse.ocl.ecore.edit@default:default,org.eclipse.ocl.ecore@default:default,org.eclipse.ocl.edit@default:default,org.eclipse.ocl.examples.common@default:default,org.eclipse.ocl.examples.domain@default:default,org.eclipse.ocl.examples.library@default:default,org.eclipse.ocl.examples.pivot@default:default,org.eclipse.ocl.examples.xtext.base@default:default,org.eclipse.ocl.examples.xtext.essentialocl.ui@default:default,org.eclipse.ocl.examples.xtext.essentialocl@default:default,org.eclipse.ocl.ui@default:default,org.eclipse.ocl.uml.edit@default:default,org.eclipse.ocl.uml.ui@default:default,org.eclipse.ocl.uml@default:default,org.eclipse.ocl@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.papyrus.documentation.plugin.edit@default:default,org.eclipse.papyrus.documentation.plugin.editor@default:default,org.eclipse.papyrus.documentation.plugin@default:default,org.eclipse.papyrus.editor@default:default,org.eclipse.papyrus.extensionpoints.editors@default:default,org.eclipse.papyrus.infra.constraints.edit@default:default,org.eclipse.papyrus.infra.constraints.editor@default:default,org.eclipse.papyrus.infra.constraints@default:default,org.eclipse.papyrus.infra.core.log@default:default,org.eclipse.papyrus.infra.core.sasheditor.di@default:default,org.eclipse.papyrus.infra.core.sasheditor@default:default,org.eclipse.papyrus.infra.core@default:default,org.eclipse.papyrus.infra.emf.appearance@default:default,org.eclipse.papyrus.infra.emf.diagram.common@default:default,org.eclipse.papyrus.infra.emf.readonly@default:default,org.eclipse.papyrus.infra.emf@default:default,org.eclipse.papyrus.infra.export@default:default,org.eclipse.papyrus.infra.gmfdiag.commands@default:default,org.eclipse.papyrus.infra.gmfdiag.common@default:default,org.eclipse.papyrus.infra.gmfdiag.css.model@default:default,org.eclipse.papyrus.infra.gmfdiag.modelexplorer@default:default,org.eclipse.papyrus.infra.gmfdiag.navigation@default:default,org.eclipse.papyrus.infra.gmfdiag.outline@default:default,org.eclipse.papyrus.infra.gmfdiag.preferences@default:default,org.eclipse.papyrus.infra.gmfdiag.properties@default:default,org.eclipse.papyrus.infra.gmfdiag.widgets@default:default,org.eclipse.papyrus.infra.hyperlink@default:default,org.eclipse.papyrus.infra.onefile@default:default,org.eclipse.papyrus.infra.queries.core.configuration.edit@default:default,org.eclipse.papyrus.infra.queries.core.configuration@default:default,org.eclipse.papyrus.infra.queries.core@default:default,org.eclipse.papyrus.infra.services.controlmode.history@default:default,org.eclipse.papyrus.infra.services.controlmode@default:default,org.eclipse.papyrus.infra.services.decoration@default:default,org.eclipse.papyrus.infra.services.edit@default:default,org.eclipse.papyrus.infra.services.markerlistener@default:default,org.eclipse.papyrus.infra.services.resourceloading.preferences@default:default,org.eclipse.papyrus.infra.services.resourceloading@default:default,org.eclipse.papyrus.infra.services.validation@default:default,org.eclipse.papyrus.infra.table.common@default:default,org.eclipse.papyrus.infra.table.instance@default:default,org.eclipse.papyrus.infra.table.menu@default:default,org.eclipse.papyrus.infra.table.modelexplorer@default:default,org.eclipse.papyrus.infra.table.properties@default:default,org.eclipse.papyrus.infra.tools@default:default,org.eclipse.papyrus.infra.ui.resources@default:default,org.eclipse.papyrus.infra.widgets.toolbox@default:default,org.eclipse.papyrus.infra.widgets@default:default,org.eclipse.papyrus.sysml.diagram.blockdefinition@default:default,org.eclipse.papyrus.sysml.diagram.common@default:default,org.eclipse.papyrus.sysml.diagram.internalblock@default:default,org.eclipse.papyrus.sysml.diagram.requirement@default:default,org.eclipse.papyrus.sysml.diagram.ui@default:default,org.eclipse.papyrus.sysml.edit@default:default,org.eclipse.papyrus.sysml.facets@default:default,org.eclipse.papyrus.sysml.modelexplorer@default:default,org.eclipse.papyrus.sysml.properties@default:default,org.eclipse.papyrus.sysml.service.types@default:default,org.eclipse.papyrus.sysml.table.allocation@default:default,org.eclipse.papyrus.sysml.table.requirement@default:default,org.eclipse.papyrus.sysml@default:default,org.eclipse.papyrus.uml.alf.ui@default:default,org.eclipse.papyrus.uml.alf@default:default,org.eclipse.papyrus.uml.appearance@default:default,org.eclipse.papyrus.uml.commands@default:default,org.eclipse.papyrus.uml.controlmode.profile@default:default,org.eclipse.papyrus.uml.diagram.activity@default:default,org.eclipse.papyrus.uml.diagram.clazz@default:default,org.eclipse.papyrus.uml.diagram.common.groups@default:default,org.eclipse.papyrus.uml.diagram.common.palette.customaction@default:default,org.eclipse.papyrus.uml.diagram.common@default:default,org.eclipse.papyrus.uml.diagram.communication@default:default,org.eclipse.papyrus.uml.diagram.component@default:default,org.eclipse.papyrus.uml.diagram.composite@default:default,org.eclipse.papyrus.uml.diagram.deployment@default:default,org.eclipse.papyrus.uml.diagram.emftree@default:default,org.eclipse.papyrus.uml.diagram.icons@default:default,org.eclipse.papyrus.uml.diagram.menu@default:default,org.eclipse.papyrus.uml.diagram.modelexplorer@default:default,org.eclipse.papyrus.uml.diagram.navigation@default:default,org.eclipse.papyrus.uml.diagram.package@default:default,org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit@default:default,org.eclipse.papyrus.uml.diagram.paletteconfiguration@default:default,org.eclipse.papyrus.uml.diagram.profile@default:default,org.eclipse.papyrus.uml.diagram.sequence@default:default,org.eclipse.papyrus.uml.diagram.statemachine@default:default,org.eclipse.papyrus.uml.diagram.usecase@default:default,org.eclipse.papyrus.uml.diagram.wizards@default:default,org.eclipse.papyrus.uml.documentation.profile@default:default,org.eclipse.papyrus.uml.extensionpoints@default:default,org.eclipse.papyrus.uml.icons@default:default,org.eclipse.papyrus.uml.import@default:default,org.eclipse.papyrus.uml.modelexplorer.widgets@default:default,org.eclipse.papyrus.uml.modelexplorer@default:default,org.eclipse.papyrus.uml.pastemanager@default:default,org.eclipse.papyrus.uml.perspective@default:default,org.eclipse.papyrus.uml.profile@default:default,org.eclipse.papyrus.uml.properties@default:default,org.eclipse.papyrus.uml.resourceloading.profile@default:default,org.eclipse.papyrus.uml.service.types@default:default,org.eclipse.papyrus.uml.table.default@default:default,org.eclipse.papyrus.uml.table.widgets.celleditors@default:default,org.eclipse.papyrus.uml.templaterepository@default:default,org.eclipse.papyrus.uml.textedit.collaborationuse.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.collaborationuse.xtext@default:default,org.eclipse.papyrus.uml.textedit.common.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.common.xtext@default:default,org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext@default:default,org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext@default:default,org.eclipse.papyrus.uml.textedit.message.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.message.xtext@default:default,org.eclipse.papyrus.uml.textedit.parameter.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.parameter.xtext@default:default,org.eclipse.papyrus.uml.textedit.property.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.property.xtext@default:default,org.eclipse.papyrus.uml.textedit.state.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.state.xtext@default:default,org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext@default:default,org.eclipse.papyrus.uml.textedit.transition.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.transition.xtext@default:default,org.eclipse.papyrus.uml.tools.utils@default:default,org.eclipse.papyrus.uml.tools@default:default,org.eclipse.papyrus.views.modelexplorer.resourceloading@default:default,org.eclipse.papyrus.views.modelexplorer.widgets@default:default,org.eclipse.papyrus.infra.properties.edit@default:default,org.eclipse.papyrus.infra.properties.editor@default:default,org.eclipse.papyrus.infra.properties@default:default,org.eclipse.papyrus.views.properties@default:default,org.eclipse.papyrus.xwt@default:default,org.eclipse.pde.api.tools.ui@default:default,org.eclipse.pde.api.tools@default:default,org.eclipse.pde.build@default:default,org.eclipse.pde.core@default:default,org.eclipse.pde.doc.user@default:default,org.eclipse.pde.ds.core@default:default,org.eclipse.pde.ds.ui@default:default,org.eclipse.pde.junit.runtime@default:default,org.eclipse.pde.launching@default:default,org.eclipse.pde.runtime@default:default,org.eclipse.pde.ua.core@default:default,org.eclipse.pde.ua.ui@default:default,org.eclipse.pde.ui.templates@default:default,org.eclipse.pde.ui@default:default,org.eclipse.pde@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.platform@default:default,org.eclipse.rcp@default:default,org.eclipse.sdk@default:default,org.eclipse.search@default:default,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.cvs.core@default:default,org.eclipse.team.cvs.ssh2@default:default,org.eclipse.team.cvs.ui@default:default,org.eclipse.team.svn.core@default:default,org.eclipse.team.svn.ui@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.browser@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.externaltools@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.trace@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.uml2.codegen.ecore.ui@default:default,org.eclipse.uml2.codegen.ecore@default:default,org.eclipse.uml2.common.edit@default:default,org.eclipse.uml2.common@default:default,org.eclipse.uml2.doc@default:default,org.eclipse.uml2.examples.uml.ui@default:default,org.eclipse.uml2.examples@default:default,org.eclipse.uml2.types@default:default,org.eclipse.uml2.uml.ecore.exporter@default:default,org.eclipse.uml2.uml.ecore.importer@default:default,org.eclipse.uml2.uml.edit@default:default,org.eclipse.uml2.uml.editor@default:default,org.eclipse.uml2.uml.profile.l2@default:default,org.eclipse.uml2.uml.profile.l3@default:default,org.eclipse.uml2.uml.resources@default:default,org.eclipse.uml2.uml@default:default,org.eclipse.uml2@default:default,org.eclipse.update.configurator@3:true,org.eclipse.wst.common.core@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.xpand@default:default,org.eclipse.xsd.cheatsheets@default:default,org.eclipse.xsd.doc@default:default,org.eclipse.xsd.ecore.converter@default:default,org.eclipse.xsd.ecore.exporter@default:default,org.eclipse.xsd.ecore.importer@default:default,org.eclipse.xsd.edit@default:default,org.eclipse.xsd.editor@default:default,org.eclipse.xsd.example.installer@default:default,org.eclipse.xsd.mapping.editor@default:default,org.eclipse.xsd.mapping@default:default,org.eclipse.xsd@default:default,org.eclipse.xtend.lib@default:default,org.eclipse.xtend.typesystem.emf@default:default,org.eclipse.xtend@default:default,org.eclipse.xtext.builder@default:default,org.eclipse.xtext.common.types.edit@default:default,org.eclipse.xtext.common.types.ui@default:default,org.eclipse.xtext.common.types@default:default,org.eclipse.xtext.ecore@default:default,org.eclipse.xtext.generator@default:default,org.eclipse.xtext.gmf.glue@default:default,org.eclipse.xtext.smap@default:default,org.eclipse.xtext.ui.shared@default:default,org.eclipse.xtext.ui@default:default,org.eclipse.xtext.util@default:default,org.eclipse.xtext.xbase.lib@default:default,org.eclipse.xtext.xbase@default:default,org.eclipse.xtext@default:default,org.h2@default:default,org.hamcrest.core@default:default,org.jdom@default:default,org.jsoup@default:default,org.junit*3.8.2.v3_8_2_v20100427-1100@default:default,org.junit*4.8.2.v4_8_2_v20110321-1705@default:default,org.junit4@default:default,org.mortbay.jetty.util@default:default,org.objectweb.asm@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.slf4j.api@default:default,org.tmatesoft.svnkit@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil*1.0.0.v200806040011@default:default,org.w3c.dom.smil*1.0.1.v200903091627@default:default,org.w3c.dom.svg@default:default"/> +<stringAttribute key="selected_workspace_plugins" value="org.eclipse.papyrus.bundles.tests@default:default,org.eclipse.papyrus.infra.emf.compare.common@default:default,org.eclipse.papyrus.infra.emf.compare.instance@default:default,org.eclipse.papyrus.infra.emf.compare.ui@default:default,org.eclipse.papyrus.infra.gmfdiag.css.configuration@default:default,org.eclipse.papyrus.infra.gmfdiag.css.properties@default:default,org.eclipse.papyrus.infra.gmfdiag.css.theme@default:default,org.eclipse.papyrus.infra.gmfdiag.css.xtext@default:default,org.eclipse.papyrus.infra.gmfdiag.css@default:default,org.eclipse.papyrus.junit.utils@default:default,org.eclipse.papyrus.uml.compare.file.tests@default:default,org.eclipse.papyrus.uml.compare.file@default:default,org.eclipse.papyrus.uml.compare.merger@default:default,org.eclipse.papyrus.uml.compare.tests@default:default,org.eclipse.papyrus.uml.compare@default:default,org.eclipse.papyrus.views.modelexplorer.tests@default:default,org.eclipse.papyrus.views.modelexplorer@default:default"/> +<booleanAttribute key="show_selected_only" value="false"/> +<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/> +<booleanAttribute key="tracing" value="false"/> +<booleanAttribute key="useCustomFeatures" value="false"/> +<booleanAttribute key="useDefaultConfig" value="true"/> +<booleanAttribute key="useDefaultConfigArea" value="false"/> +<booleanAttribute key="useProduct" value="true"/> +</launchConfiguration> diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/plugin.properties b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/plugin.properties new file mode 100644 index 00000000000..0b6ef86997c --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/plugin.properties @@ -0,0 +1,12 @@ +################################################################################# +# Copyright (c) 2015 CEA LIST. +# 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: +# Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - initial API and implementation +##################################################################################) + +pluginDescription=This plugin allows to tests some informations on the installed plugins : - providername - version number - Incubation ...
\ No newline at end of file diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/pom.xml b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/pom.xml new file mode 100644 index 00000000000..a07bc3e2947 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/pom.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.eclipse.papyrus.tests</groupId> + <artifactId>org.eclipse.papyrus.tests.junit-framework</artifactId> + <version>0.0.1-SNAPSHOT</version> + </parent> + <groupId>org.eclipse.papyrus.tests</groupId> + <artifactId>org.eclipse.papyrus.bundles.tests</artifactId> + <version>1.3.0-SNAPSHOT</version> + <packaging>eclipse-test-plugin</packaging> + + <build> + <plugins> + <plugin> + <!-- By default, don't do tests --> + <groupId>org.eclipse.tycho</groupId> + <artifactId>tycho-surefire-plugin</artifactId> + <version>${tycho-version}</version> + <configuration> + <skipTests>true</skipTests> + </configuration> + </plugin> + </plugins> + </build> + + <profiles> + <!-- Profile for API Evolution Report generation. --> + <profile> + <id>api-report-gen</id> + <activation> + <property> + <name>apireport.baseline</name> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.eclipse.tycho</groupId> + <artifactId>tycho-surefire-plugin</artifactId> + <version>${tycho-version}</version> + <configuration> + <failIfNoTests>false</failIfNoTests> + <useUIHarness>false</useUIHarness> + <testFailureIgnore>true</testFailureIgnore> + <argLine>-Dapireport.baseline=${apireport.baseline} -Dapireport.outputdir=${apireport.outputdir} -Xms512m -Xmx2048m</argLine> + <appArgLine>-testConfig=CI_TESTS_CONFIG</appArgLine> + <product>org.eclipse.sdk.ide</product> + <skipTests>false</skipTests> + <testClass>org.eclipse.papyrus.bundles.tests.APIReports</testClass> + </configuration> + </plugin> + <plugin> + <groupId>org.eclipse.tycho</groupId> + <artifactId>target-platform-configuration</artifactId> + <version>${tycho-version}</version> + <configuration> + <dependency-resolution> + <extraRequirements> + <requirement> + <type>p2-installable-unit</type> + <id>org.eclipse.sdk.feature.group</id> + <versionRange>0.0.0</versionRange> + </requirement> + <requirement> + <type>eclipse-feature</type> + <id>org.eclipse.papyrus.sdk.feature</id> + <versionRange>0.0.0</versionRange> + </requirement> + </extraRequirements> + </dependency-resolution> + </configuration> + </plugin> + </plugins> + </build> + </profile> + </profiles> +</project> diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/api.css b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/api.css new file mode 100644 index 00000000000..474cdb6bad0 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/api.css @@ -0,0 +1,34 @@ +body, h1, h2, h3, h4, h5, h6, p, table, td, caption, th, ul, ol, dl, li, dd, dt { + font-family: Arial, Helvetica, sans-serif; + color: #000000; +} + +a:link { + text-decoration: none; + border: none; + color: #000000; +} + +a:visited { + color: #000000; +} + +a:hover { + text-decoration: underline; +} + +.category { + font-size: 16px; + font-weight: bold; + margin-top: 20px; + margin-bottom: 10px; +} + +.component, .type, .change { + margin-top: 2px; + margin-bottom: 2px; +} + +.apiname { + font-family: Courier, Courier New, monospace; +}
\ No newline at end of file diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/addition.gif b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/addition.gif Binary files differnew file mode 100644 index 00000000000..5d9e47ce206 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/addition.gif diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/annotation.gif b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/annotation.gif Binary files differnew file mode 100644 index 00000000000..4006917b5a2 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/annotation.gif diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/change.gif b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/change.gif Binary files differnew file mode 100644 index 00000000000..553311ff9fe --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/change.gif diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/class.gif b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/class.gif Binary files differnew file mode 100644 index 00000000000..9430b0fcee4 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/class.gif diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/empty.gif b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/empty.gif Binary files differnew file mode 100644 index 00000000000..571f9583ac6 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/empty.gif diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/enum.gif b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/enum.gif Binary files differnew file mode 100644 index 00000000000..ae416a5a394 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/enum.gif diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/interface.gif b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/interface.gif Binary files differnew file mode 100644 index 00000000000..3096f8a14e3 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/interface.gif diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/minus.gif b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/minus.gif Binary files differnew file mode 100644 index 00000000000..f7ac8ede9ed --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/minus.gif diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/plugin.gif b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/plugin.gif Binary files differnew file mode 100644 index 00000000000..ce7243c0164 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/plugin.gif diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/plus.gif b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/plus.gif Binary files differnew file mode 100644 index 00000000000..36790eac46d --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/plus.gif diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/removal.gif b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/removal.gif Binary files differnew file mode 100644 index 00000000000..afb251a83e9 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/removal.gif diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/report.gif b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/report.gif Binary files differnew file mode 100644 index 00000000000..911e362e73a --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/resources/apireports/html/images/report.gif diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/APIReports.java b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/APIReports.java new file mode 100644 index 00000000000..74b1a85d223 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/APIReports.java @@ -0,0 +1,95 @@ +/***************************************************************************** + * Copyright (c) 2016 Christian W. Damus 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: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.bundles.tests; + +import static org.hamcrest.CoreMatchers.not; +import static org.junit.Assume.assumeThat; + +import java.io.File; +import java.util.Calendar; + +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; +import org.eclipse.papyrus.bundles.tests.apireport.API2HTML; +import org.eclipse.papyrus.bundles.tests.apireport.APIReportGenerator; +import org.eclipse.papyrus.bundles.tests.apireport.ReportFixture; +import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest; +import org.eclipse.papyrus.junit.utils.PrintingProgressMonitor; +import org.junit.Test; + +/** + * Pseudo-test cases that generate API reports. + * + * @since 1.2 + */ +public class APIReports extends AbstractPapyrusTest { + + /** + * System property name for the location of the API Baseline for calculation of + * the API delta report. The value must be an absolute path in the local filesystem. + * If this property is not specified, the {@link #apiDeltaReport()} pseudo-test is skipped. + */ + public static final String APIREPORT_BASELINE_PROPERTY = "apireport.baseline"; //$NON-NLS-1$ + + /** + * System property name for the location of the API delta report to generate. + * The value must be an absolute path in the local filesystem. If this property + * is not specified, the report will be generated in the current working directory. + */ + public static final String APIREPORT_OUTPUT_DIR_PROPERTY = "apireport.outputdir"; //$NON-NLS-1$ + + /** + * System property name for a boolean indicating whether to log verbose progress + * of the API report generation to stdout. + */ + public static final String APIREPORT_VERBOSE = "apireport.verbose"; //$NON-NLS-1$ + + /** + * Constructor. + * + */ + public APIReports() { + super(); + } + + /** + * Run the API change analysis report, if the baseline is provided by the + * {@linkplain #APIREPORT_BASELINE_PROPERTY system property}. + */ + @Test + public void apiDeltaReport() throws Exception { + String baseline = System.getProperty(APIREPORT_BASELINE_PROPERTY, ""); + assumeThat("No API baseline specified via -D" + APIREPORT_BASELINE_PROPERTY, baseline, not("")); + + File baselineLocation = new File(baseline); + IPath outputDir = new Path(System.getProperty(APIREPORT_OUTPUT_DIR_PROPERTY, System.getProperty("user.dir"))); + + // Generate the report XML + ReportFixture fixture = new ReportFixture(outputDir); + + PrintingProgressMonitor progress = new PrintingProgressMonitor(); + if (!Boolean.getBoolean(APIREPORT_VERBOSE)) { + progress = progress.filter("^\\s+add"); + } + new APIReportGenerator(baselineLocation, fixture.getXMLReportFile()).generate(progress); + + // And the HTML from that + Calendar today = Calendar.getInstance(); + String qualifier = String.format("v%04d%02d%02d-%02d%02d%02d", + today.get(Calendar.YEAR), today.get(Calendar.MONTH) + 1, today.get(Calendar.DATE), + today.get(Calendar.HOUR_OF_DAY), today.get(Calendar.MINUTE), today.get(Calendar.SECOND)); + new API2HTML(fixture.getXMLReportFile(), qualifier).generate(fixture.getHTMLReportFile()); + } + +} diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/Activator.java b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/Activator.java new file mode 100644 index 00000000000..52750eaac8a --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/Activator.java @@ -0,0 +1,56 @@ +package org.eclipse.papyrus.bundles.tests; + +import org.eclipse.pde.core.target.ITargetPlatformService; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.papyrus.bundles.tests"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + private ITargetPlatformService tpService; + + /** + * The constructor + */ + public Activator() { + super(); + } + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + + ServiceReference<? extends ITargetPlatformService> ref = context.getServiceReference(ITargetPlatformService.class); + tpService = (ref == null) ? null : context.getService(ref); + } + + @Override + public void stop(BundleContext context) throws Exception { + tpService = null; + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + public ITargetPlatformService getTargetPlatformService() { + return tpService; + } +} diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/AllTests.java b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/AllTests.java new file mode 100644 index 00000000000..ae422b7e0be --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/AllTests.java @@ -0,0 +1,26 @@ +/***************************************************************************** + * Copyright (c) 2012, 2016 CEA LIST , Christian W. Damus, 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: + * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation + * Christian W. Damus - bug 485220 + * + *****************************************************************************/ +package org.eclipse.papyrus.bundles.tests; + +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.eclipse.papyrus.junit.framework.runner.Headless; +import org.junit.runner.RunWith; +import org.junit.runners.Suite.SuiteClasses; + +@Headless +@RunWith(ClassificationSuite.class) +@SuiteClasses({ BundlesTests.class }) +public class AllTests { + // JUnit 4 test suite +} diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundleTestsUtils.java b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundleTestsUtils.java new file mode 100644 index 00000000000..c19856eac7e --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundleTestsUtils.java @@ -0,0 +1,119 @@ +/***************************************************************************** + * Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, 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: + * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation + * Christian W. Damus - bug 485220 + * + *****************************************************************************/ +package org.eclipse.papyrus.bundles.tests; + +import java.net.URL; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.eclipse.core.internal.runtime.InternalPlatform; +import org.eclipse.pde.internal.core.PDECore; +import org.eclipse.pde.internal.core.feature.Feature; +import org.eclipse.pde.internal.core.ifeature.IFeature; +import org.eclipse.pde.internal.core.ifeature.IFeatureModel; +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; + +/** + * @noreference This class is not intended to be referenced by clients. + */ +public class BundleTestsUtils { + + public static final String INCUBATION = "(Incubation)"; //$NON-NLS-1$ + + public static final String VENDOR_NAME = "Eclipse Modeling Project"; //$NON-NLS-1$ + + public static final String BUNDLE_NAME = "Bundle-Name"; //$NON-NLS-1$ + + public static final String BUNDLE_VENDOR = "Bundle-Vendor"; //$NON-NLS-1$ + + public static final String BUNDLE_VERSION = "Bundle-Version"; //$NON-NLS-1$ + + public static final String PAPYRUS_PREFIX = "org.eclipse.papyrus."; //$NON-NLS-1$ + + public static final String BUNDLE_REQUIREDEXECUTIONENVIRONMENT = "Bundle-RequiredExecutionEnvironment"; //$NON-NLS-1$ + + public static final String BUNDLE_IMPORT_PACKAGE = "Import-Package"; //$NON-NLS-1$ + + public static final String JAVA_VERSION_5 = "J2SE-1.5"; //$NON-NLS-1$ + + public static final String JAVA_VERSION_6 = "JavaSE-1.6"; //$NON-NLS-1$ + + public static final String JAVA_VERSION_7 = "JavaSE-1.7"; //$NON-NLS-1$ + + public static final String JAVA_VERSION_8 = "JavaSE-1.8"; //$NON-NLS-1$ + + public static final String JAVA_VERSION_REGEX = Stream.of(JAVA_VERSION_5, JAVA_VERSION_6, JAVA_VERSION_7, JAVA_VERSION_8) + .map(Pattern::quote) + .collect(Collectors.joining("|")); //$NON-NLS-1$ + + public static final String REQUIRE_BUNDLE = "Require-Bundle"; //$NON-NLS-1$ + + private BundleTestsUtils() { + // to prevent instanciation + } + + /** + * + * @return the Bundle with a name beginning by {@link #PAPYRUS_PREFIX} + */ + public static List<Bundle> getPapyrusBundles() { + final List<Bundle> papyrusBundle = new ArrayList<Bundle>(); + BundleContext context = InternalPlatform.getDefault().getBundleContext(); + org.osgi.framework.Bundle[] bundles = context.getBundles(); + for (int i = 0; i < bundles.length; i++) { + String currentName = bundles[i].getSymbolicName(); + if (currentName.startsWith(PAPYRUS_PREFIX)) { + papyrusBundle.add(bundles[i]); + } + } + + return papyrusBundle; + } + + /** + * + * @param bundle + * a bundle + * @return + * <code>true</code> if the bundle represents a Java Project + */ + public static boolean isJavaProject(final Bundle bundle) { + // we are looking for folders "org/eclipse/papyrus" that contains classes. If not, it is not a Java project + URL res = bundle.getResource("org/eclipse/papyrus"); //$NON-NLS-1$ + return res != null; + } + + /** + * + * @return + * the list of the Papyrus features + */ + public static List<Feature> getPapyrusFeature() { + final List<Feature> features = new ArrayList<Feature>(); + org.eclipse.pde.internal.core.FeatureModelManager manager = PDECore.getDefault().getFeatureModelManager(); + IFeatureModel[] models2 = manager.getModels(); + for (IFeatureModel iFeatureModel : models2) { + final IFeature feature = iFeatureModel.getFeature(); + final String id = feature.getId(); + if (id.startsWith(PAPYRUS_PREFIX)) { + features.add((Feature) feature); + } + } + return features; + } +} diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java new file mode 100755 index 00000000000..9ac4563248c --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/BundlesTests.java @@ -0,0 +1,554 @@ +/***************************************************************************** + * Copyright (c) 2012, 2017 CEA LIST, Christian W. Damus, 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: + * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation + * Christian W. Damus - Skip the feature-version test when running in development mode + * Christian W. Damus - bugs 433206, 485220 + * Thanh Liem PHAN (ALL4TEC) thanhliem.phan@all4tec.net - Bug 513963 + *****************************************************************************/ +package org.eclipse.papyrus.bundles.tests; + +import java.lang.reflect.Field; +import java.net.URL; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.eclipse.osgi.util.NLS; +import org.eclipse.papyrus.internal.bundles.tests.PapyrusBundleDescription; +import org.eclipse.papyrus.internal.bundles.tests.PapyrusBundleDescriptionRegistry; +import org.eclipse.papyrus.junit.framework.classification.InvalidTest; +import org.eclipse.papyrus.junit.framework.classification.NotImplemented; +import org.eclipse.papyrus.junit.framework.classification.rules.Condition; +import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest; +import org.eclipse.papyrus.junit.utils.JUnitUtils; +import org.hamcrest.BaseMatcher; +import org.hamcrest.Description; +import org.junit.Assert; +import org.junit.Test; +import org.osgi.framework.Bundle; + +/** + * Suppress restriction for org.eclipse.pde.internal.core.feature.Feature. + * + * @author Vincent Lorenzo + * + * @noreference This class is not intended to be referenced by clients. + */ +public class BundlesTests extends AbstractPapyrusTest { + + // Indicates that the bundle name must contain the (Incubation) string + // private static final String REGEX_INCUBATION = ".*\\(Incubation\\)"; //$NON-NLS-1$ + + private static final String INCUBATION_KEYWORD = "(Incubation)"; //$NON-NLS-1$ + + private static final String BATIK_VERSION = "\"[1.6.0,1.7.0)\""; //$NON-NLS-1$ + + private static final String NATTABLE_VERSION = "1.5.0"; //$NON-NLS-1$ + + private static final String GLAZED_LIST_VERSION = "1.9.0";//$NON-NLS-1$ + + private static final String UML2_UML_VERSION_RANGE = "bundle-version=\"[5.3.0,6.0.0)\"";//$NON-NLS-1$ + + @Condition + public final boolean isAutomatedBuild = JUnitUtils.isAutomatedBuildExecution(); + + /** + * Tests that all Papyrus Bundle name are finished by {@link #INCUBATION} + */ + @InvalidTest("Some Papyrus bundles are still incubating (Extra...)") + @Test + public void incubationTest() { + org.hamcrest.Matcher<String> matcher = new BaseMatcher<String>() { + + @Override + public boolean matches(Object item) { + return item instanceof String && !((String) item).contains(INCUBATION_KEYWORD); + } + + @Override + public void describeTo(Description description) { + description.appendText("Does not contain "); //$NON-NLS-1$ + description.appendText(INCUBATION_KEYWORD); + } + }; + testManifestProperty(BundleTestsUtils.BUNDLE_NAME, matcher, false, false); + } + + /** + * Tests the provider name (should be EL + */ + @Test + public void vendorTest() { + testManifestProperty(BundleTestsUtils.BUNDLE_VENDOR, BundleTestsUtils.VENDOR_NAME, false, false); + } + + /** + * Tests if the file about.html is included to the plugin + */ + @Test + public void aboutTest() { + fileTest("/about.html"); //$NON-NLS-1$ + } + + /** + * Tests the java version + */ + @Test + public void javaVersionTest() { + testManifestProperty(BundleTestsUtils.BUNDLE_REQUIREDEXECUTIONENVIRONMENT, BundleTestsUtils.JAVA_VERSION_REGEX, false, true); + } + + /** + * Tests that we don't use import package + */ + @NotImplemented("Usage of importPackage is discouraged") + @Test + public void importPackage() { + testManifestProperty(BundleTestsUtils.BUNDLE_IMPORT_PACKAGE, "", true, false); //$NON-NLS-1$ + } + + /** + * Tests if a the value of a property in the Manifest is correct + * + * @param property + * the property to test + * @param regex + * the regular expression to test the property + * @param mustBeNull + * indicates that the value for the property must be <code>null</code> + * @param onlyOnJavaProject + * boolean indicating if the tests should only be done on + * JavaProject + */ + private void testManifestProperty(final String property, final String regex, final boolean mustBeNull, final boolean onlyOnJavaProject) { + org.hamcrest.Matcher<String> regexMatcher = new org.hamcrest.BaseMatcher<String>() { + + @Override + public boolean matches(Object item) { + return item instanceof String && ((String) item).matches(regex); + } + + @Override + public void describeTo(Description description) { + description.appendText("Matching regex("); //$NON-NLS-1$ + description.appendValue(regex); + description.appendText(")"); //$NON-NLS-1$ + } + + }; + + testManifestProperty(property, regexMatcher, mustBeNull, onlyOnJavaProject); + } + + private void testManifestProperty(final String property, final org.hamcrest.Matcher<String> matcher, final boolean mustBeNull, final boolean onlyOnJavaProject) { + String message = null; + int nb = 0; + for (final Bundle current : BundleTestsUtils.getPapyrusBundles()) { + if (onlyOnJavaProject && !BundleTestsUtils.isJavaProject(current)) { + continue; // useful for oep.infra.gmfdiag.css.theme for example + } + final String value = current.getHeaders().get(property); + boolean result = false; + if (mustBeNull) { + result = (value == null); + } else if (value != null) { + result = matcher.matches(value); // Don't fail yet if invalid + } + if (!result) { + if (message == null) { + message = "Wrong " + property + " for :"; //$NON-NLS-1$ //$NON-NLS-2$ + } + message += "\n "; //$NON-NLS-1$ + message += current.getSymbolicName(); + nb++; + } + } + Assert.assertNull(nb + " problems!", message); //$NON-NLS-1$ + } + + /** + * Tests if the file is owned by the bundle + * + * @param filepath + * the file path + */ + private void fileTest(final String filepath) { + StringBuffer buffer = new StringBuffer(); + int nb = 0; + for (final Bundle current : BundleTestsUtils.getPapyrusBundles()) { + URL url = current.getEntry(filepath); + if (url == null) { + if (buffer.length() == 0) { + buffer.append(NLS.bind("The following bundles don't have the file {0}.", filepath)); //$NON-NLS-1$ + } + buffer.append("\n");//$NON-NLS-1$ + buffer.append(current.getSymbolicName()); + nb++; + } + } + StringBuffer errorMessage = new StringBuffer(); + errorMessage.append(nb); + errorMessage.append(" problems!\n"); //$NON-NLS-1$ + errorMessage.append(buffer.toString()); + Assert.assertTrue(errorMessage.toString(), buffer.toString().isEmpty()); + } + + /** + * We want that all Papyrus batik dependencies will be defines + */ + @Test + public void batikDependencyVersionTest() { + testPapyrusDependencies2("org.apache.batik", BATIK_VERSION);//$NON-NLS-1$ + } + + @Test + public void natTableDependencyVersionTest() { + testPapyrusDependencies("org.eclipse.nebula.widgets.nattable", NATTABLE_VERSION, Collections.singletonList("org.eclipse.nebula.widgets.nattable.extension.nebula"));//$NON-NLS-1$ //$NON-NLS-2$ + } + + @Test + public void glazedListDependencyVersionTest() { + testPapyrusDependencies2("ca.odell.glazedlists", GLAZED_LIST_VERSION);//$NON-NLS-1$ + } + + @Test + public void guavaDependencyVersionTest() { + testPapyrusDependencies2("com.google.guava", "21.0.0");//$NON-NLS-1$ //$NON-NLS-2$ + } + + @Test + public void uml2umlDependencyVersionTest() { + testPapyrusDependencies("org.eclipse.uml2.uml", UML2_UML_VERSION_RANGE, //$NON-NLS-1$ + new ArrayList<>(Arrays.asList("org.eclipse.uml2.uml.profile.standard", //$NON-NLS-1$ + "org.eclipse.uml2.uml.validation", "org.eclipse.uml2.uml.editor"))); //$NON-NLS-1$ //$NON-NLS-2$ + } + + public final static String REGEX_PACKAGE_WORD = "\\w(?:\\w|\\d)*";// match a //$NON-NLS-1$ + // package + // name + + public static final String REGEX_PLUGIN = "(?:\\." + REGEX_PACKAGE_WORD + ")*";// match plugin name //$NON-NLS-1$ //$NON-NLS-2$ + + public static final String REGEX_BUNDLE = "(?:;bundle-version=\"([^\"]*)\")?"; //$NON-NLS-1$ + + public static final String REGEX_REEXPORT = "(?:;\\w*:=\\w*;\\w*-\\w*=\"([^\"]*)\")|"; //$NON-NLS-1$ + + public static class Version { + + private boolean minIncluding; + + private boolean maxIncluding; + + private int[] min = null; + + private int[] max = null; + + public Version(final String versionAsString) { + this.minIncluding = true; + this.maxIncluding = true; + if (versionAsString != null) { + this.minIncluding = !versionAsString.startsWith("("); //$NON-NLS-1$ + this.maxIncluding = !versionAsString.endsWith(")"); //$NON-NLS-1$ + final Pattern versionNumber = Pattern.compile("\\d+(\\.\\d+)*"); //$NON-NLS-1$ + final Matcher matcher = versionNumber.matcher(versionAsString); + while (matcher.find()) { + final String grp = matcher.group(); + final String[] versions = grp.split("\\."); //$NON-NLS-1$ + int[] vers = new int[versions.length]; + for (int i = 0; i < versions.length; i++) { + vers[i] = Integer.parseInt(versions[i]); + } + if (min == null) { + min = vers; + } else { + max = vers; + } + } + } + if (min == null) { + min = new int[] { 0, 0, 0 }; + } + if (max == null) { + max = new int[] { 99, 99, 99 }; + } + } + + public boolean inIncludedIn(final Version version) { + // verifying intersection between versions! + if (compare(this.max, version.min) < 0) { + return false; + } + if (compare(version.max, this.min) < 0) { + return false; + } + if (compare(this.max, version.min) == 0 && (!this.maxIncluding || !version.minIncluding)) { + return false; + } + if (compare(version.max, this.min) == 0 && (!version.maxIncluding || !this.minIncluding)) { + return false; + } + + // verifying inclusion + if (compare(this.min, version.min) < 0) { + return false; + } + + if (compare(this.min, version.min) == 0 && (this.minIncluding != version.minIncluding)) { + return false; + } + + if (compare(this.max, version.max) > 0) { + return false; + } + + if (compare(this.max, version.max) == 0 && (this.maxIncluding != version.maxIncluding)) { + return false; + } + return true; + } + + /** + * + * @param first + * @param second + * @return + * <ul> + * <li>0 when they are equal</li> + * <li>1 if first is greater than second</li> + * <li>-1 if first is smaller than second</li> + * </ul> + */ + protected int compare(int[] first, int[] second) { + int min = Math.min(first.length, second.length); + for (int i = 0; i < min; i++) { + if (first[i] < second[i]) { + return -1; + } else if (first[i] > second[i]) { + return 1; + } + } + if (first.length == second.length) { + return 0; + } else if (first.length > second.length) { + return 1; + } + return -1; + } + } + + /** + * + * @param partialDependencyName + * the fullName or a part of the name of the plugin + * @param wantedBundleVersionRegex + * a string like this : "bundle-version=\"[1.6.0,1.7.0)\"" + * @deprecated since 2.0, use the method {@link BundlesTests#testPapyrusDependencies(String, String, List)} instead + */ + @Deprecated + protected void testPapyrusDependencies2(final String partialDependencyName, final String wantedVersion) { + testPapyrusDependencies(partialDependencyName, wantedVersion, Collections.emptyList()); + } + + /** + * + * @param partialDependencyName + * the fullName or a part of the name of the plugin + * @param wantedBundleVersionRegex + * a string like this : "bundle-version=\"[1.6.0,1.7.0)\"" + * @param list + * of dependencies to ignore + * @since 2.0 + */ + protected void testPapyrusDependencies(final String partialDependencyName, final String wantedVersion, List<String> exceptions) { + final StringBuilder builder = new StringBuilder(); + int nb = 0; + final Version wanted = new Version(wantedVersion); + for (final Bundle current : BundleTestsUtils.getPapyrusBundles()) { + final String value = current.getHeaders().get(BundleTestsUtils.REQUIRE_BUNDLE); + if (value == null) { + continue; + } + + // Pattern pattern = Pattern.compile("(" + partialDependencyName + REGEX_PLUGIN + ")" + REGEX_DEPENDENCY); //$NON-NLS-1$ //$NON-NLS-2$ + Pattern pattern = Pattern.compile("(" + partialDependencyName + REGEX_PLUGIN + ")" + "(" + REGEX_REEXPORT + REGEX_BUNDLE + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + Matcher matcher = pattern.matcher(value); + final StringBuilder localBuilder = new StringBuilder(); + while (matcher.find()) { + final String pluginName = matcher.group(1); + if (exceptions.contains(pluginName)) { + continue; + } + String versionString = null; + if (matcher.groupCount() > 1) { + versionString = matcher.group(2); + } + if (versionString == null) { + if (localBuilder.length() == 0) { + localBuilder.append(NLS.bind("Incorrect version for {0}, got {1} and not {2} \n", new String[] { pluginName, current.getSymbolicName(), wantedVersion })); //$NON-NLS-1$ + } + localBuilder.append(NLS.bind("No Version number for {0}\n", pluginName)); //$NON-NLS-1$ + nb++; + } else { + Version version = new Version(versionString); + if (!version.inIncludedIn(wanted)) { + if (localBuilder.length() == 0) { + localBuilder.append(NLS.bind("{0} incorrect required bundle-version:\n", current.getSymbolicName())); //$NON-NLS-1$ + } + localBuilder.append(NLS.bind("Bad version for {0}, got {1} and not {2} \n", new String[] { pluginName, versionString, wantedVersion })); //$NON-NLS-1$ + nb++; + } + } + } + if (localBuilder.length() != 0) { + builder.append(localBuilder.toString()); + builder.append("\n");//$NON-NLS-1$ + } + } + if (builder.length() != 0) + + { + builder.insert(0, NLS.bind("{0} problems. We want this version : {1} for the plugin {2}\n", new String[] { Integer.toString(nb), wantedVersion, partialDependencyName })); //$NON-NLS-1$ + } + Assert.assertTrue(builder.toString(), builder.length() == 0); + } + + /** + * verify that the field PLUGIN_ID is equals to the plugin name + */ + @Test + public void pluginIDTest() { + StringBuffer errorMessage = new StringBuffer(); + StringBuffer warningMessage = new StringBuffer(); + final Collection<String> possibleIds = new ArrayList<>(); + possibleIds.add("ID");//$NON-NLS-1$ + possibleIds.add("PLUGIN_ID");//$NON-NLS-1$ + int nbError = 0; + int nbWarning = 0; + for (final Bundle current : BundleTestsUtils.getPapyrusBundles()) { + if (!BundleTestsUtils.isJavaProject(current)) { + continue; // useful for oep.infra.gmfdiag.css.theme for example + } + final String activator = current.getHeaders().get("Bundle-Activator"); //$NON-NLS-1$ + if (activator != null) { + try { + final Class<?> activatorClass = current.loadClass(activator); + Field plugin_id_field = null; + for (final Field currentField : activatorClass.getFields()) { + final String fieldName = currentField.getName(); + if (possibleIds.contains(fieldName)) { + plugin_id_field = currentField; + break; + } + } + if (plugin_id_field != null) { + final String plugin_id = (String) plugin_id_field.get(activatorClass); + if (!plugin_id.equals(current.getSymbolicName())) { + nbError++; + errorMessage.append(NLS.bind("The field PLUGIN_ID of the plugin {0} is not equals to the plugin name.\n", current.getSymbolicName())); //$NON-NLS-1$ + } + } else { + // Never happens. An exception is thrown. + nbWarning++; + warningMessage.append(NLS.bind("The activator of {0} has no field named PLUGIN_ID.\n", current.getSymbolicName())); //$NON-NLS-1$ + } + } catch (final Exception e) { + errorMessage.append(NLS.bind("Exception occured with the plugin {0} \n {1} \n", new Object[] { current.getSymbolicName(), e })); //$NON-NLS-1$ + } + } + + } + StringBuffer finalErrorMessage = new StringBuffer(); + finalErrorMessage.append(nbError); + finalErrorMessage.append(" problems! ");//$NON-NLS-1$ + finalErrorMessage.append(errorMessage); + Assert.assertTrue(finalErrorMessage.toString(), nbError == 0); + + // Do not fail on warnings + // Assert.assertTrue(nbWarning + "warning!" + warningMessage, nbWarning == 0);//$NON-NLS-1$ + } + + /** + * This test checks that nobody adds an unexpected dependency on the plugin org.eclipse.papyrus.emf + * + * @since 1.3 + */ + @Test + public void checkPapyrusEMFPluginDependency() { + final String bundleIDToCheck = "org.eclipse.papyrus.emf"; //$NON-NLS-1$ + final Map<String, Version> dependencies = new HashMap<>(); + final Version undefinedVersion = new Version(null); + dependencies.put("org.eclipse.ui", undefinedVersion); //$NON-NLS-1$ + dependencies.put("org.eclipse.core.runtime", undefinedVersion); //$NON-NLS-1$ + dependencies.put("org.eclipse.emf.ecore", undefinedVersion); //$NON-NLS-1$ + dependencies.put("org.eclipse.emf.ecore.xmi", undefinedVersion); //$NON-NLS-1$ + + strictCheckOfDependenciesList(bundleIDToCheck, dependencies, Collections.emptySet(), Collections.emptySet(), Collections.emptySet()); + + } + + + /** + * + * This method check all dependencies on the bundle. The version are checked using the method {@link Version#inIncludedIn(Version)} + * If there are more or less dependencies in the tested bundle, the test will fails + * + * @param bundleSymbolicNameToCheck + * the name of the bundle to check + * @param bundleDependenciesWithVersion + * the complete list of the dependencies to have for this bundle + * @param reexportedDependencies + * the completed list of re-exported dependencies for this bundle + * @param greedyDependencies + * the complete list of greedy dependencies for this bundle + * @param optionalDependencies + * the complete list of optional dependencies for this bundle + * + * @since 1.3 + */ + private void strictCheckOfDependenciesList(final String bundleSymbolicNameToCheck, final Map<String, Version> bundleDependenciesWithVersion, final Set<String> reexportedDependencies, final Set<String> greedyDependencies, + final Set<String> optionalDependencies) { + + Assert.assertNotNull(bundleSymbolicNameToCheck); + Assert.assertNotNull(bundleDependenciesWithVersion); + Assert.assertNotNull(reexportedDependencies); + Assert.assertNotNull(greedyDependencies); + Assert.assertNotNull(optionalDependencies); + + final PapyrusBundleDescription bundleToCheck = PapyrusBundleDescriptionRegistry.INSTANCE.getPapyrusBundleDescription(bundleSymbolicNameToCheck); + Assert.assertNotNull(NLS.bind("The bundle {0} has not been found.", bundleSymbolicNameToCheck), bundleToCheck); //$NON-NLS-1$ + + final Set<String> expectedDependencies = bundleDependenciesWithVersion.keySet(); + Assert.assertEquals("The current dependencies are not the expected ones.", expectedDependencies, PapyrusBundleDescription.asSymbolicNameSet(bundleToCheck.getDependencies())); //$NON-NLS-1$ + + Assert.assertEquals("The current reexported dependencies are not the expected ones.", reexportedDependencies, PapyrusBundleDescription.asSymbolicNameSet(bundleToCheck.getReexportedDependencies())); //$NON-NLS-1$ + + Assert.assertEquals("The current greedy dependencies are not the expected ones.", greedyDependencies, PapyrusBundleDescription.asSymbolicNameSet(bundleToCheck.getGreedyDependencies())); //$NON-NLS-1$ + + Assert.assertEquals("The current optional dependencies are not the expected ones.", optionalDependencies, PapyrusBundleDescription.asSymbolicNameSet(bundleToCheck.getOptionalDependencies())); //$NON-NLS-1$ + + + // we check the dependency range + for (final Entry<String, Version> current : bundleDependenciesWithVersion.entrySet()) { + Assert.assertTrue(NLS.bind("The dependency {0} is not registered with compatible version range", current.getKey()), bundleToCheck.getRegisteredDependencyVersion(current.getKey()).inIncludedIn(current.getValue())); //$NON-NLS-1$ + } + + } + + + +} diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/API2HTML.java b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/API2HTML.java new file mode 100644 index 00000000000..a6daed5d2fc --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/API2HTML.java @@ -0,0 +1,719 @@ +/* + * Copyright (c) 2012, 2016 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * Christian W. Damus - adapt for Papyrus bundle tests (bug 440910) + */ +package org.eclipse.papyrus.bundles.tests.apireport; + +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.io.PrintStream; +import java.net.MalformedURLException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.StringTokenizer; +import java.util.jar.Manifest; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.jdt.core.Flags; +import org.eclipse.jdt.core.JavaModelException; +import org.eclipse.jdt.core.search.IJavaSearchConstants; +import org.eclipse.jdt.core.search.IJavaSearchScope; +import org.eclipse.jdt.core.search.SearchEngine; +import org.eclipse.jdt.core.search.SearchPattern; +import org.eclipse.jdt.core.search.TypeNameRequestor; +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +/** + * A SAX XML handler that transforms the API report XML created by the + * {@link APIReportGenerator} to an easy-to-read collapsible tree + * presentation in HTML. + */ +public class API2HTML extends DefaultHandler { + private static final String ANNOTATION = "annotation"; + + private static final String ENUM = "enum"; + + private static final String INTERFACE = "interface"; + + private static final String CLASS = "class"; + + private static final String PLUS = "plus.gif"; + + private static final String MINUS = "minus.gif"; + + private static final Pattern VERSION_CHANGED = Pattern.compile( + "The ([^ ]+) version has been changed for the api component ([^ ]+) \\(from version ([^ ]+) to ([^ ]+)\\)"); + + private int lastNodeID; + + private Category breaking = new Category(CategoryKind.BREAKING, "Breaking API Changes"); + + private Category compatible = new Category(CategoryKind.COMPATIBLE, "Compatible API Changes"); + + private Category reexports = new Category(CategoryKind.REEXPORTS, "Re-exported API Changes"); + + private String buildQualifier; + + public API2HTML(File inputXML, String buildQualifier) throws Exception { + this.buildQualifier = buildQualifier; + + try (InputStream in = new FileInputStream(inputXML)) { + SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); + parser.parse(in, this); + } + } + + @Override + public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { + if ("delta".equalsIgnoreCase(qName)) { + try { + String componentVersion = null; + String componentChange = null; + + String componentID = attributes.getValue("componentId"); + String typeName = attributes.getValue("type_name"); + String elementType = attributes.getValue("element_type"); + String kind = attributes.getValue("kind"); + String message = attributes.getValue("message"); + + if (componentID == null || componentID.length() == 0) { + if (message.startsWith("The API component ")) { + componentID = message.substring("The API component ".length()); + componentID = componentID.substring(0, componentID.indexOf(' ')); + + if (message.endsWith("added")) { + componentChange = "The plugin has been added"; + componentVersion = readComponentVersion(componentID); + } else if (message.endsWith("removed")) { + componentChange = "The plugin has been removed"; + } else { + System.out.println("No componentID: " + message); + return; + } + } + } + + if (componentChange == null && (typeName == null || typeName.length() == 0)) { + Matcher matcher = VERSION_CHANGED.matcher(message); + if (matcher.matches()) { + componentChange = "The " + matcher.group(1) + " version has been changed from " + matcher.group(3) + " to " + + matcher.group(4); + } + } + + int pos = componentID.indexOf('('); + if (pos != -1) { + componentVersion = componentID.substring(pos + 1, componentID.length() - 1); + componentID = componentID.substring(0, pos); + } + + message = remove(message, typeName + "."); + message = remove(message, " in an interface that is tagged with '@noimplement'"); + message = remove(message, " for interface " + typeName); + message = remove(message, " for class " + typeName); + if (!message.contains("modifier has been")) { + message = remove(message, " to " + typeName); + } + + if (message != null && message.startsWith("The deprecation modifiers has")) { + message = "The deprecation modifier has" + message.substring("The deprecation modifiers has".length()); + } + + Category category; + if (message.startsWith("The re-exported type")) { + componentChange = message; + category = reexports; + } else { + category = "true".equals(attributes.getValue("compatible")) ? compatible : breaking; + } + + Map<String, Component> components = category.getComponents(); + + Component component = components.get(componentID); + if (component == null) { + component = new Component(category, componentID); + components.put(componentID, component); + } + + if (componentVersion != null) { + component.setComponentVersion(componentVersion); + } + + if (componentChange != null) { + component.getChanges().add(new Change(component, componentChange, kind)); + } else { + if (typeName == null || typeName.length() == 0) { + System.out.println("No typeName: " + message); + return; + } + + Type type = component.getTypes().get(typeName); + if (type == null) { + type = new Type(component, typeName); + component.getTypes().put(typeName, type); + } + + type.setElementType(elementType); + type.getChanges().add(new Change(type, message, kind)); + } + } catch (Exception ex) { + ex.printStackTrace(); + } + } + } + + private String readComponentVersion(String componentID) throws Exception { + String result = null; + + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(componentID); + if ((project != null) && project.isAccessible()) { + IFolder metaInf = project.getFolder("META-INF"); + if ((metaInf != null) && metaInf.isAccessible()) { + IFile manifestFile = metaInf.getFile("MANIFEST.MF"); + if ((manifestFile != null) && manifestFile.isAccessible()) { + try (InputStream in = manifestFile.getContents()) { + Manifest manifest = new Manifest(in); + java.util.jar.Attributes attributes = manifest.getMainAttributes(); + result = attributes.getValue("Bundle-Version"); + } + } + } + } + + return result; + } + + public void generate(File htmlFile) throws Exception { + PrintStream out = new PrintStream(htmlFile); + + try { + out.println("<!DOCTYPE HTML>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>API Evolution Report for Papyrus " + buildQualifier + "</title>"); + out.println("<link rel=stylesheet type='text/css' href='api.css'>"); + out.println("<base href='images/'>"); + out.println("<script type='text/javascript'>"); + out.println(" function toggle(id)"); + out.println(" {"); + out.println(" e = document.getElementById(id);"); + out.println(" e.style.display = (e.style.display == '' ? 'none' : '');"); + out.println(" img = document.getElementById('img_' + id);"); + out.println(" img.src = (e.style.display == 'none' ? '" + PLUS + "' : '" + MINUS + "');"); + out.println(" }"); + out.println("</script>"); + out.println("</head>"); + out.println("<body>"); + out.println("<h1>API Evolution Report for Papyrus " + buildQualifier + "</h1>"); + + breaking.generate(out, ""); + out.println("<p/>"); + compatible.generate(out, ""); + out.println("<p/>"); + reexports.generate(out, ""); + + out.println("</body>"); + out.println("</html>"); + } finally { + out.close(); + } + } + + private List<String> sortedKeys(Map<String, ?> map) { + List<String> list = new ArrayList<String>(map.keySet()); + Collections.sort(list); + return list; + } + + private String remove(String string, String remove) { + if (string != null) { + int pos = string.indexOf(remove); + if (pos != -1) { + string = string.substring(0, pos) + string.substring(pos + remove.length()); + } + } + + return string; + } + + public static void main(String[] args) throws Exception { + new API2HTML(new File(args[0]), args[2]).generate(new File(args[1])); + } + + /** + * @author Eike Stepper + */ + public static final class Version implements Comparable<Version> { + private static final String SEPARATOR = "."; + + private int major = 0; + + private int minor = 0; + + private int micro = 0; + + public Version(String version) { + StringTokenizer st = new StringTokenizer(version, SEPARATOR, true); + major = Integer.parseInt(st.nextToken()); + + if (st.hasMoreTokens()) { + st.nextToken(); + minor = Integer.parseInt(st.nextToken()); + + if (st.hasMoreTokens()) { + st.nextToken(); + micro = Integer.parseInt(st.nextToken()); + } + } + } + + @Override + public String toString() { + return major + SEPARATOR + minor + SEPARATOR + micro; + } + + @Override + public int compareTo(Version o) { + if (o == this) { + return 0; + } + + int result = major - o.major; + if (result != 0) { + return result; + } + + result = minor - o.minor; + if (result != 0) { + return result; + } + + result = micro - o.micro; + if (result != 0) { + return result; + } + + return 0; + } + } + + /** + * @author Eike Stepper + */ + protected abstract class AbstractNode { + private final AbstractNode parent; + + private final String text; + + public AbstractNode(AbstractNode parent, String text) { + this.parent = parent; + this.text = text; + } + + public String getText() { + return text.replaceAll("<", "<").replaceAll("\"", """); + } + + public String getIcon() { + return ""; + } + + public void generate(PrintStream out, String indent) throws Exception { + out.print(indent + getIcon() + " "); + + String href = getHref(); + if (href == null) { + out.print(getText()); + } else { + out.print("<a href='" + href + "' target='_blank'>"); + out.print(getText()); + out.print("</a>"); + } + } + + protected String getHref() throws Exception { + return null; + } + + AbstractNode getParent() { + return parent; + } + + <N extends AbstractNode> N getAncestor(Class<N> type) { + N result = null; + + for (AbstractNode node = this; (node != null); node = node.getParent()) { + if (type.isInstance(node)) { + result = type.cast(node); + break; + } + } + + return result; + } + + Category getCategory() { + return getAncestor(Category.class); + } + } + + /** + * @author Eike Stepper + */ + protected abstract class AbstractTreeNode extends AbstractNode { + private int id; + + public AbstractTreeNode(AbstractNode parent, String text) { + super(parent, text); + id = ++lastNodeID; + } + + @Override + public void generate(PrintStream out, String indent) throws Exception { + out.print(indent + "<div class='" + getClass().getSimpleName().toLowerCase() + "'>"); + + if (isCollapsible()) { + out.print("<a href=\"javascript:toggle('node" + id + "')\">"); + out.print("<img src='" + (isCollapsed() ? PLUS : MINUS) + "' id='img_node" + id + "'>"); + out.print("</a>"); + } + + super.generate(out, ""); + out.println("</div>"); + + out.println(indent + "<div id=\"node" + id + "\" style='" + (isCollapsed() ? "display:none; " : "") + + "margin-left:20px;'>"); + + generateChildren(out, indent + " "); + + out.println(indent + "</div>"); + } + + protected abstract void generateChildren(PrintStream out, String indent) throws Exception; + + protected boolean isCollapsible() { + return false; + } + + protected boolean isCollapsed() { + return isCollapsible(); + } + } + + private enum CategoryKind { + BREAKING, COMPATIBLE, REEXPORTS; + } + + /** + * @author Eike Stepper + */ + private final class Category extends AbstractTreeNode { + private final Map<String, Component> components = new HashMap<String, Component>(); + private final CategoryKind kind; + + public Category(CategoryKind kind, String text) { + super(null, text); // root node + + this.kind = kind; + } + + CategoryKind kind() { + return kind; + } + + public Map<String, Component> getComponents() { + return components; + } + + @Override + protected void generateChildren(PrintStream out, String indent) throws Exception { + if (components.isEmpty()) { + out.println(indent + "<em>There are no " + getText().toLowerCase() + ".</em>"); + } else { + for (String key : sortedKeys(components)) { + Component component = components.get(key); + component.generate(out, indent); + } + } + } + + @Override + protected boolean isCollapsible() { + return true; + } + + @Override + protected boolean isCollapsed() { + return kind() != CategoryKind.BREAKING; + } + } + + /** + * @author Eike Stepper + */ + private final class Component extends AbstractTreeNode { + private final List<Change> changes = new ArrayList<Change>(); + + private final Map<String, Type> types = new HashMap<String, Type>(); + + private Version componentVersion; + + public Component(AbstractNode parent, String componentID) { + super(parent, componentID); + } + + public String getComponentID() { + return super.getText(); + } + + public void setComponentVersion(String componentVersion) { + Version version = new Version(componentVersion); + if (this.componentVersion == null || this.componentVersion.compareTo(version) < 0) { + this.componentVersion = version; + } + } + + @Override + public String getText() { + String componentID = getComponentID(); + if (componentVersion != null) { + componentID += " " + componentVersion; + } + + return componentID; + } + + @Override + public String getIcon() { + return "<img src='plugin.gif'>"; + } + + public List<Change> getChanges() { + return changes; + } + + public Map<String, Type> getTypes() { + return types; + } + + @Override + protected void generateChildren(PrintStream out, String indent) throws Exception { + for (Change change : changes) { + change.generate(out, indent); + } + + for (String key : sortedKeys(types)) { + Type type = types.get(key); + type.generate(out, indent); + } + } + + @Override + protected String getHref() throws Exception { + return null; + } + + @Override + protected boolean isCollapsible() { + return true; + } + + @Override + protected boolean isCollapsed() { + return getCategory().isCollapsed(); + } + } + + /** + * @author Eike Stepper + */ + private final class Type extends AbstractTreeNode { + private final List<Change> changes = new ArrayList<Change>(); + + @SuppressWarnings("unused") + private final Component component; + + private String elementType; + + public Type(Component component, String text) { + super(component, text); + this.component = component; + } + + public String getTypeName() { + return super.getText(); + } + + @Override + public String getText() { + String typeName = getTypeName(); + return typeName.replace('$', '.'); + } + + @Override + public String getIcon() { + try { + return "<img src='" + getElementType() + ".gif'>"; + } catch (Exception ex) { + return super.getIcon(); + } + } + + public List<Change> getChanges() { + return changes; + } + + public void setElementType(String elementType) { + if ("CLASS_ELEMENT_TYPE".equals(elementType)) { + this.elementType = CLASS; + } else if ("INTERFACE_ELEMENT_TYPE".equals(elementType)) { + this.elementType = INTERFACE; + } else if ("ENUM_ELEMENT_TYPE".equals(elementType)) { + this.elementType = ENUM; + } else if ("ANNOTATION_ELEMENT_TYPE".equals(elementType)) { + this.elementType = ANNOTATION; + } + } + + public String getElementType() throws Exception { + if (elementType == null) { + String typeName = getTypeName(); + elementType = determineElementType(typeName); + } + + return elementType; + } + + @Override + protected void generateChildren(PrintStream out, String indent) throws Exception { + for (Change change : changes) { + change.generate(out, indent); + } + } + + @Override + protected String getHref() throws Exception { + return null; + } + + private String determineElementType(String typeName) throws MalformedURLException { + final String[] result = { null }; + + int lastDot = typeName.lastIndexOf('.'); + String packageName = typeName.substring(0, lastDot); + typeName = typeName.substring(lastDot + 1).replace('$', '.'); + + // This only finds top-level and nested type, not local or anonymous types. + // But that's okay, because those are usually classes, anyways (anonymous + // types always are) + TypeNameRequestor requestor = new TypeNameRequestor() { + @Override + public void acceptType(int modifiers, char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path) { + // Only process the first match + if (result[0] == null) { + if (Flags.isAnnotation(modifiers)) { + result[0] = ANNOTATION; + } else if (Flags.isInterface(modifiers)) { + result[0] = INTERFACE; + } else if (Flags.isEnum(modifiers)) { + result[0] = ENUM; + } else { + result[0] = CLASS; + } + } + } + }; + + IJavaSearchScope scope = SearchEngine.createWorkspaceScope(); + SearchEngine engine = new SearchEngine(); + + try { + engine.searchAllTypeNames(packageName.toCharArray(), SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE, + typeName.toCharArray(), SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE, + IJavaSearchConstants.TYPE, scope, + requestor, + IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, new NullProgressMonitor()); + } catch (JavaModelException e) { + // No matter. We'll just assume it's a class + result[0] = CLASS; + } + + return (result[0] == null) ? CLASS : result[0]; + } + } + + /** + * @author Eike Stepper + */ + private final class Change extends AbstractNode { + private final String kind; + + public Change(AbstractNode parent, String text, String kind) { + super(parent, text); + if ("REMOVED".equals(kind)) { + this.kind = "removal"; + } else if ("ADDED".equals(kind)) { + this.kind = "addition"; + } else { + this.kind = "change"; + } + } + + @Override + public String getIcon() { + try { + return "<img src='" + kind + ".gif'>"; + } catch (Exception ex) { + return super.getIcon(); + } + } + + @Override + public String getText() { + String result = super.getText(); + + // Highlight API names in a different font + result = result.replaceAll("type ([A-Z]\\w+|[a-zA-Z0-9_]+\\.[a-zA-Z0-9_.]+)", "type <span class=\"apiname\">$1</span>"); + result = result.replaceAll("(field|interface) (?!that)(\\S+)", "$1 <span class=\"apiname\">$2</span>"); + result = result.replaceAll("constant value (.*?) of the field", "constant value <span class=\"apiname\">$1</span> of the field"); + result = result.replaceAll("(constructor|method) (\\S+\\([^)]*\\))", "$1 <span class=\"apiname\">$2</span>"); + result = result.replaceAll("(@\\w+)", "<span class=\"apiname\">$1</span>"); + + result = result.replaceAll("'(\\w+)' keyword", "'<span class=\"apiname\">$1</span>' keyword"); + + // And correct some syntax + result = result.replaceAll("The type argument have been changed for (\\S+); was (\\S+) and is now (\\S+)", + "A type argument as been changed for <span class=\"apiname\">$1</span>; was <span class=\"apiname\">$2</span> and is now <span class=\"apiname\">$3</span>"); + return result; + } + + @Override + public void generate(PrintStream out, String indent) throws Exception { + out.print(indent + "<img src='empty.gif'>"); + super.generate(out, ""); + out.println("<br>"); + } + } +} diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/APIReportGenerator.java b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/APIReportGenerator.java new file mode 100644 index 00000000000..e20ed1a4c28 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/APIReportGenerator.java @@ -0,0 +1,392 @@ +/* + * Copyright (c) 2012, 2016 Eike Stepper (Berlin, Germany), Christian W. Damus, 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: + * Eike Stepper - initial API and implementation + * Christian W. Damus - adapt for Papyrus bundle tests (bug 440910) + * Christian W. Damus - bug 491116 + */ +package org.eclipse.papyrus.bundles.tests.apireport; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.nio.file.FileVisitResult; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.SimpleFileVisitor; +import java.nio.file.attribute.BasicFileAttributes; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Predicate; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParserFactory; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.OperationCanceledException; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.SubMonitor; +import org.eclipse.papyrus.bundles.tests.Activator; +import org.eclipse.papyrus.bundles.tests.BundleTestsUtils; +import org.eclipse.pde.api.tools.internal.model.ApiModelFactory; +import org.eclipse.pde.api.tools.internal.model.BundleComponent; +import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers; +import org.eclipse.pde.api.tools.internal.provisional.comparator.ApiComparator; +import org.eclipse.pde.api.tools.internal.provisional.comparator.ApiScope; +import org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta; +import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline; +import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent; +import org.eclipse.pde.api.tools.internal.provisional.model.IApiScope; +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleException; +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +/** + * <p> + * A generator of API delta reports: given an API baseline (a set of plug-ins + * from the "previous" or "latest" stable release of Papyrus), computes the + * changes in the current installed/workspace versions of the same bundles. + * These changes are of three kinds: + * </p> + * <ul> + * <li>incompatible/breaking changes in public APIs</li> + * <li>compatible changes in public APIs</li> + * <li>changes in APIs re-exported by the plug-ins included in the report</li> + * </ul> + * <p> + * The plug-ins in the scope of the report are all plug-ins that don't match any + * of the exclusion filters in the <tt>excludes.txt</tt> file in this package. + * The format of the file is the same as the exclusion/inclusion filters used + * by the PDE API Tools Ant tasks. + * </p> + */ +public class APIReportGenerator { + // A decreasing sequence of bundle IDs that won't clash with those allocated by API Tools + private static AtomicInteger nextDevWorkspaceBundleID = new AtomicInteger(Integer.MAX_VALUE); + + /** + * Match a bundle location that is a <tt>file:</tt> URI optionally preceded + * by <tt>reference:</tt>, <tt>initial@reference:</tt>, or other. for the purpose + * of extracting the file URI. + */ + private final Pattern bundleLocation = Pattern.compile("([^:]+:)?file:(.*)"); + + private final File baselineLocation; + private final File apiXML; + + /** + * Initializes me. + * + * @param baselineLocation + * a directory in the local filesystem containing the plug-ins + * that comprise the baseline of API comparison. This should usually be either a + * self-contained (non-bundle-pooled) Eclipse installation or a leaf-level (single release) + * p2 repository. In any case, the report generator searches within this location for a + * <tt>plugins/</tt> directory and scans that for JAR and directory bundles. This must be + * an absolute path + * @param apiXML + * the XML file (absolute path) to generate + */ + public APIReportGenerator(File baselineLocation, File apiXML) { + super(); + + this.baselineLocation = baselineLocation; + this.apiXML = apiXML; + } + + /** + * Generates the XML API delta report file. + */ + public IStatus generate(IProgressMonitor monitor) throws CoreException { + Pattern[] exclusionPatterns = loadExclusions("excludes.txt"); //$NON-NLS-1$ + + SubMonitor progress = SubMonitor.convert(monitor, 100); + + try { + try { + try (BufferedWriter writer = new BufferedWriter(new FileWriter(apiXML))) { + progress.subTask("Discovering API baseline..."); + IApiBaseline baseline = getBaseline(exclusionPatterns, progress.newChild(25)); + if (baseline == null) { + return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "No API baseline configured"); + } + checkCancellation(progress); + + progress.subTask("Discovering current API..."); + IApiScope scope = getAPIToCompare(exclusionPatterns, progress.newChild(25)); + checkCancellation(progress); + + progress.subTask("Computing deltas..."); + IDelta delta = ApiComparator.compare(scope, baseline, VisibilityModifiers.API, false, true, progress.newChild(25)); + if (delta != null) { + checkCancellation(progress); + + Java8DeltaXMLVisitor visitor = new Java8DeltaXMLVisitor(); + delta.accept(visitor); + + visitor.appendTo(writer); + writer.flush(); + + progress.done(); + } + } catch (IOException e) { + Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "I/O problem in API analysis", e)); + } catch (CoreException e) { + Activator.getDefault().getLog().log(e.getStatus()); + } + + progress.worked(25); + return Status.OK_STATUS; + } catch (OperationCanceledException e) { + // ignore + } + } finally { + monitor.done(); + } + + return Status.CANCEL_STATUS; + } + + IApiBaseline getBaseline(Pattern[] exclusionPatterns, IProgressMonitor monitor) throws IOException, CoreException { + IApiBaseline result = ApiModelFactory.newApiBaseline("Configured Baseline"); + List<IApiComponent> components = new ArrayList<>(); + + Files.walkFileTree(Paths.get(baselineLocation.toURI()), new SimpleFileVisitor<Path>() { + private boolean inPlugins; + + @Override + public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { + FileVisitResult result = FileVisitResult.CONTINUE; + + // Don't delve into directory bundles + if (inPlugins) { + result = FileVisitResult.SKIP_SUBTREE; + } + // Don't clear this flag on directories nested within 'plugins' + else if ("plugins".equals(dir.getFileName().toString())) { + inPlugins = true; + } + + return result; + } + + @Override + public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { + FileVisitResult result = FileVisitResult.CONTINUE; + + if ("plugins".equals(dir.getFileName().toString())) { + inPlugins = false; + result = FileVisitResult.TERMINATE; + } + + return result; + } + + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { + if (inPlugins) { + try { + IApiComponent component = ApiModelFactory.newApiComponent(result, file.toString()); + if ((component != null) && !isExcluded(exclusionPatterns, component.getSymbolicName())) { + components.add(component); + monitor.subTask(" added component " + component.getSymbolicName()); + } + } catch (CoreException e) { + // It's fine, it's not a bundle (maybe it's a pack200 archive) + } + } + + return FileVisitResult.CONTINUE; + } + + @Override + public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException { + System.out.printf("Error visiting %s: %s%n", file, exc.getMessage()); + return FileVisitResult.CONTINUE; + } + }); + + result.addApiComponents(components.toArray(new IApiComponent[components.size()])); + + return result; + } + + private static boolean isExcluded(Pattern[] patterns, String name) { + for (Pattern pattern : patterns) { + Matcher matcher = pattern.matcher(name); + if (matcher.matches()) { + return true; + } + } + + return false; + } + + ApiScope getAPIToCompare(Pattern[] exclusionPatterns, IProgressMonitor monitor) throws CoreException { + ApiScope result = new ApiScope(); + + IApiBaseline currentBaseline = ApiModelFactory.newApiBaseline("Test Baseline"); + if (currentBaseline != null) { + for (Bundle next : BundleTestsUtils.getPapyrusBundles()) { + if (((next.getState() & (Bundle.INSTALLED | Bundle.STARTING | Bundle.ACTIVE)) != 0) + && !isExcluded(exclusionPatterns, next.getSymbolicName())) { + + try { + String installLocation = getInstallLocation(next); + if (installLocation != null) { + IApiComponent component = null; + Path installPath = Paths.get(installLocation); + Path dotClasspath = installPath.resolve(".classpath"); + if (Files.isDirectory(installPath) && Files.exists(dotClasspath)) { + // It's a project in the development workspace (we are a run-time instance) + component = createDevWorkspaceComponent(currentBaseline, installPath, dotClasspath); + } else { + // Standard approach for JAR bundles and expanded installed bundles + component = ApiModelFactory.newApiComponent(currentBaseline, installLocation); + } + + if (component != null) { + result.addElement(component); + monitor.subTask(" added component " + component.getSymbolicName()); + } + } + } catch (CoreException e) { + // Hmm, shouldn't happen for a successfully installed bundle + Activator.getDefault().getLog().log(e.getStatus()); + } + } + } + + List<IApiComponent> allComponents = Stream.of(result.getApiElements()) + .filter(IApiComponent.class::isInstance) + .map(IApiComponent.class::cast) + .collect(Collectors.toList()); + currentBaseline.addApiComponents(allComponents.toArray(new IApiComponent[allComponents.size()])); + } + + return result; + } + + /** + * Obtains the location in the local filesystem where the specified {@code bundle} is installed. + * + * @param bundle + * an installed bundle + * @return its location in the local filesystem, or {@code null} if it could not be determined + */ + String getInstallLocation(Bundle bundle) { + String result = null; + + Matcher m = bundleLocation.matcher(bundle.getLocation()); + if (m.matches()) { + // Don't try to create a URI-based file using the file: URI because + // in some installations, it will actually be a relative URI, which + // the File(URI) constructor would reject + result = new File(m.group(2)).getAbsolutePath(); + } + + return result; + } + + protected IApiComponent createDevWorkspaceComponent(IApiBaseline parent, Path installLocation, Path dotClasspath) throws CoreException { + BundleComponent result = new BundleComponent(parent, installLocation.toString(), nextDevWorkspaceBundleID()) { + @Override + protected String[] getClasspathEntries(Map<String, String> manifest) throws BundleException { + List<String> classpathEntries = parseClasspath(dotClasspath); + return classpathEntries.toArray(new String[classpathEntries.size()]); + } + }; + + return result; + } + + private static int nextDevWorkspaceBundleID() { + return nextDevWorkspaceBundleID.getAndDecrement(); + } + + protected List<String> parseClasspath(Path dotClasspath) throws BundleException { + List<String> result = new ArrayList<>(); + + try { + SAXParserFactory.newInstance().newSAXParser().parse(dotClasspath.toFile(), new DefaultHandler() { + @Override + public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { + if ("classpathentry".equals(qName)) { + String kind = attributes.getValue("kind"); + if (kind != null) { + switch (kind) { + case "lib": + case "output": + result.add(attributes.getValue("path")); + break; + } + } + } + } + }); + } catch (SAXException | IOException | ParserConfigurationException e) { + throw new BundleException("Failed to parse bundle classpath", e); + } + + return result; + } + + private static void checkCancellation(IProgressMonitor monitor) throws OperationCanceledException { + if (monitor == null) { + return; + } + + if (monitor.isCanceled()) { + throw new OperationCanceledException(); + } + } + + private static Pattern[] loadExclusions(String resourceName) { + List<Pattern> result; + + URL url = APIReportGenerator.class.getResource(resourceName); + + try (BufferedReader input = new BufferedReader(new InputStreamReader(url.openStream(), StandardCharsets.UTF_8))) { + result = input.lines() + .map(String::trim) + .filter(((Predicate<String>) String::isEmpty).negate()) + .filter(line -> !line.startsWith("#")) //$NON-NLS-1$ + .map(pattern -> { + if (pattern.startsWith("R:")) { //$NON-NLS-1$ + pattern = pattern.substring("R:".length()); //$NON-NLS-1$ + } else { + pattern = Pattern.quote(pattern); + } + return Pattern.compile(pattern); + }) + .collect(Collectors.toList()); + } catch (IOException e) { + // Fine, no exclusions, then + result = Collections.emptyList(); + } + + return result.toArray(new Pattern[result.size()]); + } +} diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/Java8DeltaXMLVisitor.java b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/Java8DeltaXMLVisitor.java new file mode 100644 index 00000000000..5dd8d844b99 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/Java8DeltaXMLVisitor.java @@ -0,0 +1,215 @@ +/***************************************************************************** + * Copyright (c) 2016 Christian W. Damus 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: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.bundles.tests.apireport; + +import java.io.IOException; +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.jdt.core.Flags; +import org.eclipse.pde.api.tools.internal.IApiXmlConstants; +import org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; + +/** + * A specialized {@link SafeDeltaXmlVisitor} that accounts for new + * compatibility scenarios in Java8's interface evoluation + * capabilities (such as default and static methods). + */ +public class Java8DeltaXMLVisitor extends SafeDeltaXmlVisitor { + private static final Map<String, Integer> deltaConstantsDecoder = new HashMap<>(); + + private final Element root; + + static { + try { + for (Field next : IDelta.class.getFields()) { + if (next.getType() == int.class) { + deltaConstantsDecoder.put(next.getName(), next.getInt(null)); + } + } + } catch (Exception e) { + // Won't happen because we iterate known fields of an interface, which + // are by definition always accessible + throw new Error(e); + } + } + + public Java8DeltaXMLVisitor() throws CoreException { + super(); + + root = getDocument().getDocumentElement(); + } + + + /** + * Appends my XML content to a given {@code appendable}. + * + * @param appendable + * the appenable on which to append me + * + * @throws IOException + * on failure to append + */ + public void appendTo(Appendable appendable) throws IOException { + try { + appendable.append(getXML()); + } catch (CoreException e) { + throw new IOException(e); + } + } + + @Override + protected void processLeafDelta(IDelta delta) { + super.processLeafDelta(delta); + + Element deltaElement = getNewElement(); + if (isIncompatible(deltaElement)) { + amend(deltaElement); + } + } + + /** + * Obtains the element most recently added to the delta report. + * + * @return the newest delta element + */ + Element getNewElement() { + NodeList nodes = root.getChildNodes(); + // We don't append interstitial text + return (Element) nodes.item(nodes.getLength() - 1); + } + + public boolean isIncompatible(Element delta) { + String result = getString(delta, IApiXmlConstants.ATTR_NAME_COMPATIBLE); + return !Boolean.parseBoolean(result); + } + + protected void setCompatible(Element delta, boolean compatible) { + set(delta, IApiXmlConstants.ATTR_NAME_COMPATIBLE, compatible); + } + + protected String getString(Element element, String attribute) { + return element.getAttribute(attribute); + } + + protected void set(Element element, String attribute, String value) { + if (value == null) { + element.removeAttribute(attribute); + } else { + element.setAttribute(attribute, value); + } + } + + protected boolean getBoolean(Element element, String attribute) { + String result = getString(element, attribute); + return Boolean.parseBoolean(result); + } + + protected void set(Element element, String attribute, boolean value) { + set(element, attribute, Boolean.toString(value)); + } + + protected int getInt(Element element, String attribute) { + String result = getString(element, attribute); + return (result == null) ? 0 : Integer.parseInt(result); + } + + protected void set(Element element, String attribute, int value) { + set(element, attribute, Integer.toString(value)); + } + + protected void amend(Element delta) { + Integer elementType = deltaConstantsDecoder.getOrDefault( + getString(delta, IApiXmlConstants.ATTR_NAME_ELEMENT_TYPE), + 0); + + switch (elementType) { + case IDelta.INTERFACE_ELEMENT_TYPE: + amendInterface(delta); + break; + } + } + + protected void amendInterface(Element delta) { + boolean compatible = false; + Integer kind = deltaConstantsDecoder.getOrDefault( + getString(delta, IApiXmlConstants.ATTR_KIND), + 0); + String newMessage = null; + + switch (kind) { + case IDelta.ADDED: + // Something was added to the interface + switch (getInt(delta, IApiXmlConstants.ATTR_FLAGS)) { + case IDelta.FIELD: + // Interfaces can only have static fields, so of course this is + // compatible because the linkage is static + compatible = isStatic(delta); + if (compatible) { + newMessage = getString(delta, IApiXmlConstants.ATTR_MESSAGE); + if (newMessage != null) { + newMessage = newMessage.replaceFirst("field", "static field"); + newMessage = newMessage.replaceFirst("in an interface that .*? has", "has"); + } + } + break; + case IDelta.METHOD: + // Java 8 default and static methods are a compatible addition + compatible = isDefaultOrStaticMethod(delta); + if (compatible) { + newMessage = getString(delta, IApiXmlConstants.ATTR_MESSAGE); + if (newMessage != null) { + newMessage = newMessage.replaceFirst("method", + isStatic(delta) ? "static method" : "default method"); + newMessage = newMessage.replaceFirst("in an interface that .*? has", "has"); + } + } + break; + } + break; + } + + if (compatible) { + setCompatible(delta, compatible); + if (newMessage != null) { + set(delta, IApiXmlConstants.ATTR_MESSAGE, newMessage); + } + } + } + + private boolean isDefaultOrStaticMethod(Element delta) { + // Assume not if we can't get the method details + boolean result = false; + + int modifiers = getInt(delta, IApiXmlConstants.ATTR_NAME_NEW_MODIFIERS); + result = Flags.isDefaultMethod(modifiers) || Flags.isStatic(modifiers) + || !Flags.isAbstract(modifiers); // May not know that it's explicitly default + + return result; + } + + private boolean isStatic(Element delta) { + // Assume not if we can't get the method details + boolean result = false; + + int modifiers = getInt(delta, IApiXmlConstants.ATTR_NAME_NEW_MODIFIERS); + result = Flags.isStatic(modifiers); + + return result; + } +} diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/ReportFixture.java b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/ReportFixture.java new file mode 100644 index 00000000000..20bdb251b2c --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/ReportFixture.java @@ -0,0 +1,120 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.bundles.tests.apireport; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.Enumeration; +import java.util.LinkedList; +import java.util.Queue; + +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; +import org.eclipse.papyrus.bundles.tests.Activator; + +/** + * Encapsulation of the report resources in the workspace metadata area. + */ +public class ReportFixture { + private static final IPath XML_REPORTS = new Path("apireports/xml"); //$NON-NLS-1$ + private static final IPath HTML_REPORTS = new Path("apireports/html"); //$NON-NLS-1$ + + private static final IPath XML_REPORT_FILE = XML_REPORTS.append("api.xml"); //$NON-NLS-1$ + private static final IPath HTML_REPORT_FILE = HTML_REPORTS.append("api.html"); //$NON-NLS-1$ + + private final File xmlReportFile; + private final File htmlReportFile; + + /** + * Initializes the XML and HTML outputs of the API report. For example, certain + * stylesheets and images are emitted if necessary for the HTML report. + * + * @param baseOutputDir + * the base directory in which to generate the resulting reports + * + * @throws IOException + * on any problem in initializing the contents of the output directory + */ + public ReportFixture(IPath baseOutputDir) throws IOException { + super(); + + xmlReportFile = baseOutputDir.append(XML_REPORT_FILE).toFile(); + htmlReportFile = baseOutputDir.append(HTML_REPORT_FILE).toFile(); + + ensureContents(xmlReportFile.getParentFile(), XML_REPORTS); + ensureContents(htmlReportFile.getParentFile(), HTML_REPORTS); + } + + public File getXMLReportFile() { + return xmlReportFile; + } + + public File getHTMLReportFile() { + return htmlReportFile; + } + + private void ensureContents(File directory, IPath resourcePath) throws IOException { + if (!directory.exists()) { + directory.mkdirs(); + } + + IPath base = new Path(directory.getAbsolutePath()); + + // Initial queue of resources to fetch + Queue<String> queue = new LinkedList<>(); + enqueueResources(new Path("resources").append(resourcePath).toString(), queue); //$NON-NLS-1$ + + for (String next = queue.poll(); next != null; next = queue.poll()) { + // Enqueue further resources + enqueueResources(next, queue); + + IPath path = new Path(next); + if (!path.hasTrailingSeparator()) { + // It's a file to be copied + URL url = Activator.getDefault().getBundle().getEntry(next); + if (url != null) { + // Strip the "resources" segment also (the +1) + copyResource(url, base.append(path.removeFirstSegments(resourcePath.segmentCount() + 1))); + } + } + } + } + + private void enqueueResources(String basePath, Queue<? super String> queue) { + Enumeration<String> entries = Activator.getDefault().getBundle().getEntryPaths(basePath); + if (entries != null) { + while (entries.hasMoreElements()) { + queue.add(entries.nextElement()); + } + } + } + + private void copyResource(URL source, IPath destination) throws IOException { + File localFile = destination.toFile(); + + if (!localFile.exists()) { + if (!localFile.getParentFile().exists()) { + localFile.getParentFile().mkdirs(); + } + + try (InputStream input = source.openStream()) { + Files.copy(input, Paths.get(localFile.getAbsolutePath())); + } + } + } +} diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/SafeDeltaXmlVisitor.java b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/SafeDeltaXmlVisitor.java new file mode 100644 index 00000000000..b0859f64700 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/SafeDeltaXmlVisitor.java @@ -0,0 +1,175 @@ +/***************************************************************************** + * Copyright (c) 2017 CEA LIST 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ +/******************************************************************************* + * Copyright (c) 2007, 2013 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.papyrus.bundles.tests.apireport; + +import java.io.IOException; +import java.io.Writer; + +import org.apache.commons.lang3.text.translate.AggregateTranslator; +import org.apache.commons.lang3.text.translate.CharSequenceTranslator; +import org.apache.commons.lang3.text.translate.CodePointTranslator; +import org.apache.commons.lang3.text.translate.EntityArrays; +import org.apache.commons.lang3.text.translate.LookupTranslator; +import org.apache.commons.lang3.text.translate.NumericEntityEscaper; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.pde.api.tools.internal.IApiXmlConstants; +import org.eclipse.pde.api.tools.internal.provisional.comparator.ApiComparator; +import org.eclipse.pde.api.tools.internal.provisional.comparator.DeltaProcessor; +import org.eclipse.pde.api.tools.internal.provisional.comparator.DeltaVisitor; +import org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta; +import org.eclipse.pde.api.tools.internal.util.Util; +import org.w3c.dom.Document; +import org.w3c.dom.Element; + +/** + * Copy of org.eclipse.pde.api.tools.internal.comparator.DeltaXmlVisitor that has a fix to escape xml special chars + * + * Delta visitor that generates XML for the delta. + * + * @since 1.0.0 + */ +public class SafeDeltaXmlVisitor extends DeltaVisitor { + /** + * XML doc being generated + */ + private Document fDoc; + + /** + * Top deltas element + */ + private Element fDeltas; + + /** + * Constructs a new visitor for the given component. + * + * @param component + * API component + * @throws CoreException + * if unable to construct the visitor + */ + public SafeDeltaXmlVisitor() throws CoreException { + fDoc = Util.newDocument(); + fDeltas = fDoc.createElement(IApiXmlConstants.DELTAS_ELEMENT_NAME); + fDoc.appendChild(fDeltas); + } + + @Override + public boolean visit(IDelta delta) { + if (delta == ApiComparator.NO_DELTA) { + return false; + } + if (delta.getChildren().length == 0) { + processLeafDelta(delta); + } + return true; + } + + protected void processLeafDelta(IDelta delta) { + Element deltaElement = fDoc.createElement(IApiXmlConstants.DELTA_ELEMENT_NAME); + deltaElement.setAttribute(IApiXmlConstants.ATTR_FLAGS, Integer.toString(delta.getFlags())); + deltaElement.setAttribute(IApiXmlConstants.ATTR_KIND, Util.getDeltaKindName(delta)); + deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_ELEMENT_TYPE, Util.getDeltaElementType(delta)); + deltaElement.setAttribute(IApiXmlConstants.ATTR_KEY, delta.getKey()); + String typeName = delta.getTypeName(); + if (typeName != null) { + deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_TYPE_NAME, typeName); + } + deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_COMPATIBLE, Boolean.toString(DeltaProcessor.isCompatible(delta))); + deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_OLD_MODIFIERS, Integer.toString(delta.getOldModifiers())); + deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_NEW_MODIFIERS, Integer.toString(delta.getNewModifiers())); + deltaElement.setAttribute(IApiXmlConstants.ATTR_RESTRICTIONS, Integer.toString(delta.getCurrentRestrictions())); + String apiComponentID = delta.getComponentVersionId(); + if (apiComponentID != null) { + deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_COMPONENT_ID, apiComponentID); + } + + deltaElement.setAttribute(IApiXmlConstants.ATTR_MESSAGE, ESCAPE_XML11.translate(delta.getMessage())); + String[] messageArguments = delta.getArguments(); + int length = messageArguments.length; + if (length > 0) { + Element messageArgumentsElement = fDoc.createElement(IApiXmlConstants.ELEMENT_DELTA_MESSAGE_ARGUMENTS); + for (int j = 0; j < length; j++) { + Element messageArgumentElement = fDoc.createElement(IApiXmlConstants.ELEMENT_DELTA_MESSAGE_ARGUMENT); + + messageArgumentElement.setAttribute(IApiXmlConstants.ATTR_VALUE, ESCAPE_XML11.translate(String.valueOf(messageArguments[j]))); + + messageArgumentsElement.appendChild(messageArgumentElement); + } + deltaElement.appendChild(messageArgumentsElement); + } + fDeltas.appendChild(deltaElement); + } + + public CharSequenceTranslator ESCAPE_XML11 = new AggregateTranslator( + new LookupTranslator(EntityArrays.BASIC_ESCAPE()), + new LookupTranslator(EntityArrays.APOS_ESCAPE()), + new LookupTranslator( + new String[][] { + { "\u0000", "" }, + { "\u000b", "" }, + { "\u000c", "" }, + { "\ufffe", "" }, + { "\uffff", "" } + }), + NumericEntityEscaper.between(0x1, 0x8), + NumericEntityEscaper.between(0xe, 0x1f), + NumericEntityEscaper.between(0x7f, 0x84), + NumericEntityEscaper.between(0x86, 0x9f), + new UnicodeUnpairedSurrogateRemover()); + + public class UnicodeUnpairedSurrogateRemover extends CodePointTranslator { + @Override + public boolean translate(final int codepoint, final Writer out) throws IOException { + if (codepoint <= Character.MAX_SURROGATE && codepoint >= Character.MIN_SURROGATE) { + return true; + } + return false; + } + } + + @Override + public void endVisit(IDelta delta) { + // nothing to do + } + + /** + * Returns the settings as a UTF-8 string containing XML. + * + * @return XML + * @throws CoreException + * if something goes wrong + */ + public String getXML() throws CoreException { + return Util.serializeDocument(fDoc); + } + + /** + * Return the xml dom document this visitor generates. Use {@link #getXML()} + * to get the serialized xml string. + * + * @return xml dom document + */ + public Document getDocument() { + return fDoc; + } +}
\ No newline at end of file diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/excludes.txt b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/excludes.txt new file mode 100644 index 00000000000..f5fcb90e69b --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/bundles/tests/apireport/excludes.txt @@ -0,0 +1,49 @@ +# +# Copyright (c) 2015 Christian W. Damus 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: +# Christian W. Damus - Initial API and implementation +# + +# +# Manifest of bundles and bundle-name patterns that are excluded +# from API Analysis. +# +# Patterns are Java-style regular expressions prefixed by "R:". +# (This is the file format used by PDE API Tools, so this file +# could be re-used if necessary in an Ant script). +# + +# Don't anaylyze non-Papyrus bundles +R:^(?!org\.eclipse\.papyrus\.).* + +# Don't analyze test bundles +R:.*\.tests?\b +R:.*\.junit?\b + +# Don't analyze developer bundles +org.eclipse.papyrus.dev.feature +org.eclipse.papyrus.codegen +org.eclipse.papyrus.def +org.eclipse.papyrus.dev.assistants.codegen +org.eclipse.papyrus.dev.java.utils +org.eclipse.papyrus.dev.project.management +org.eclipse.papyrus.developer.profile +org.eclipse.papyrus.domaincodegen.ui +org.eclipse.papyrus.domaincontextcodegen +org.eclipse.papyrus.domaincontextcodegen.edit +org.eclipse.papyrus.domaincontextcodegen.editor +org.eclipse.papyrus.elementtypesconfigurations.developer +org.eclipse.papyrus.gmf.editpartview +org.eclipse.papyrus.gmf.editpoliciesstates +org.eclipse.papyrus.gmf.figureview +org.eclipse.papyrus.gmfgenextension +org.eclipse.papyrus.infra.emf.commandstack +org.eclipse.papyrus.mwe2.utils +org.eclipse.papyrus.releng.tools +org.eclipse.papyrus.uml.developer.mde diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/internal/bundles/tests/PapyrusBundleDescription.java b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/internal/bundles/tests/PapyrusBundleDescription.java new file mode 100755 index 00000000000..4644c0196fa --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/internal/bundles/tests/PapyrusBundleDescription.java @@ -0,0 +1,364 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST 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: + * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.internal.bundles.tests; + +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.Platform; +import org.eclipse.osgi.util.NLS; +import org.eclipse.papyrus.bundles.tests.BundlesTests.Version; +import org.osgi.framework.Bundle; + +/** + * This class allows to parse the headers values of a bundle + * + * @since 1.3 + */ +public class PapyrusBundleDescription { + + /** + * the string required-bundle + */ + private static final String REQUIRE_BUNDLE = "Require-Bundle"; //$NON-NLS-1$ + + /** + * the string bundle version + */ + private static final String BUNDLE_VERSION = "bundle-version=";//$NON-NLS-1$ + + /** + * the string visibility reexport + */ + private static final String VISIBILITY_REEXPORT = "visibility:=reexport";//$NON-NLS-1$ + + /** + * the string resolution optional + */ + private static final String RESOLUTION_OPTIONAL = "resolution:=optional";//$NON-NLS-1$ + + /** + * the string installation greedy + */ + private static final String X_INSTALLATION_GREEDY = "x-installation:=greedy";//$NON-NLS-1$ + + + /** + * starting regex group string + */ + private static final String REGEX_START_GROUP = "(";//$NON-NLS-1$ + + /** + * ending regex group string + */ + private static final String REGEX_END_GROUP = ")";//$NON-NLS-1$ + + /** + * the regex string for optional char/group + */ + private static final String REGEX_OPTIONAL = "?";//$NON-NLS-1$ + + /** + * the separator used between properties of the require bundle field + */ + private static final String PROPERTY_SEPARATOR = ";";//$NON-NLS-1$ + + /** + * the regex group used to get a dependency name + */ + private static final String BUNDLE_NAME_REGEX_GROUP_1 = REGEX_START_GROUP + "[a-zA-Z0-9_\\.]*" + REGEX_END_GROUP; //$NON-NLS-1$ // this regex allows to match the name of the plugin + + /** + * the regex group used to get the dependency version range + */ + private static final String BUNDLE_VERSION_REGEX_GROUP_2 = REGEX_START_GROUP + PROPERTY_SEPARATOR + BUNDLE_VERSION + "\"[\\[\\(\\d\\.\\]\\),]*\"" + REGEX_END_GROUP; //$NON-NLS-1$ + + /** + * the regex group used to get the optional value of a dependency + */ + private static final String BUNDLE_OPTIONAL_REGEX_GROUP_3 = REGEX_START_GROUP + PROPERTY_SEPARATOR + RESOLUTION_OPTIONAL + REGEX_END_GROUP; + + /** + * the regrex group used to get the reexport value of a dependency + */ + private static final String BUNDLE_REEXPORT_REGEX_GROUP_4 = REGEX_START_GROUP + PROPERTY_SEPARATOR + VISIBILITY_REEXPORT + REGEX_END_GROUP; + + /** + * the regex group used to get the greedy value of a dependency + */ + private static final String BUNDLE_GREEDY_GROUP_5 = REGEX_START_GROUP + PROPERTY_SEPARATOR + X_INSTALLATION_GREEDY + REGEX_END_GROUP; + + + /** + * group matching on "," for next bundle, ";" for next property of the current bundle, and "nothing" for the end of the bundle list + */ + private static final String DEPENDENCY_SEPARATOR_REGEX_GROUP = REGEX_START_GROUP + "," + REGEX_END_GROUP; //$NON-NLS-1$ + + /** + * the regex used to parse the field {@link #REQUIRE_BUNDLE} in a manifest + */ + private static final Pattern PATTERN = Pattern.compile( + // the first group is the plugin name + BUNDLE_NAME_REGEX_GROUP_1 + // the second group is the version, optional + + BUNDLE_VERSION_REGEX_GROUP_2 + REGEX_OPTIONAL + // the third group is the optional information for bundle, optional + + BUNDLE_OPTIONAL_REGEX_GROUP_3 + REGEX_OPTIONAL + // the fourth group is the reexport, optional + + BUNDLE_REEXPORT_REGEX_GROUP_4 + REGEX_OPTIONAL + // the fifth group is the greedy value, optional + + BUNDLE_GREEDY_GROUP_5 + REGEX_OPTIONAL + // the end of the description of a bundle + + DEPENDENCY_SEPARATOR_REGEX_GROUP + "?");//$NON-NLS-1$ not here for the last dependency + + + /** + * the represented bundle + */ + private Bundle bundle; + + /** + * the list of the dependencies, with there version + */ + private Map<PapyrusBundleDescription, Version> dependencies; + + /** + * the list of the reexported dependencies + */ + private Set<PapyrusBundleDescription> reexportedDependencies; + + /** + * the list of the optional dependencies + */ + private Set<PapyrusBundleDescription> optionalDependencies; + + /** + * the list of the greedy dependencies + */ + private Set<PapyrusBundleDescription> greedyDependencies; + + /** + * + * Constructor. + * + * @param bundleName + * the name of the bundle to read + */ + public PapyrusBundleDescription(final String bundleName) { + this(Platform.getBundle(bundleName)); + + } + + /** + * + * Constructor. + * + * @param bundle + * the bundle to read + */ + private PapyrusBundleDescription(final Bundle bundle) { + Assert.isNotNull(bundle); + this.bundle = bundle; + } + + /** + * + * @return + * the collection of the dependencies for the current bundle + */ + public Collection<PapyrusBundleDescription> getDependencies() { + if (null == this.dependencies) { + initDependenciesFields(); + } + return new HashSet<>(this.dependencies.keySet()); + } + + /** + * + * @return + * the collection of the reexported dependencies for the current bundle + */ + public Collection<PapyrusBundleDescription> getReexportedDependencies() { + if (null == this.reexportedDependencies) { + initDependenciesFields(); + } + return new HashSet<>(this.reexportedDependencies); + } + + /** + * @return the collection of the optiona dependencies for the current bundle + */ + public Collection<PapyrusBundleDescription> getOptionalDependencies() { + if (null == this.optionalDependencies) { + initDependenciesFields(); + } + return new HashSet<>(this.optionalDependencies); + } + + /** + * @return the collection of the greedy dependencies for the current bundle + */ + public Collection<PapyrusBundleDescription> getGreedyDependencies() { + if (null == this.greedyDependencies) { + initDependenciesFields(); + } + return new HashSet<>(this.greedyDependencies); + } + + + + /** + * This method init the fields concerning the dependencies of the represented bundle + */ + private void initDependenciesFields() { + this.dependencies = new HashMap<>(); + this.reexportedDependencies = new HashSet<>(); + this.optionalDependencies = new HashSet<>(); + this.greedyDependencies = new HashSet<>(); + final String value = this.bundle.getHeaders().get(REQUIRE_BUNDLE); + final Matcher matcher = PATTERN.matcher(value); + while (matcher.find()) { + final String dependencyNameGroup1 = matcher.group(1); + final String versionGroup2 = matcher.group(2); + final String optionalGroup3 = matcher.group(3); + final String reexportGroup4 = matcher.group(4); + final String greedyGroup5 = matcher.group(5); + + if (null != dependencyNameGroup1 && !dependencyNameGroup1.isEmpty()) { + final PapyrusBundleDescription newContainer = PapyrusBundleDescriptionRegistry.INSTANCE.getPapyrusBundleDescription(dependencyNameGroup1); + if (null != versionGroup2 && !versionGroup2.isEmpty()) { + // to be notified if we meet a manifest where the current regex doesn't work + Assert.isTrue(versionGroup2.contains(BUNDLE_VERSION), NLS.bind("Please, fill a bug, the regex doesn't work for {0}.", this.bundle.getSymbolicName())); //$NON-NLS-1$ + String version = versionGroup2.replaceFirst(PROPERTY_SEPARATOR + BUNDLE_VERSION + "\"", ""); //$NON-NLS-1$ //$NON-NLS-2$ + version = version.substring(0, version.length() - 1); + dependencies.put(newContainer, new Version(versionGroup2)); + } else { + dependencies.put(newContainer, new Version(null)); + } + + if (null != optionalGroup3 && !optionalGroup3.isEmpty()) { + // to be notified if we meet a manifest where the current regex doesn't work + Assert.isTrue(optionalGroup3.contains(RESOLUTION_OPTIONAL), NLS.bind("Please, fill a bug, the regex doesn't work for {0}.", this.bundle.getSymbolicName())); //$NON-NLS-1$ + this.optionalDependencies.add(newContainer); + } + + if (null != reexportGroup4 && !reexportGroup4.isEmpty()) { + // to be notified if we meet a manifest where the current regex doesn't work + Assert.isTrue(reexportGroup4.contains(VISIBILITY_REEXPORT), NLS.bind("Please, fill a bug, the regex doesn't work for {0}.", this.bundle.getSymbolicName())); //$NON-NLS-1$ + this.reexportedDependencies.add(newContainer); + } + + + if (null != greedyGroup5 && !greedyGroup5.isEmpty()) { + // to be notified if we meet a manifest where the current regex doesn't work + Assert.isTrue(greedyGroup5.contains(X_INSTALLATION_GREEDY), NLS.bind("Please, fill a bug, the regex doesn't work for {0}.", this.bundle.getSymbolicName())); //$NON-NLS-1$ + this.greedyDependencies.add(newContainer); + } + } + } + } + + /** + * + * @param description + * a papyrus bundle description which should declared as dependency of the represented plugin + * @return + * the expected version range for this dependency, or <code>null</code> if the {@link PapyrusBundleDescription} is not a dependency of the current bundle + */ + public Version getRegisteredDependencyVersion(final PapyrusBundleDescription aDependency) { + Assert.isNotNull(aDependency); + if (!this.dependencies.containsKey(aDependency)) { + return null; + } + return this.dependencies.get(aDependency); + } + + /** + * + * @param dependencyName + * the name of an expected dependency + * @return + * the expected version range for this dependency, or <code>null</code> if the {@link PapyrusBundleDescription} is not a dependency of the current bundle + */ + public Version getRegisteredDependencyVersion(final String dependencyName) { + final PapyrusBundleDescription currentDesc = PapyrusBundleDescriptionRegistry.INSTANCE.getPapyrusBundleDescription(dependencyName); + if (null != currentDesc) { + return getRegisteredDependencyVersion(currentDesc); + } + return null; + } + + /** + * + * @return + * the name of the represented bundle + */ + public final String getBundleSymbolicName() { + return this.bundle.getSymbolicName(); + } + + /** + * + * @param coll + * a collection of {@link PapyrusBundleDescription} + * @return + * a set of string representing the {@link PapyrusBundleDescription} with their symbolic name + */ + public static final Set<String> asSymbolicNameSet(final Collection<PapyrusBundleDescription> coll) { + final Set<String> values = new HashSet<String>(); + for (PapyrusBundleDescription curr : coll) { + values.add(curr.getBundleSymbolicName()); + } + return values; + } + + /** + * + * @param dependencyName + * the name of a dependency + * @return + * <code>true</code> if the current bundle has a dependency on wanted bundle identified by its name + */ + public boolean hasDependencyOn(final String dependencyName) { + return hasDependencyOn(PapyrusBundleDescriptionRegistry.INSTANCE.getPapyrusBundleDescription(dependencyName)); + } + + /** + * + * @param aPossibleDependency + * a possible dependency + * @return + * <code>true</code> if the current bundle registers the argument as a dependency + */ + public boolean hasDependencyOn(final PapyrusBundleDescription aPossibleDependency) { + return this.dependencies.containsKey(aPossibleDependency); + } + + /** + * @see java.lang.Object#toString() + * + * @return + */ + @Override + public String toString() { + return "Represented bundle: " + this.bundle.getSymbolicName(); //$NON-NLS-1$ + } + +} diff --git a/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/internal/bundles/tests/PapyrusBundleDescriptionRegistry.java b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/internal/bundles/tests/PapyrusBundleDescriptionRegistry.java new file mode 100755 index 00000000000..c4ac11eb3c5 --- /dev/null +++ b/tests/junit/framework/org.eclipse.papyrus.bundles.tests/src/org/eclipse/papyrus/internal/bundles/tests/PapyrusBundleDescriptionRegistry.java @@ -0,0 +1,79 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.internal.bundles.tests; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.runtime.Platform; +import org.osgi.framework.Bundle; + +/** + * @author Vincent LORENZO + * @since 1.3 + */ +public final class PapyrusBundleDescriptionRegistry { + + /** + * a cache to avoid to load and parse several time the same bundle + */ + private final Map<String, PapyrusBundleDescription> loadedBundlesCache; + + /** + * the singleton of this class + */ + public static final PapyrusBundleDescriptionRegistry INSTANCE = new PapyrusBundleDescriptionRegistry(); + + /** + * + * @param bundleName + * the name of a bundle + * @return + * the {@link PapyrusBundleDescription} wrapping the {@link Bundle}, if exists, or <code>null</code> + */ + public final PapyrusBundleDescription getPapyrusBundleDescription(final String bundleName) { + if (null != bundleName) { + final Bundle bundle = Platform.getBundle(bundleName); + if (null != bundle) { + // ok the bundle exists + if (null == loadedBundlesCache.get(bundleName)) { + loadedBundlesCache.put(bundleName, new PapyrusBundleDescription(bundleName)); + } + return loadedBundlesCache.get(bundleName); + + } + } + return null; + } + + /** + * this method clear the registry + */ + public final void clearRegistry() { + this.loadedBundlesCache.clear(); + } + + /** + * + * Constructor. + * + */ + private PapyrusBundleDescriptionRegistry() { + // to prevent instanciation + loadedBundlesCache = new HashMap<String, PapyrusBundleDescription>(); + } + + + +} diff --git a/tests/junit/framework/pom.xml b/tests/junit/framework/pom.xml index f4bd75c8042..0b8f5b3be82 100755 --- a/tests/junit/framework/pom.xml +++ b/tests/junit/framework/pom.xml @@ -3,9 +3,9 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.eclipse.papyrus</groupId> - <artifactId>org.eclipse.papyrus.dev.releng</artifactId> - <version>3.0.0-SNAPSHOT</version> - <relativePath>../../../releng/dev/pom.xml</relativePath> + <artifactId>org.eclipse.papyrus.toolsmiths.releng</artifactId> + <version>1.0.0-SNAPSHOT</version> + <relativePath>../../../releng/toolsmiths/pom.xml</relativePath> </parent> <groupId>org.eclipse.papyrus.tests</groupId> <artifactId>org.eclipse.papyrus.tests.junit-framework</artifactId> @@ -16,6 +16,7 @@ <modules> <module>org.eclipse.papyrus.junit.framework</module> <module>org.eclipse.papyrus.junit.utils</module> + <module>org.eclipse.papyrus.bundles.tests</module> </modules> </project>
\ No newline at end of file |