diff options
author | Nicolas FAUVERGUE | 2019-04-16 15:45:16 +0000 |
---|---|---|
committer | Nicolas FAUVERGUE | 2019-04-19 09:05:55 +0000 |
commit | acd1d5a8e9be36ea4124203f744a56f94fc80651 (patch) | |
tree | 79fe4b05907fe0b48ca31e755956ef2c9526441f /tests/junit/plugins/toolsmiths | |
parent | 80489c2df8cb1d4e08accfbe79ceab6a3f031131 (diff) | |
download | org.eclipse.papyrus-acd1d5a8e9be36ea4124203f744a56f94fc80651.tar.gz org.eclipse.papyrus-acd1d5a8e9be36ea4124203f744a56f94fc80651.tar.xz org.eclipse.papyrus-acd1d5a8e9be36ea4124203f744a56f94fc80651.zip |
Bug 546239: [Toolsmiths][Validation] Plug-ins to validate profile
plug-in must be implemented
- Create tests for Profile plug-in validation (actually 73% code
coverage on oep.toolsmiths.validation.profile (handlers and testers not
tested) and 69% on oep.toolsmiths.validation.common (all utils methods
not all tested))
Change-Id: I65902fafdf6599684eb4b0344fa34503326377e4
Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@cea.fr>
Diffstat (limited to 'tests/junit/plugins/toolsmiths')
29 files changed, 1547 insertions, 0 deletions
diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.classpath b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.classpath new file mode 100644 index 00000000000..eca7bdba8f0 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.project b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.project new file mode 100644 index 00000000000..a5549993561 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.toolsmiths.validation.profile.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.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.settings/org.eclipse.core.resources.prefs b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000000..896a9a53a53 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.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/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.settings/org.eclipse.core.runtime.prefs b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 00000000000..5a0ad22d2a7 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..74c6d08d7e4 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,297 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +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/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..ba7542ef658 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,127 @@ +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 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +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 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\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> +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.settings/org.eclipse.pde.api.tools.prefs b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 00000000000..b2260f87129 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,104 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error +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=Warning +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning +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_FIELD=Warning +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=Warning +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=Warning +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_DEFAULT_METHOD=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 +changed_execution_env=Warning +eclipse.preferences.version=1 +incompatible_api_component_version=Warning +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +incompatible_api_component_version_report_major_without_breaking_change=Error +incompatible_api_component_version_report_minor_without_api_change=Error +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..a2881d21a31 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.papyrus.toolsmiths.validation.profile.tests;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.junit;bundle-version="[4.0.0,5.0.0)", + org.eclipse.uml2.uml;bundle-version="[5.3.0,6.0.0)", + org.eclipse.papyrus.junit.framework;bundle-version="[1.0.0,2.0.0)", + org.eclipse.papyrus.junit.utils;bundle-version="[2.0.0,3.0.0)", + org.eclipse.papyrus.toolsmiths.validation.profile;bundle-version="[1.0.0,2.0.0)", + org.eclipse.papyrus.toolsmiths.validation.common;bundle-version="[1.0.0,2.0.0)" +Bundle-Activator: org.eclipse.papyrus.toolsmiths.validation.profile.tests.Activator +Export-Package: org.eclipse.papyrus.toolsmiths.validation.profile.tests +Automatic-Module-Name: org.eclipse.papyrus.toolsmiths.validation.profile.tests +Bundle-Vendor: %providerName diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/about.html b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/about.html new file mode 100644 index 00000000000..ef2872f2845 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.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>November 30, 2017</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 2.0 ("EPL"). A copy of the EPL is available +at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</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>
\ No newline at end of file diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/build.properties b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/build.properties new file mode 100644 index 00000000000..9384875c8dd --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + resources/,\ + about.html +src.includes = about.html diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/plugin.properties b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/plugin.properties new file mode 100644 index 00000000000..b5e3071ffe4 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/plugin.properties @@ -0,0 +1,15 @@ +################################################################################# +# Copyright (c) 2019 CEA LIST. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +################################################################################## + +pluginName = Papyrus Profile Validation Test Plug-in +providerName = Eclipse Modeling Project +pluginDescription=This plug-in provides the validation for the Profile plug-ins test diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/pom.xml b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/pom.xml new file mode 100644 index 00000000000..fdcc19a8979 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/pom.xml @@ -0,0 +1,14 @@ +<?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.toolsmiths.tests.releng</artifactId> + <version>0.0.1-SNAPSHOT</version> + </parent> + <groupId>org.eclipse.papyrus.tests</groupId> + <artifactId>org.eclipse.papyrus.toolsmiths.validation.profile.tests</artifactId> + <version>1.0.0-SNAPSHOT</version> + <packaging>eclipse-test-plugin</packaging> +</project> diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/.classpath b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/.classpath new file mode 100644 index 00000000000..e7a4ca0c29c --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/.classpath @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src-gen"/> + <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"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/.project b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/.project new file mode 100644 index 00000000000..174f86b9cb3 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.toolsmiths.validation.profile.example</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..0c68a61dca8 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +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 diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/META-INF/MANIFEST.MF b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..452f3e6908b --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/META-INF/MANIFEST.MF @@ -0,0 +1,19 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.papyrus.toolsmiths.validation.profile.example;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: org.eclipse.papyrus.toolsmiths.validation.profile.example.Activator +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)", + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.uml2.types;visibility:=reexport, + org.eclipse.uml2.uml;visibility:=reexport +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: bookstore.BookStore, + bookstore.BookStore.impl, + bookstore.BookStore.util +Automatic-Module-Name: org.eclipse.papyrus.toolsmiths.validation.profile.example +Bundle-ActivationPolicy: lazy diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/build.properties b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/build.properties new file mode 100644 index 00000000000..6a503ea76e6 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/build.properties @@ -0,0 +1,19 @@ +# Copyright (c) 2019 CEA LIST. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + +bin.includes = .,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src +output.. = bin/ diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/plugin.properties b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/plugin.properties new file mode 100644 index 00000000000..6a2e8072a94 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/plugin.properties @@ -0,0 +1,14 @@ +# Copyright (c) 2019 CEA LIST. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + +pluginName = Profile Plug-in Validation Example +providerName = Eclipse Modeling Project diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/plugin.xml b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/plugin.xml new file mode 100644 index 00000000000..b99438d010f --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/plugin.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<!-- + Copyright (c) 2019 CEA LIST. + + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License 2.0 + which accompanies this distribution, and is available at + https://www.eclipse.org/legal/epl-2.0/ + + SPDX-License-Identifier: EPL-2.0 + + Contributors: + Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation +--> + +<plugin> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated bookstore.profile --> + <package + uri="http://www.eclipse.org/BookStore" + class="bookstore.BookStore.BookStorePackage" + genModel="resources/bookstore.profile.genmodel"/> + </extension> + +</plugin> diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/resources/bookstore.profile.di b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/resources/bookstore.profile.di new file mode 100644 index 00000000000..247ed5e3570 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/resources/bookstore.profile.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.uml.architecture.Profile"/> diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/resources/bookstore.profile.ecore b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/resources/bookstore.profile.ecore new file mode 100644 index 00000000000..5a12106794d --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/resources/bookstore.profile.ecore @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="BookStore" nsURI="http://www.eclipse.org/BookStore" nsPrefix="BookStore"> + <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML"> + <details key="originalName" value="bookstore"/> + </eAnnotations> + <eClassifiers xsi:type="ecore:EClass" name="Book"> + <eOperations name="addAuthor" ordered="false" lowerBound="1"> + <eParameters name="author" ordered="false" lowerBound="1" eType="#//Author"/> + </eOperations> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="author" lowerBound="1" + upperBound="-1" eType="#//Author" eOpposite="#//Author/book"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="date" ordered="false" lowerBound="1" + eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="editor" ordered="false" + upperBound="-1" eType="#//Editor" eOpposite="#//Editor/book"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="base_Class" ordered="false" + eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Class"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Author" eSuperTypes="#//Person"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="authorName" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="book" ordered="false" upperBound="-1" + eType="#//Book" eOpposite="#//Book/author"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Person"> + <eOperations name="isBirthday" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="firstName" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="lastName" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="birthDate" ordered="false" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="base_Class" ordered="false" + eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Class"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Editor" eSuperTypes="#//Person"> + <eStructuralFeatures xsi:type="ecore:EReference" name="book" ordered="false" upperBound="-1" + eType="#//Book" eOpposite="#//Book/editor"/> + </eClassifiers> +</ecore:EPackage> diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/resources/bookstore.profile.genmodel b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/resources/bookstore.profile.genmodel new file mode 100644 index 00000000000..45419f73c33 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/resources/bookstore.profile.genmodel @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:genmodel="http://www.eclipse.org/uml2/2.2.0/GenModel" + copyrightText="Copyright (c) 2019 CEA LIST.

All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/

SPDX-License-Identifier: EPL-2.0

Contributors:
 Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation" + modelDirectory="/org.eclipse.papyrus.toolsmiths.validation.profile.example/src-gen" + editDirectory="/org.eclipse.papyrus.toolsmiths.validation.profile.example.edit/src-gen" + editorDirectory="/org.eclipse.papyrus.toolsmiths.validation.profile.example.editor/src-gen" + modelPluginID="org.eclipse.papyrus.toolsmiths.validation.profile.example" modelName="Bookstore" + rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" testsDirectory="/org.eclipse.papyrus.toolsmiths.validation.profile.example.tests/src-gen" + importerID="org.eclipse.uml2.uml.ecore.importer" complianceLevel="8.0" copyrightFields="false" + usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.uml2.types/model/Types.genmodel#//types ../../org.eclipse.uml2.uml/model/UML.genmodel#//uml" + operationReflection="true" importOrganizing="true"> + <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/importer/org.eclipse.uml2.uml.ecore.importer"> + <details key="OPPOSITE_ROLE_NAMES" value="IGNORE"/> + <details key="DUPLICATE_FEATURES" value="DISCARD"/> + <details key="ANNOTATION_DETAILS" value="PROCESS"/> + <details key="PROPERTY_DEFAULT_EXPRESSIONS" value="IGNORE"/> + <details key="DUPLICATE_FEATURE_INHERITANCE" value="DISCARD"/> + <details key="COMMENTS" value="PROCESS"/> + <details key="DERIVED_FEATURES" value="PROCESS"/> + <details key="SUPER_CLASS_ORDER" value="PROCESS"/> + <details key="DUPLICATE_OPERATION_INHERITANCE" value="DISCARD"/> + <details key="REDEFINING_OPERATIONS" value="REPORT"/> + <details key="INVARIANT_CONSTRAINTS" value="PROCESS"/> + <details key="UNION_PROPERTIES" value="REPORT"/> + <details key="DUPLICATE_OPERATIONS" value="DISCARD"/> + <details key="NON_API_INVARIANTS" value="IGNORE"/> + <details key="CAMEL_CASE_NAMES" value="IGNORE"/> + <details key="SUBSETTING_PROPERTIES" value="REPORT"/> + <details key="OPERATION_BODIES" value="IGNORE"/> + <details key="ECORE_TAGGED_VALUES" value="PROCESS"/> + <details key="UNTYPED_PROPERTIES" value="REPORT"/> + <details key="REDEFINING_PROPERTIES" value="REPORT"/> + <details key="INVOCATION_DELEGATES" value="IGNORE"/> + <details key="VALIDATION_DELEGATES" value="IGNORE"/> + </genAnnotations> + <foreignModel>bookstore.profile.uml</foreignModel> + <genPackages xsi:type="genmodel:GenPackage" prefix="BookStore" basePackage="bookstore" + disposableProviderFactory="true" ecorePackage="bookstore.profile.ecore#/"> + <genClasses xsi:type="genmodel:GenClass" ecoreClass="bookstore.profile.ecore#//Book"> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute bookstore.profile.ecore#//Book/title"/> + <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false" + propertySortChoices="true" ecoreFeature="ecore:EReference bookstore.profile.ecore#//Book/author"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute bookstore.profile.ecore#//Book/date"/> + <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false" + propertySortChoices="true" ecoreFeature="ecore:EReference bookstore.profile.ecore#//Book/editor"/> + <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false" + propertySortChoices="true" ecoreFeature="ecore:EReference bookstore.profile.ecore#//Book/base_Class"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="bookstore.profile.ecore#//Book/addAuthor"> + <genParameters xsi:type="genmodel:GenParameter" ecoreParameter="bookstore.profile.ecore#//Book/addAuthor/author"/> + </genOperations> + </genClasses> + <genClasses xsi:type="genmodel:GenClass" ecoreClass="bookstore.profile.ecore#//Author"> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute bookstore.profile.ecore#//Author/authorName"/> + <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false" + propertySortChoices="true" ecoreFeature="ecore:EReference bookstore.profile.ecore#//Author/book"/> + </genClasses> + <genClasses xsi:type="genmodel:GenClass" ecoreClass="bookstore.profile.ecore#//Person"> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute bookstore.profile.ecore#//Person/firstName"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute bookstore.profile.ecore#//Person/lastName"/> + <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute bookstore.profile.ecore#//Person/birthDate"/> + <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false" + propertySortChoices="true" ecoreFeature="ecore:EReference bookstore.profile.ecore#//Person/base_Class"/> + <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="bookstore.profile.ecore#//Person/isBirthday"/> + </genClasses> + <genClasses xsi:type="genmodel:GenClass" ecoreClass="bookstore.profile.ecore#//Editor"> + <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false" + propertySortChoices="true" ecoreFeature="ecore:EReference bookstore.profile.ecore#//Editor/book"/> + </genClasses> + </genPackages> +</genmodel:GenModel> diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/resources/bookstore.profile.notation b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/resources/bookstore.profile.notation new file mode 100644 index 00000000000..a41e3bb018f --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/resources/bookstore.profile.notation @@ -0,0 +1,237 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_dbGbEGAeEemdSrdjx3ITmA" type="PapyrusUMLProfileDiagram" name="Profile Diagram" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_e7wVgGAeEemdSrdjx3ITmA" type="Stereotype_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_e7yKsGAeEemdSrdjx3ITmA" type="Stereotype_NameLabel"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_e7yKsWAeEemdSrdjx3ITmA" type="Stereotype_AttributeCompartment"> + <children xmi:type="notation:Shape" xmi:id="_mSboIGAeEemdSrdjx3ITmA" type="Property_ClassAttributeLabel"> + <element xmi:type="uml:Property" href="bookstore.profile.uml#_mSTsUGAeEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_mSboIWAeEemdSrdjx3ITmA"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_6IMRoGAeEemdSrdjx3ITmA" type="Property_ClassAttributeLabel"> + <element xmi:type="uml:Property" href="bookstore.profile.uml#_6IEV0GAeEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_6IMRoWAeEemdSrdjx3ITmA"/> + </children> + <styles xmi:type="notation:TitleStyle" xmi:id="_e7yKsmAeEemdSrdjx3ITmA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_e7yKs2AeEemdSrdjx3ITmA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_e7yKtGAeEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_e7yKtWAeEemdSrdjx3ITmA"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_e7yKtmAeEemdSrdjx3ITmA" type="Stereotype_OperationCompartment"> + <children xmi:type="notation:Shape" xmi:id="_MgbNMGAfEemdSrdjx3ITmA" type="Operation_ClassOperationLabel"> + <element xmi:type="uml:Operation" href="bookstore.profile.uml#_MgO_8GAfEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_MgbNMWAfEemdSrdjx3ITmA"/> + </children> + <styles xmi:type="notation:TitleStyle" xmi:id="_e7yKt2AeEemdSrdjx3ITmA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_e7yKuGAeEemdSrdjx3ITmA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_e7yKuWAeEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_e7yKumAeEemdSrdjx3ITmA"/> + </children> + <element xmi:type="uml:Stereotype" href="bookstore.profile.uml#_e7eBoGAeEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_e7wVgWAeEemdSrdjx3ITmA" x="120" y="260" width="241" height="121"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_ftk0AGAeEemdSrdjx3ITmA" type="Stereotype_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_ftmCIGAeEemdSrdjx3ITmA" type="Stereotype_NameLabel"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_ftmCIWAeEemdSrdjx3ITmA" type="Stereotype_AttributeCompartment"> + <children xmi:type="notation:Shape" xmi:id="_uWIt8GAgEemdSrdjx3ITmA" type="Property_ClassAttributeLabel"> + <element xmi:type="uml:Property" href="bookstore.profile.uml#_uV8gsGAgEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_uWIt8WAgEemdSrdjx3ITmA"/> + </children> + <styles xmi:type="notation:TitleStyle" xmi:id="_ftmCImAeEemdSrdjx3ITmA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_ftmCI2AeEemdSrdjx3ITmA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_ftmCJGAeEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ftmCJWAeEemdSrdjx3ITmA"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_ftmCJmAeEemdSrdjx3ITmA" type="Stereotype_OperationCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_ftmCJ2AeEemdSrdjx3ITmA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_ftmCKGAeEemdSrdjx3ITmA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_ftmCKWAeEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ftmCKmAeEemdSrdjx3ITmA"/> + </children> + <element xmi:type="uml:Stereotype" href="bookstore.profile.uml#_fti-0GAeEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ftk0AWAeEemdSrdjx3ITmA" x="560" y="260" width="201" height="121"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_098k4GAfEemdSrdjx3ITmA" type="Class_MetaclassShape"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_099zAGAfEemdSrdjx3ITmA" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_099zAWAfEemdSrdjx3ITmA" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_099zAmAfEemdSrdjx3ITmA" key="StereotypeList" value="StandardProfile::Metaclass"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_099zA2AfEemdSrdjx3ITmA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_099zBGAfEemdSrdjx3ITmA" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_099zBWAfEemdSrdjx3ITmA" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_099L8GAfEemdSrdjx3ITmA" type="Class_MetaclassNameLabel"/> + <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_099L8WAfEemdSrdjx3ITmA" x="120" y="60" width="241" height="81"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_ZpCMwGAgEemdSrdjx3ITmA" type="Stereotype_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_ZpCz0GAgEemdSrdjx3ITmA" type="Stereotype_NameLabel"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_ZpCz0WAgEemdSrdjx3ITmA" type="Stereotype_AttributeCompartment"> + <children xmi:type="notation:Shape" xmi:id="_sc6igGAgEemdSrdjx3ITmA" type="Property_ClassAttributeLabel"> + <element xmi:type="uml:Property" href="bookstore.profile.uml#_Ru9HkGAfEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_sc6igWAgEemdSrdjx3ITmA"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_sdETgGAgEemdSrdjx3ITmA" type="Property_ClassAttributeLabel"> + <element xmi:type="uml:Property" href="bookstore.profile.uml#_VnHE4GAfEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_sdETgWAgEemdSrdjx3ITmA"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_sdOrkGAgEemdSrdjx3ITmA" type="Property_ClassAttributeLabel"> + <element xmi:type="uml:Property" href="bookstore.profile.uml#_YDYTAGAfEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_sdOrkWAgEemdSrdjx3ITmA"/> + </children> + <styles xmi:type="notation:TitleStyle" xmi:id="_ZpCz0mAgEemdSrdjx3ITmA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_ZpCz02AgEemdSrdjx3ITmA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_ZpCz1GAgEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZpCz1WAgEemdSrdjx3ITmA"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_ZpCz1mAgEemdSrdjx3ITmA" type="Stereotype_OperationCompartment"> + <children xmi:type="notation:Shape" xmi:id="_tA2WAGAgEemdSrdjx3ITmA" type="Operation_ClassOperationLabel"> + <element xmi:type="uml:Operation" href="bookstore.profile.uml#_iLzUgGAfEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_tA2WAWAgEemdSrdjx3ITmA"/> + </children> + <styles xmi:type="notation:TitleStyle" xmi:id="_ZpCz12AgEemdSrdjx3ITmA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_ZpCz2GAgEemdSrdjx3ITmA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_ZpCz2WAgEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZpCz2mAgEemdSrdjx3ITmA"/> + </children> + <element xmi:type="uml:Stereotype" href="bookstore.profile.uml#_ZpAXkGAgEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZpCMwWAgEemdSrdjx3ITmA" x="740" y="40" width="201" height="141"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_8lIjQGAgEemdSrdjx3ITmA" type="Stereotype_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_8lIjQmAgEemdSrdjx3ITmA" type="Stereotype_NameLabel"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_8lIjQ2AgEemdSrdjx3ITmA" type="Stereotype_AttributeCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_8lIjRGAgEemdSrdjx3ITmA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_8lIjRWAgEemdSrdjx3ITmA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_8lIjRmAgEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8lIjR2AgEemdSrdjx3ITmA"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_8lIjSGAgEemdSrdjx3ITmA" type="Stereotype_OperationCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_8lIjSWAgEemdSrdjx3ITmA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_8lIjSmAgEemdSrdjx3ITmA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_8lIjS2AgEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8lIjTGAgEemdSrdjx3ITmA"/> + </children> + <element xmi:type="uml:Stereotype" href="bookstore.profile.uml#_8lHVIGAgEemdSrdjx3ITmA"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8lIjQWAgEemdSrdjx3ITmA" x="560" y="420" width="201" height="101"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_OI7Us2AiEemdSrdjx3ITmA" type="StereotypeComment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_OI7UtGAiEemdSrdjx3ITmA"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_OI7UtmAiEemdSrdjx3ITmA" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> + </styles> + <element xsi:nil="true"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OI7UtWAiEemdSrdjx3ITmA" x="320" y="60"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_dbGbEWAeEemdSrdjx3ITmA" name="diagram_compatibility_version" stringValue="1.4.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_dbGbEmAeEemdSrdjx3ITmA"/> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_dbGbE2AeEemdSrdjx3ITmA" diagramKindId="org.eclipse.papyrus.uml.diagram.profile"> + <owner xmi:type="uml:Profile" href="bookstore.profile.uml#_dZ2d4GAeEemdSrdjx3ITmA"/> + </styles> + <element xmi:type="uml:Profile" href="bookstore.profile.uml#_dZ2d4GAeEemdSrdjx3ITmA"/> + <edges xmi:type="notation:Connector" xmi:id="_t7S28GAeEemdSrdjx3ITmA" type="Association_Edge" source="_e7wVgGAeEemdSrdjx3ITmA" target="_ftk0AGAeEemdSrdjx3ITmA"> + <children xmi:type="notation:DecorationNode" xmi:id="_t7TeAGAeEemdSrdjx3ITmA" type="Association_StereotypeLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_HL3t4GAgEemdSrdjx3ITmA" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_t7TeAWAeEemdSrdjx3ITmA" y="60"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_t7UFEGAeEemdSrdjx3ITmA" type="Association_NameLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_HMCtAGAgEemdSrdjx3ITmA" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_t7UFEWAeEemdSrdjx3ITmA" y="20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_t7UFEmAeEemdSrdjx3ITmA" type="Association_TargetRoleLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_HMNsIGAgEemdSrdjx3ITmA" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_t7UFE2AeEemdSrdjx3ITmA" x="-30" y="20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_t7UFFGAeEemdSrdjx3ITmA" type="Association_SourceRoleLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_HMZ5YGAgEemdSrdjx3ITmA" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_t7UFFWAeEemdSrdjx3ITmA" x="29" y="-20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_t7UFFmAeEemdSrdjx3ITmA" type="Association_SourceMultiplicityLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_HMmGoGAgEemdSrdjx3ITmA" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_t7UFF2AeEemdSrdjx3ITmA" x="29" y="20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_t7UFGGAeEemdSrdjx3ITmA" type="Association_TargetMultiplicityLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_HMyT4GAgEemdSrdjx3ITmA" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_t7UFGWAeEemdSrdjx3ITmA" x="-30" y="-20"/> + </children> + <styles xmi:type="notation:FontStyle" xmi:id="_t7S28WAeEemdSrdjx3ITmA"/> + <element xmi:type="uml:Association" href="bookstore.profile.uml#_t69fwGAeEemdSrdjx3ITmA"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_t7S28mAeEemdSrdjx3ITmA" points="[361, 320, -643984, -643984]$[560, 320, -643984, -643984]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_t8Nc8GAeEemdSrdjx3ITmA" id="(1.0,0.49586776859504134)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_t8Nc8WAeEemdSrdjx3ITmA" id="(0.0,0.49586776859504134)"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_6_LHgGAfEemdSrdjx3ITmA" type="Extension_Edge" source="_e7wVgGAeEemdSrdjx3ITmA" target="_098k4GAfEemdSrdjx3ITmA"> + <styles xmi:type="notation:FontStyle" xmi:id="_6_LHgWAfEemdSrdjx3ITmA"/> + <element xmi:type="uml:Extension" href="bookstore.profile.uml#_6-vpsGAfEemdSrdjx3ITmA"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6_LHgmAfEemdSrdjx3ITmA" points="[240, 260, -643984, -643984]$[240, 141, -643984, -643984]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6_jiAGAfEemdSrdjx3ITmA" id="(0.4979253112033195,0.0)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6_jiAWAfEemdSrdjx3ITmA" id="(0.4979253112033195,1.0)"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_b4cqoGAgEemdSrdjx3ITmA" type="Generalization_Edge" source="_ftk0AGAeEemdSrdjx3ITmA" target="_ZpCMwGAgEemdSrdjx3ITmA"> + <children xmi:type="notation:DecorationNode" xmi:id="_b4dRsGAgEemdSrdjx3ITmA" type="Generalization_StereotypeLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_2mfakGAgEemdSrdjx3ITmA" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_b4dRsWAgEemdSrdjx3ITmA" y="60"/> + </children> + <styles xmi:type="notation:FontStyle" xmi:id="_b4cqoWAgEemdSrdjx3ITmA"/> + <element xmi:type="uml:Generalization" href="bookstore.profile.uml#_b4IhkGAgEemdSrdjx3ITmA"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_b4cqomAgEemdSrdjx3ITmA" points="[660, 260, -643984, -643984]$[660, 220, -643984, -643984]$[820, 220, -643984, -643984]$[820, 181, -643984, -643984]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_b44IcGAgEemdSrdjx3ITmA" id="(0.4975124378109453,0.0)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_b44IcWAgEemdSrdjx3ITmA" id="(0.39800995024875624,1.0)"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="__9owIGAgEemdSrdjx3ITmA" type="Generalization_Edge" source="_8lIjQGAgEemdSrdjx3ITmA" target="_ZpCMwGAgEemdSrdjx3ITmA"> + <children xmi:type="notation:DecorationNode" xmi:id="__9owI2AgEemdSrdjx3ITmA" type="Generalization_StereotypeLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_AW49oGAhEemdSrdjx3ITmA" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="__9owJGAgEemdSrdjx3ITmA" y="60"/> + </children> + <styles xmi:type="notation:FontStyle" xmi:id="__9owIWAgEemdSrdjx3ITmA"/> + <element xmi:type="uml:Generalization" href="bookstore.profile.uml#__9YRcGAgEemdSrdjx3ITmA"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="__9owImAgEemdSrdjx3ITmA" points="[660, 420, -643984, -643984]$[660, 400, -643984, -643984]$[860, 400, -643984, -643984]$[860, 181, -643984, -643984]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="__-BKoGAgEemdSrdjx3ITmA" id="(0.4975124378109453,0.0)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="__-BKoWAgEemdSrdjx3ITmA" id="(0.5970149253731343,1.0)"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_El4toGAhEemdSrdjx3ITmA" type="Association_Edge" source="_e7wVgGAeEemdSrdjx3ITmA" target="_8lIjQGAgEemdSrdjx3ITmA"> + <children xmi:type="notation:DecorationNode" xmi:id="_El4to2AhEemdSrdjx3ITmA" type="Association_StereotypeLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_E6u8QGAhEemdSrdjx3ITmA" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_El4tpGAhEemdSrdjx3ITmA" y="60"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_El4tpWAhEemdSrdjx3ITmA" type="Association_NameLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_E67JgGAhEemdSrdjx3ITmA" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_El4tpmAhEemdSrdjx3ITmA" y="20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_El4tp2AhEemdSrdjx3ITmA" type="Association_TargetRoleLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_E7GIoGAhEemdSrdjx3ITmA" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_El4tqGAhEemdSrdjx3ITmA" x="-51" y="20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_El4tqWAhEemdSrdjx3ITmA" type="Association_SourceRoleLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_E7P5oGAhEemdSrdjx3ITmA" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_El4tqmAhEemdSrdjx3ITmA" x="51" y="-20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_El4tq2AhEemdSrdjx3ITmA" type="Association_SourceMultiplicityLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_E7a4wGAhEemdSrdjx3ITmA" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_El4trGAhEemdSrdjx3ITmA" x="51" y="20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_El4trWAhEemdSrdjx3ITmA" type="Association_TargetMultiplicityLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_E7nGAGAhEemdSrdjx3ITmA" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_El4trmAhEemdSrdjx3ITmA" x="-51" y="-20"/> + </children> + <styles xmi:type="notation:FontStyle" xmi:id="_El4toWAhEemdSrdjx3ITmA"/> + <element xmi:type="uml:Association" href="bookstore.profile.uml#_ElmZwGAhEemdSrdjx3ITmA"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_El4tomAhEemdSrdjx3ITmA" points="[300, 381, -643984, -643984]$[300, 460, -643984, -643984]$[560, 460, -643984, -643984]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Encz4GAhEemdSrdjx3ITmA" id="(0.7468879668049793,1.0)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Encz4WAhEemdSrdjx3ITmA" id="(0.0,0.39603960396039606)"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_PoSEEGAhEemdSrdjx3ITmA" type="Extension_Edge" source="_ZpCMwGAgEemdSrdjx3ITmA" target="_098k4GAfEemdSrdjx3ITmA"> + <styles xmi:type="notation:FontStyle" xmi:id="_PoSEEWAhEemdSrdjx3ITmA"/> + <element xmi:type="uml:Extension" href="bookstore.profile.uml#_Pn63sGAhEemdSrdjx3ITmA"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PoSEEmAhEemdSrdjx3ITmA" points="[740, 100, -643984, -643984]$[361, 100, -643984, -643984]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PovXEGAhEemdSrdjx3ITmA" id="(0.0,0.425531914893617)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Pov-IGAhEemdSrdjx3ITmA" id="(1.0,0.49382716049382713)"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_OI7Ut2AiEemdSrdjx3ITmA" type="StereotypeCommentLink" source="_098k4GAfEemdSrdjx3ITmA" target="_OI7Us2AiEemdSrdjx3ITmA"> + <styles xmi:type="notation:FontStyle" xmi:id="_OI7UuGAiEemdSrdjx3ITmA"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_OI7UvGAiEemdSrdjx3ITmA" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> + </styles> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_OI7UuWAiEemdSrdjx3ITmA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OI7UumAiEemdSrdjx3ITmA"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OI7Uu2AiEemdSrdjx3ITmA"/> + </edges> +</notation:Diagram> diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/resources/bookstore.profile.uml b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/resources/bookstore.profile.uml new file mode 100644 index 00000000000..7fd21954c26 --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/resources/bookstore.profile.uml @@ -0,0 +1,161 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"> + <uml:Profile xmi:id="_dZ2d4GAeEemdSrdjx3ITmA" name="bookstore" metaclassReference="_097WwGAfEemdSrdjx3ITmA"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_qldcMGAhEemdSrdjx3ITmA" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_QYVykGAiEemdSrdjx3ITmA" source="PapyrusVersion"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QYVykWAiEemdSrdjx3ITmA" key="Version" value="0.0.0"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QYVykmAiEemdSrdjx3ITmA" key="Comment" value="<undefined>"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QYVyk2AiEemdSrdjx3ITmA" key="Copyright" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QYVylGAiEemdSrdjx3ITmA" key="Date" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QYVylWAiEemdSrdjx3ITmA" key="Author" value="<undefined>"/> + </eAnnotations> + <contents xmi:type="ecore:EPackage" xmi:id="_qleDQGAhEemdSrdjx3ITmA" name="bookstore" nsURI="http:///schemas/bookstore/_qlc1IGAhEemdSrdjx3ITmA/0" nsPrefix="bookstore"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_qlfRYmAhEemdSrdjx3ITmA" source="PapyrusVersion"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qlfRY2AhEemdSrdjx3ITmA" key="Version" value="0.0.1"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qlfRZGAhEemdSrdjx3ITmA" key="Comment" value="First draft of BookStore"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qlfRZWAhEemdSrdjx3ITmA" key="Copyright" value="Eclipse Modeling Project"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qlfRZmAhEemdSrdjx3ITmA" key="Date" value="2019-04-16"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qlfRZ2AhEemdSrdjx3ITmA" key="Author" value=""/> + </eAnnotations> + <eClassifiers xmi:type="ecore:EClass" xmi:id="_qleDQWAhEemdSrdjx3ITmA" name="Book"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_qleDQmAhEemdSrdjx3ITmA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_e7eBoGAeEemdSrdjx3ITmA"/> + <eOperations xmi:type="ecore:EOperation" xmi:id="_qleDQ2AhEemdSrdjx3ITmA" name="addAuthor" ordered="false" lowerBound="1"> + <eParameters xmi:type="ecore:EParameter" xmi:id="_qleDRGAhEemdSrdjx3ITmA" name="author" ordered="false" lowerBound="1" eType="_qleDUGAhEemdSrdjx3ITmA"/> + </eOperations> + <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_qleDRmAhEemdSrdjx3ITmA" name="title" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/5.0.0/Types#//String"/> + </eStructuralFeatures> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_qleDSGAhEemdSrdjx3ITmA" name="author" lowerBound="1" upperBound="-1" eType="_qleDUGAhEemdSrdjx3ITmA" eOpposite="_qleDVGAhEemdSrdjx3ITmA"/> + <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_qleDSmAhEemdSrdjx3ITmA" name="date" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/5.0.0/Types#//String"/> + </eStructuralFeatures> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_qleDTGAhEemdSrdjx3ITmA" name="editor" ordered="false" upperBound="-1" eType="_qleDY2AhEemdSrdjx3ITmA" eOpposite="_qleDZWAhEemdSrdjx3ITmA"/> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_qleDTmAhEemdSrdjx3ITmA" name="base_Class" ordered="false"> + <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xmi:type="ecore:EClass" xmi:id="_qleDUGAhEemdSrdjx3ITmA" name="Author" eSuperTypes="_qleDV2AhEemdSrdjx3ITmA"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_qleDUWAhEemdSrdjx3ITmA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_fti-0GAeEemdSrdjx3ITmA"/> + <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_qleDUmAhEemdSrdjx3ITmA" name="authorName" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/5.0.0/Types#//String"/> + </eStructuralFeatures> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_qleDVGAhEemdSrdjx3ITmA" name="book" ordered="false" upperBound="-1" eType="_qleDQWAhEemdSrdjx3ITmA" eOpposite="_qleDSGAhEemdSrdjx3ITmA"/> + </eClassifiers> + <eClassifiers xmi:type="ecore:EClass" xmi:id="_qleDV2AhEemdSrdjx3ITmA" name="Person"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_qleDWGAhEemdSrdjx3ITmA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_ZpAXkGAgEemdSrdjx3ITmA"/> + <eOperations xmi:type="ecore:EOperation" xmi:id="_qleDWWAhEemdSrdjx3ITmA" name="isBirthday" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/5.0.0/Types#//Boolean"/> + </eOperations> + <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_qleDW2AhEemdSrdjx3ITmA" name="firstName" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/5.0.0/Types#//String"/> + </eStructuralFeatures> + <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_qleDXWAhEemdSrdjx3ITmA" name="lastName" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/5.0.0/Types#//String"/> + </eStructuralFeatures> + <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_qleDX2AhEemdSrdjx3ITmA" name="birthDate" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/5.0.0/Types#//String"/> + </eStructuralFeatures> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_qleDYWAhEemdSrdjx3ITmA" name="base_Class" ordered="false"> + <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xmi:type="ecore:EClass" xmi:id="_qleDY2AhEemdSrdjx3ITmA" name="Editor" eSuperTypes="_qleDV2AhEemdSrdjx3ITmA"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_qleDZGAhEemdSrdjx3ITmA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_8lHVIGAgEemdSrdjx3ITmA"/> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_qleDZWAhEemdSrdjx3ITmA" name="book" ordered="false" upperBound="-1" eType="_qleDQWAhEemdSrdjx3ITmA" eOpposite="_qleDTGAhEemdSrdjx3ITmA"/> + </eClassifiers> + </contents> + </eAnnotations> + <elementImport xmi:type="uml:ElementImport" xmi:id="_097WwGAfEemdSrdjx3ITmA" alias="Class"> + <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> + </elementImport> + <packageImport xmi:type="uml:PackageImport" xmi:id="_dgkJ4GAeEemdSrdjx3ITmA"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packageImport xmi:type="uml:PackageImport" xmi:id="_dgkJ4WAeEemdSrdjx3ITmA"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Stereotype" xmi:id="_e7eBoGAeEemdSrdjx3ITmA" name="Book"> + <ownedAttribute xmi:type="uml:Property" xmi:id="_mSTsUGAeEemdSrdjx3ITmA" name="title" visibility="private"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + </ownedAttribute> + <ownedAttribute xmi:type="uml:Property" xmi:id="_t7GCoGAeEemdSrdjx3ITmA" name="author" visibility="public" type="_fti-0GAeEemdSrdjx3ITmA" isOrdered="true" association="_t69fwGAeEemdSrdjx3ITmA"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_vTeK0GAeEemdSrdjx3ITmA" value="1"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_vToi4GAeEemdSrdjx3ITmA" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:type="uml:Property" xmi:id="_6IEV0GAeEemdSrdjx3ITmA" name="date" visibility="private"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + </ownedAttribute> + <ownedAttribute xmi:type="uml:Property" xmi:id="_Elnn4GAhEemdSrdjx3ITmA" name="editor" visibility="public" type="_8lHVIGAgEemdSrdjx3ITmA" association="_ElmZwGAhEemdSrdjx3ITmA"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_GXeAAGAhEemdSrdjx3ITmA"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_GXsCcGAhEemdSrdjx3ITmA" value="*"/> + </ownedAttribute> + <ownedAttribute xmi:type="uml:Property" xmi:id="_6-ytAGAfEemdSrdjx3ITmA" name="base_Class" association="_6-vpsGAfEemdSrdjx3ITmA"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_6-ytAWAfEemdSrdjx3ITmA"/> + </ownedAttribute> + <ownedOperation xmi:type="uml:Operation" xmi:id="_MgO_8GAfEemdSrdjx3ITmA" name="addAuthor"> + <ownedParameter xmi:type="uml:Parameter" xmi:id="_O7W-kGAfEemdSrdjx3ITmA" name="author" type="_fti-0GAeEemdSrdjx3ITmA"/> + </ownedOperation> + </packagedElement> + <packagedElement xmi:type="uml:Stereotype" xmi:id="_fti-0GAeEemdSrdjx3ITmA" name="Author"> + <generalization xmi:type="uml:Generalization" xmi:id="_b4IhkGAgEemdSrdjx3ITmA" general="_ZpAXkGAgEemdSrdjx3ITmA"/> + <ownedAttribute xmi:type="uml:Property" xmi:id="_uV8gsGAgEemdSrdjx3ITmA" name="authorName" visibility="private"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + </ownedAttribute> + <ownedAttribute xmi:type="uml:Property" xmi:id="_t7H30GAeEemdSrdjx3ITmA" name="book" visibility="public" type="_e7eBoGAeEemdSrdjx3ITmA" association="_t69fwGAeEemdSrdjx3ITmA"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_KIjhcGAgEemdSrdjx3ITmA"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_KIwVwGAgEemdSrdjx3ITmA" value="*"/> + </ownedAttribute> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_t69fwGAeEemdSrdjx3ITmA" memberEnd="_t7GCoGAeEemdSrdjx3ITmA _t7H30GAeEemdSrdjx3ITmA"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_t7C_UGAeEemdSrdjx3ITmA" source="org.eclipse.papyrus"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_t7DmYGAeEemdSrdjx3ITmA" key="nature" value="UML_Nature"/> + </eAnnotations> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_6-vpsGAfEemdSrdjx3ITmA" name="E_Book_Class7" memberEnd="_6-yF8GAfEemdSrdjx3ITmA _6-ytAGAfEemdSrdjx3ITmA"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_6-yF8GAfEemdSrdjx3ITmA" name="extension_Book" type="_e7eBoGAeEemdSrdjx3ITmA" aggregation="composite" association="_6-vpsGAfEemdSrdjx3ITmA"/> + </packagedElement> + <packagedElement xmi:type="uml:Stereotype" xmi:id="_ZpAXkGAgEemdSrdjx3ITmA" name="Person"> + <ownedAttribute xmi:type="uml:Property" xmi:id="_Ru9HkGAfEemdSrdjx3ITmA" name="firstName" visibility="private"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + </ownedAttribute> + <ownedAttribute xmi:type="uml:Property" xmi:id="_VnHE4GAfEemdSrdjx3ITmA" name="lastName" visibility="private"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + </ownedAttribute> + <ownedAttribute xmi:type="uml:Property" xmi:id="_YDYTAGAfEemdSrdjx3ITmA" name="birthDate" visibility="private"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/> + </ownedAttribute> + <ownedAttribute xmi:type="uml:Property" xmi:id="_Pn8s4GAhEemdSrdjx3ITmA" name="base_Class" association="_Pn63sGAhEemdSrdjx3ITmA"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_Pn8s4WAhEemdSrdjx3ITmA"/> + </ownedAttribute> + <ownedOperation xmi:type="uml:Operation" xmi:id="_iLzUgGAfEemdSrdjx3ITmA" name="isBirthday"> + <ownedParameter xmi:type="uml:Parameter" xmi:id="_mzJ6IGAfEemdSrdjx3ITmA" name="return" direction="return"> + <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/> + </ownedParameter> + </ownedOperation> + </packagedElement> + <packagedElement xmi:type="uml:Stereotype" xmi:id="_8lHVIGAgEemdSrdjx3ITmA" name="Editor"> + <generalization xmi:type="uml:Generalization" xmi:id="__9YRcGAgEemdSrdjx3ITmA" general="_ZpAXkGAgEemdSrdjx3ITmA"/> + <ownedAttribute xmi:type="uml:Property" xmi:id="_Elnn4WAhEemdSrdjx3ITmA" name="book" visibility="public" type="_e7eBoGAeEemdSrdjx3ITmA" association="_ElmZwGAhEemdSrdjx3ITmA"> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_HDkRAGAhEemdSrdjx3ITmA"/> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_HD62UGAhEemdSrdjx3ITmA" value="*"/> + </ownedAttribute> + </packagedElement> + <packagedElement xmi:type="uml:Association" xmi:id="_ElmZwGAhEemdSrdjx3ITmA" memberEnd="_Elnn4GAhEemdSrdjx3ITmA _Elnn4WAhEemdSrdjx3ITmA"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ElnA0GAhEemdSrdjx3ITmA" source="org.eclipse.papyrus"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ElnA0WAhEemdSrdjx3ITmA" key="nature" value="UML_Nature"/> + </eAnnotations> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_Pn63sGAhEemdSrdjx3ITmA" name="E_Person_Class11" memberEnd="_Pn8F0GAhEemdSrdjx3ITmA _Pn8s4GAhEemdSrdjx3ITmA"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_Pn8F0GAhEemdSrdjx3ITmA" name="extension_Person" type="_ZpAXkGAgEemdSrdjx3ITmA" aggregation="composite" association="_Pn63sGAhEemdSrdjx3ITmA"/> + </packagedElement> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_QYVLgGAiEemdSrdjx3ITmA"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_QYXnwGAiEemdSrdjx3ITmA" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/> + </profileApplication> + </uml:Profile> + <Ecore:EPackage xmi:id="_Q-wSUGAiEemdSrdjx3ITmA" base_Package="_dZ2d4GAeEemdSrdjx3ITmA" packageName="BookStore" nsPrefix="BookStore" nsURI="http://www.eclipse.org/BookStore" basePackage="bookstore" prefix="BookStore"/> +</xmi:XMI> diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/src/org/eclipse/papyrus/toolsmiths/validation/profile/example/Activator.java b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/src/org/eclipse/papyrus/toolsmiths/validation/profile/example/Activator.java new file mode 100644 index 00000000000..a2f968631cb --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/resources/org.eclipse.papyrus.toolsmiths.validation.profile.example/src/org/eclipse/papyrus/toolsmiths/validation/profile/example/Activator.java @@ -0,0 +1,22 @@ +package org.eclipse.papyrus.toolsmiths.validation.profile.example; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + } + + public void stop(BundleContext bundleContext) throws Exception { + Activator.context = null; + } + +} diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/src/org/eclipse/papyrus/toolsmiths/validation/profile/tests/Activator.java b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/src/org/eclipse/papyrus/toolsmiths/validation/profile/tests/Activator.java new file mode 100644 index 00000000000..7973491648a --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/src/org/eclipse/papyrus/toolsmiths/validation/profile/tests/Activator.java @@ -0,0 +1,76 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST, and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.toolsmiths.validation.profile.tests; + +import org.eclipse.papyrus.infra.core.log.LogHelper; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * Activator + */ +public class Activator extends AbstractUIPlugin { + + /** + * The plug-in ID + */ + public static final String PLUGIN_ID = "org.eclipse.papyrus.toolsmiths.validation.profile.tests"; //$NON-NLS-1$ + + + /** + * The shared instance + */ + private static Activator plugin; + + /** + * The log + */ + public static LogHelper log; + + /** + * The constructor + */ + public Activator() { + } + + /** + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + log = new LogHelper(this); + } + + /** + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/src/org/eclipse/papyrus/toolsmiths/validation/profile/tests/AllTests.java b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/src/org/eclipse/papyrus/toolsmiths/validation/profile/tests/AllTests.java new file mode 100644 index 00000000000..a73214ec93f --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/src/org/eclipse/papyrus/toolsmiths/validation/profile/tests/AllTests.java @@ -0,0 +1,29 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST, and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.toolsmiths.validation.profile.tests; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +/** + * All tests for Profile plug-in validation + */ +@RunWith(Suite.class) +@SuiteClasses({ ProfilePluginValidationTest.class +}) +public class AllTests { + +} diff --git a/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/src/org/eclipse/papyrus/toolsmiths/validation/profile/tests/ProfilePluginValidationTest.java b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/src/org/eclipse/papyrus/toolsmiths/validation/profile/tests/ProfilePluginValidationTest.java new file mode 100644 index 00000000000..5238006842b --- /dev/null +++ b/tests/junit/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.validation.profile.tests/src/org/eclipse/papyrus/toolsmiths/validation/profile/tests/ProfilePluginValidationTest.java @@ -0,0 +1,135 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST, and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.toolsmiths.validation.profile.tests; + +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest; +import org.eclipse.papyrus.junit.utils.rules.ProjectFixture; +import org.eclipse.papyrus.toolsmiths.validation.profile.checkers.ProfilePluginCheckerService; +import org.eclipse.papyrus.toolsmiths.validation.profile.constants.ProfilePluginValidationConstants; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; + +/** + * This class allows to test the profile plug-in validation. + * This will check the markers resulting from a failing profile plug-in definition. + */ +public class ProfilePluginValidationTest extends AbstractPapyrusTest { + + /** + * The plug-in path to copy into the project fixture + */ + private static final String PLUGIN_PATH = "resources/org.eclipse.papyrus.toolsmiths.validation.profile.example";//$NON-NLS-1$ + + /** + * The severity attribute identifier. + */ + private static final String SEVERITY_ID = "severity"; //$NON-NLS-1$ + + /** + * The project fixture to manage easily the project. + */ + @Rule + public final ProjectFixture fixture = new ProjectFixture(); + + /** + * This allows to copy the project into the fixture project. + */ + @Before + public void init() { + try { + fixture.copyFolder(ProfilePluginValidationTest.class, PLUGIN_PATH); + } catch (IOException e) { + Assert.fail("Error while copying project"); //$NON-NLS-1$ + } + } + + /** + * This allows to test the profile plug-in validation. + */ + @Test + public void testProfilePluginValidation() { + // First, run the validation + ProfilePluginCheckerService.checkProfilePlugin(fixture.getProject()); + + // Get the markers + List<IMarker> markers = null; + try { + markers = Arrays.asList(fixture.getProject().findMarkers(ProfilePluginValidationConstants.PROFILE_PLUGIN_VALIDATION_TYPE, true, IResource.DEPTH_INFINITE)); + } catch (CoreException e) { + Assert.fail("Error with resource"); //$NON-NLS-1$ + } + + // Now check the markers + Assert.assertNotNull("The markers have to be found", markers); //$NON-NLS-1$ + Assert.assertEquals("The number of markers is not correct", 5, markers.size()); //$NON-NLS-1$ + + // Check the profile.uml markers + final List<IMarker> profileFileMarkers = markers.stream().filter(marker -> marker.getResource().getFullPath().toString().endsWith("bookstore.profile.uml")).collect(Collectors.toList()); //$NON-NLS-1$ + Assert.assertNotNull("Profile file markers are not found", profileFileMarkers); //$NON-NLS-1$ + Assert.assertEquals("The number of markers for profile file is not correct", 1, profileFileMarkers.size()); //$NON-NLS-1$ + Assert.assertTrue("The severity of profile marker is not correct", isMarkerSeverity(profileFileMarkers.get(0), IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ + + // Check the dependencies markers + final List<IMarker> manifestMarkers = markers.stream().filter(marker -> marker.getResource().getFullPath().toString().endsWith("MANIFEST.MF")).collect(Collectors.toList()); //$NON-NLS-1$ + Assert.assertNotNull("Dependencies markers are not found", manifestMarkers); //$NON-NLS-1$ + Assert.assertEquals("The number of markers for dependencies is not correct", 1, manifestMarkers.size()); //$NON-NLS-1$ + Assert.assertTrue("The severity of profile marker is not correct", isMarkerSeverity(manifestMarkers.get(0), IMarker.SEVERITY_WARNING)); //$NON-NLS-1$ + + // Check the build markers + final List<IMarker> buildMarkers = markers.stream().filter(marker -> marker.getResource().getFullPath().toString().endsWith("build.properties")).collect(Collectors.toList()); //$NON-NLS-1$ + Assert.assertNotNull("Build markers are not found", buildMarkers); //$NON-NLS-1$ + Assert.assertEquals("The number of markers for build is not correct", 1, buildMarkers.size()); //$NON-NLS-1$ + Assert.assertTrue("The severity of profile marker is not correct", isMarkerSeverity(buildMarkers.get(0), IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ + + // Check the extensions markers + final List<IMarker> extensionsMarkers = markers.stream().filter(marker -> marker.getResource().getFullPath().toString().endsWith("plugin.xml")).collect(Collectors.toList()); //$NON-NLS-1$ + Assert.assertNotNull("Extensions markers are not found", extensionsMarkers); //$NON-NLS-1$ + Assert.assertEquals("The number of markers for extensions is not correct", 2, extensionsMarkers.size()); //$NON-NLS-1$ + final List<IMarker> warningExtensionsMarkers = extensionsMarkers.stream().filter(marker -> isMarkerSeverity(marker, IMarker.SEVERITY_WARNING)).collect(Collectors.toList()); + Assert.assertEquals("The number of warning markers for extensions is not correct", 1, warningExtensionsMarkers.size()); //$NON-NLS-1$ + final List<IMarker> errorExtensionsMarkers = extensionsMarkers.stream().filter(marker -> isMarkerSeverity(marker, IMarker.SEVERITY_ERROR)).collect(Collectors.toList()); + Assert.assertEquals("The number of error markers for extensions is not correct", 1, errorExtensionsMarkers.size()); //$NON-NLS-1$ + + } + + /** + * This allows to determinate if a marker got the correct severity. + * + * @param marker + * the marker. + * @param severity + * The severity to get. + * @return <code>true</code> if the marker got the correct severity, <code>false</code> otherwise. + */ + private boolean isMarkerSeverity(final IMarker marker, final int severity) { + try { + return severity == (int) marker.getAttribute(SEVERITY_ID); + } catch (CoreException e) { + Assert.fail("Error while getting " + SEVERITY_ID); //$NON-NLS-1$ + return false; + } + } + +}
\ No newline at end of file diff --git a/tests/junit/plugins/toolsmiths/pom.xml b/tests/junit/plugins/toolsmiths/pom.xml index 9e37a918c74..7fe8c66c431 100755 --- a/tests/junit/plugins/toolsmiths/pom.xml +++ b/tests/junit/plugins/toolsmiths/pom.xml @@ -19,6 +19,7 @@ <module>org.eclipse.papyrus.toolsmiths.suite.tests</module> <module>org.eclipse.papyrus.toolsmiths.profilemigration.tests</module> + <module>org.eclipse.papyrus.toolsmiths.validation.profile.tests</module> </modules> </project> |