Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2017-04-20 12:29:55 -0400
committerGerrit Code Review @ Eclipse.org2017-04-28 11:11:57 -0400
commitdd82bec9a46a6a8a48ac59e365fc15160a130905 (patch)
tree3fbfe67566d298c0df804c2d33c2ddb6e0d4fa89 /plugins/developer
parent510aa9bc9580e39be4f820c0a2218e30e3d75b41 (diff)
downloadorg.eclipse.papyrus-dd82bec9a46a6a8a48ac59e365fc15160a130905.tar.gz
org.eclipse.papyrus-dd82bec9a46a6a8a48ac59e365fc15160a130905.tar.xz
org.eclipse.papyrus-dd82bec9a46a6a8a48ac59e365fc15160a130905.zip
Bug 515535: [Interoperability] Move common plugins into papyrus main git
https://bugs.eclipse.org/bugs/show_bug.cgi?id=515535 Add the interoperability common plugins into papyrus main git. Those ones are renamed as: - oep.uml.m2m.qvto.common - oep.uml.m2m.qvto.common.blackboxes - oep.uml.m2m.qvto.tests.tools Change-Id: Id17c4fd0e57a5c063c1b4a4e79d833c744f3f61e Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@cea.fr>
Diffstat (limited to 'plugins/developer')
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.classpath7
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.gitignore1
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.project28
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.settings/org.eclipse.pde.api.tools.prefs98
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/META-INF/MANIFEST.MF20
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/OSGI-INF/l10n/bundle.properties3
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/about.html28
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/build.properties7
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/pom.xml15
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/Activator.java81
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/AbstractImportModelTests.java833
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/EMFCompareUtils.java125
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/PapyrusProximityEObjectMatcher.java493
-rw-r--r--plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/UMLIgnoringIdentifiedEqualityHelper.java161
-rw-r--r--plugins/developer/pom.xml1
17 files changed, 2260 insertions, 0 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.classpath b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.classpath
new file mode 100644
index 00000000000..eca7bdba8f0
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.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/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.gitignore b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.gitignore
new file mode 100644
index 00000000000..ae3c1726048
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.project b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.project
new file mode 100644
index 00000000000..1b37c2cac47
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.m2m.qvto.tests.tools</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/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.settings/org.eclipse.jdt.core.prefs b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..b3aa6d60f94
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.settings/org.eclipse.jdt.ui.prefs b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..954281dbc31
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.settings/org.eclipse.pde.api.tools.prefs b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 00000000000..23fb95e120f
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/META-INF/MANIFEST.MF b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..1540d898abc
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.uml.m2m.qvto.tests.tools;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: %Bundle-Vendor
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.core.commands;bundle-version="[3.9.0,4.0.0)",
+ org.eclipse.papyrus.uml.m2m.qvto.common;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.13.0,3.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.2.0,6.0.0)",
+ org.eclipse.papyrus.junit.utils;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.emf.compare;bundle-version="[3.3.0,4.0.0)",
+ com.google.guava;bundle-version="21.0.0"
+Bundle-Activator: org.eclipse.papyrus.uml.m2m.qvto.tests.tools.Activator
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.uml.m2m.qvto.tests.tools,
+ org.eclipse.papyrus.uml.m2m.qvto.tests.tools.tests
diff --git a/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/OSGI-INF/l10n/bundle.properties b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 00000000000..9f304ccecb3
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.m2m.qvto.tests.tools.
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus UML M2M QvTo Tools for Tests \ No newline at end of file
diff --git a/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/about.html b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/about.html
new file mode 100644
index 00000000000..dd3c089a94c
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/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 14, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/build.properties b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/build.properties
new file mode 100644
index 00000000000..04fa2df494f
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ OSGI-INF/l10n/bundle.properties
+src.includes = about.html
diff --git a/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/pom.xml b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/pom.xml
new file mode 100644
index 00000000000..2e728b79258
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/pom.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.developer</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.uml.m2m.qvto.tests.tools</artifactId>
+ <description>Papyrus Model to Model with QvTo tools help methods for tests</description>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/Activator.java b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/Activator.java
new file mode 100644
index 00000000000..c6cfafa89a2
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/Activator.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and Others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent LORENZO (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.m2m.qvto.tests.tools;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+
+ /**
+ * The plug-in ID.
+ */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.m2m.qvto.tests.tools"; //$NON-NLS-1$
+
+ /**
+ * The shared instance.
+ */
+ private static Activator plugin;
+
+ /**
+ * The log helper.
+ */
+ public static LogHelper log;
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return The shared instance.
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(final BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(final BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+}
diff --git a/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/AbstractImportModelTests.java b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/AbstractImportModelTests.java
new file mode 100644
index 00000000000..e7cb9f51aba
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/AbstractImportModelTests.java
@@ -0,0 +1,833 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent LORENZO (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.m2m.qvto.tests.tools.tests;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.eclipse.core.internal.jobs.Worker;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.compare.Comparison;
+import org.eclipse.emf.compare.Conflict;
+import org.eclipse.emf.compare.Diff;
+import org.eclipse.emf.compare.scope.DefaultComparisonScope;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.DisplayUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
+import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture;
+import org.eclipse.papyrus.uml.m2m.qvto.common.MigrationParameters.MigrationParametersFactory;
+import org.eclipse.papyrus.uml.m2m.qvto.common.MigrationParameters.ThreadConfig;
+import org.eclipse.papyrus.uml.m2m.qvto.common.transformation.AbstractImportTransformationLauncher;
+import org.eclipse.papyrus.uml.m2m.qvto.tests.tools.Activator;
+import org.eclipse.uml2.uml.Package;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import com.google.common.io.Files;
+
+/**
+ * Abstract class used to test the import model into Papyrus.
+ */
+@SuppressWarnings({ "nls", "restriction" })
+public abstract class AbstractImportModelTests extends AbstractPapyrusTest {
+
+ /**
+ * Relative path for some interesting folder to check .
+ */
+ protected static final String XMI_ID_ATTRIBUTE_NAME = "xmi:id"; // $NON-NLS-0$
+
+
+ /**
+ * The files to import in Papyrus.
+ */
+ protected Set<IFile> filesToImport = new HashSet<IFile>();
+
+ /**
+ * The Papyrus editor fixture used to load the expected model.
+ */
+ @Rule
+ public final ModelSetFixture expectedResultFixture = new ModelSetFixture();
+
+ /**
+ * This resource set contains the files created by the transformation
+ */
+ protected final ResourceSet resultingResourceSet = new ResourceSetImpl();
+
+ /**
+ * The di resource created by the import.
+ */
+ protected Resource diResource = null;
+
+ /**
+ * The notation resource created by the import.
+ */
+ protected Resource notationResource = null;
+
+ /**
+ * The uml resource created by the import.
+ */
+ protected Resource umlResource = null;
+
+ /**
+ * The created project used for the tests.
+ */
+ protected IProject project;
+
+ /**
+ * The model name to import.
+ */
+ protected String modelName;
+
+ /**
+ * The resource path.
+ */
+ protected String resourcePath;
+
+ /**
+ * The created UML File.
+ */
+ protected IFile outputUmlFile = null;
+
+ /**
+ * The created notation File.
+ */
+ protected IFile outputNotationFile = null;
+
+ /**
+ * The created di File.
+ */
+ protected IFile outputDiFile = null;
+
+ /**
+ * The launcher of the import transformation.
+ */
+ protected AbstractImportTransformationLauncher launcher;
+
+
+ /**
+ * This method allows to create the project.
+ *
+ * @param projectName
+ * The name of the project to create for the JUnit test.
+ * @param modelName
+ * The model name to import.
+ * @param sourceExtension
+ * The extension of the file to transform.
+ * @param resourcePath
+ * The path where are stored the file to copy/load to execute the tests.
+ * @param bundle
+ * The current bundle.
+ * @throws CoreException
+ * The core exception.
+ * @throws IOException
+ * The input/output file exception.
+ * @throws URISyntaxException
+ * The URI syntax exception.
+ *
+ */
+ public void initTest(final String projectName, final String modelName, final String sourceExtension, final String resourcePath, final Bundle bundle) throws CoreException, IOException, URISyntaxException {
+ this.modelName = modelName;
+ this.project = ProjectUtils.createProject(projectName);
+
+ importModelIntoProject(modelName, resourcePath, sourceExtension, bundle, this.project);
+ executeTransformation(this.filesToImport);
+ DisplayUtils.flushEventLoop();
+ waitEndOfImportThread();
+ DisplayUtils.flushEventLoop();
+ initOutputIFilesFields();
+ }
+
+ /**
+ * This allows to initialize output files fields.
+ */
+ protected void initOutputIFilesFields() {
+ if (null == this.outputUmlFile) {
+ this.outputUmlFile = checkUMLFileCreationAndGetIt();
+ }
+ if (null == this.outputNotationFile) {
+ this.outputNotationFile = checkNotationFileCreationAndGetIt();
+ }
+ if (null == this.outputDiFile) {
+ this.outputDiFile = checkDiFileCreationAndGetIt();
+ }
+ }
+
+ /**
+ * This allows to initialize output resources fields.
+ */
+ protected void initOutputResourcesFields() {
+ initOutputIFilesFields();
+ if (null == this.umlResource) {
+ this.umlResource = addFileToResourceSet(resultingResourceSet, outputUmlFile);
+ }
+ if (null == this.notationResource) {
+ this.notationResource = addFileToResourceSet(resultingResourceSet, outputNotationFile);
+ }
+ if (null == this.diResource) {
+ this.diResource = addFileToResourceSet(resultingResourceSet, outputDiFile);
+ }
+ }
+
+ /**
+ * This method import the project into the workspace.
+ *
+ * @param modelName
+ * The model name.
+ * @param sourcePath
+ * The source path of the file to transform.
+ * @param sourceExtension
+ * The source extension of the file to transform.
+ * @param sourceBundle
+ * The source bundle.
+ * @param targetProject
+ * The target project.
+ * @throws URISyntaxException
+ * The URI syntax exception.
+ * @throws IOException
+ * The input/output file exception.
+ */
+ public final void importModelIntoProject(final String modelName, final String sourcePath, final String sourceExtension, final Bundle sourceBundle, final IProject targetProject) throws URISyntaxException, IOException {
+ // TODO improve all this path with url, uri, string, ... emf URI will be a good solution
+ final String currentPath = sourcePath + modelName + "." + sourceExtension;
+ final URL url = sourceBundle.getResource(currentPath);
+ final java.net.URI uri = FileLocator.resolve(url).toURI();
+ final URI currentURI = copyOldProjectToNewFolder(URI.createFileURI(uri.getRawPath()), URI.createFileURI(targetProject.getLocationURI().getRawPath()));
+ try {
+ this.project.refreshLocal(IProject.DEPTH_INFINITE, new NullProgressMonitor());
+ } catch (final CoreException e) {
+ Activator.log.error(e);
+ }
+ final IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ final IPath location = Path.fromOSString(currentURI.toFileString());
+ final IFile ifile = workspace.getRoot().getFileForLocation(location);
+ filesToImport.add(ifile);
+ }
+
+ /**
+ * This allows to copy the project to transform in a new folder.
+ *
+ * @param initialProjectURI
+ * the initial project URI.
+ * @param newPath
+ * The new URI path of the project.
+ * @return The URI of the main model to transform.
+ */
+ protected URI copyOldProjectToNewFolder(final URI initialProjectURI, final URI newPath) {
+ final URI uri = initialProjectURI.trimSegments(1);// to get the parent folder
+ final File projectFolder = new File(uri.toFileString());
+ final List<File> duplicatedFile = new ArrayList<File>();
+ if (projectFolder.exists() && projectFolder.isDirectory()) {
+ for (final File subFile : projectFolder.listFiles()) {
+ duplicatedFile.addAll(copyFile(subFile, newPath));
+ }
+ }
+ for (final File current : duplicatedFile) {
+ final URI newURI = URI.createFileURI(current.getPath());
+ if (isNeededSourceExtension(newURI.fileExtension())) {
+ return newURI;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * This allows to check if the file extension is the needed one for the source file.
+ *
+ * @param fileExtension
+ * The current file extension.
+ * @return <code>true</code> if the file extension is the needed one, <code>false</code> otherwise.
+ */
+ protected boolean isNeededSourceExtension(final String fileExtension) {
+ return "uml".equals(fileExtension);
+ }
+
+ /**
+ * This method copy a file to a given path. The File can be a directory. In this case, we create it in the new path with its contents
+ *
+ * @param src
+ * the source file (can be a directory
+ * @param target
+ * the target path for the copied file
+ * @return
+ * the file of copied file (useful in case of folder
+ */
+ public List<File> copyFile(final File src, final URI target) {
+ final List<File> duplicatedFile = new ArrayList<File>();
+ URI copiedFileURI = URI.createFileURI(target.devicePath());
+ copiedFileURI = copiedFileURI.appendSegment(src.getName());
+ if (src.isDirectory()) {
+ final File folder = new File(copiedFileURI.devicePath());
+ folder.mkdir();
+ for (final File f : src.listFiles()) {
+ duplicatedFile.addAll(copyFile(f, copiedFileURI));
+ }
+ } else {
+ final File newFile = new File(copiedFileURI.devicePath());
+ try {
+ Files.copy(src, newFile);
+ duplicatedFile.add(newFile);
+ } catch (final IOException e) {
+ Activator.log.error(e);
+ }
+ }
+ return duplicatedFile;
+ }
+
+ /**
+ * This allows to execute the transformation for the files in parameter.
+ *
+ * @param files
+ * The list of file to import.
+ */
+ protected void executeTransformation(final Set<IFile> files) {
+ final List<URI> urisToImport = new ArrayList<URI>();
+ for (final IFile current : files) {
+ String path = null;
+ if (current instanceof IFile) {
+ path = ((IFile) current).getFullPath().toString();
+ }
+ if (null != path) {
+ final URI uri = URI.createPlatformResourceURI(path, true);
+ urisToImport.add(uri);
+ }
+ }
+
+ final ThreadConfig config = MigrationParametersFactory.eINSTANCE.createThreadConfig();
+ launcher = createLauncher(config);
+ launcher.run(urisToImport);
+ }
+
+ /**
+ * This allows to create the launcher for the QvTo transformation.
+ *
+ * @param config
+ * The ThreadConfig.
+ * @return The created launcher.
+ */
+ public abstract AbstractImportTransformationLauncher createLauncher(final ThreadConfig config);
+
+ /**
+ * This allows to check if the UML file is correctly created with the transformation and return it.
+ *
+ * @return
+ * The uml file created by the QVTO transformation if it exists.
+ */
+ protected IFile checkUMLFileCreationAndGetIt() {
+ String outputFolder = getOutputFolder(); // TODO output folder must be a parameter of the transformation, it could be a project too
+ if (!outputFolder.isEmpty() && !outputFolder.endsWith(File.separator)) {
+ outputFolder = outputFolder + File.separator;
+ }
+ final IFile umlFile = project.getFile(outputFolder + getOutputModelName() + ".uml");
+ try {
+ umlFile.getProject().refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ } catch (CoreException e) {
+ Activator.log.error(e);
+ }
+ Assert.assertTrue("The uml file has not been created: " + umlFile.getFullPath(), umlFile.exists());
+ return umlFile;
+ }
+
+ /**
+ * This allows to check if the Notation file is correctly created with the transformation and return it.
+ *
+ * @return
+ * The notation file created by the QVTO transformation if it exists.
+ */
+ protected IFile checkNotationFileCreationAndGetIt() {
+ String outputFolder = getOutputFolder(); // TODO output folder must be a parameter of the transformation, it could be a project too
+ if (!outputFolder.isEmpty() && !outputFolder.endsWith(File.separator)) {
+ outputFolder = outputFolder + File.separator;
+ }
+ final IFile notationFile = project.getFile(outputFolder + getOutputModelName() + ".notation");
+ Assert.assertTrue("The notation file has not been created: " + notationFile.getFullPath(), notationFile.exists());
+
+ return notationFile;
+ }
+
+ /**
+ * This allows to check if the Di file is correctly created with the transformation and return it.
+ *
+ * @return
+ * The Di file created by the QVTO transformation if it exists.
+ */
+ protected IFile checkDiFileCreationAndGetIt() {
+ String outputFolder = getOutputFolder(); // TODO output folder must be a parameter of the transformation, it could be a project too
+ if (!outputFolder.isEmpty() && !outputFolder.endsWith(File.separator)) {
+ outputFolder = outputFolder + File.separator;
+ }
+ final IFile diFile = project.getFile(outputFolder + getOutputModelName() + ".di");
+ Assert.assertTrue("The di file has not been created: " + diFile.getFullPath(), diFile.exists());
+ return diFile;
+ }
+
+ /**
+ * This allows to get the output folder of the transformation.
+ *
+ * @return The output folder of the transformation.
+ */
+ protected String getOutputFolder() {
+ return "";
+ }
+
+ /**
+ * This allows to get the name of the created output model.
+ *
+ * @return The name of the created output model.
+ */
+ protected String getOutputModelName() {
+ return modelName;
+ }
+
+ /**
+ * This method allows to wait the end of the import thread.
+ * TODO : refactore API to have a direct access to the import thread!
+ */
+ protected void waitEndOfImportThread() {
+ Set<Thread> threads = Thread.getAllStackTraces().keySet();
+ for (Thread thread : threads) {
+ if (thread instanceof Worker) {
+ Job job = ((Worker) thread).currentJob();
+ if (null != job) {
+ if (job.getName().equals(AbstractImportTransformationLauncher.IMPORT_MODELS_JOB_NAME)) {
+ try {
+ job.join();
+ } catch (final InterruptedException e1) {
+ Activator.log.error(e1);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This allows to add a file to the current resource set.
+ *
+ * @param resourceSet
+ * The resource set.
+ * @param fileToAdd
+ * The file to add to the resource set.
+ * @return
+ * The resource represented the added file.
+ */
+ protected Resource addFileToResourceSet(final ResourceSet resourceSet, final IFile fileToAdd) {
+ final String path = fileToAdd.getFullPath().toPortableString();
+ final URI uri = URI.createURI(path);
+ boolean exist = resourceSet.getURIConverter().exists(uri, null);
+ Assert.assertTrue(exist);
+ return resourceSet.getResource(uri, true);
+ }
+
+ /**
+ * This allows to check the transformed UML model.
+ */
+ @Test
+ public void checkTransformedUMLModel() {
+ initOutputResourcesFields();
+ Assert.assertTrue("The created uml resource is empty.", this.umlResource.getContents().size() > 0); //$NON-NLS-1$
+ final Iterator<EObject> iter = this.umlResource.getContents().iterator();
+ Package root = null;
+ while (null == root && iter.hasNext()) {
+ final EObject tmp = iter.next();
+ if (tmp instanceof Package) {
+ root = (Package) tmp;
+ }
+ }
+ Assert.assertNotNull("The root of the imported model has not been found", root); //$NON-NLS-1$
+
+ checkUMLModelSpecificities(root);
+ }
+
+ /**
+ * This allows to check the transformed notation model.
+ */
+ @Test
+ public void checkTransformedNotationModel() {
+ initOutputResourcesFields();
+ Assert.assertTrue("The created notation resource is empty.", this.notationResource.getContents().size() > 0); //$NON-NLS-1$
+ for (final EObject current : this.notationResource.getContents()) {
+ if (current instanceof Diagram) {
+ checkNotationElementSpecificities((Diagram) current);
+ } else if (current instanceof Table) {
+ checkNotationElementSpecificities((Table) current);
+ }
+ }
+ }
+
+ /**
+ * This allows to check the specificities on the UML Model transformation.
+ *
+ * @param rootPackage
+ * The root UML Package.
+ */
+ protected abstract void checkUMLModelSpecificities(final Package rootPackage);
+
+ /**
+ * This allows to check the specificities on the notation elements (Diagrams and Tables).
+ *
+ * @param notationElement
+ * The root notation element.
+ */
+ protected abstract void checkNotationElementSpecificities(final EModelElement notationElement);
+
+
+ /**
+ * This method allows to check the created UML Model with the expected one.
+ */
+ @Test
+ public void checkSemanticWithEMFCompare() {
+ initOutputResourcesFields();
+ final ResourceSet resultSet = new ResourceSetImpl();
+ Resource currentResultResource = resultSet.getResource(this.umlResource.getURI(), true);
+ List<EObject> currentContents = new ArrayList<EObject>(currentResultResource.getContents());
+ currentContents.sort(new XMIIDSorter());
+ currentResultResource.getContents().clear();
+ currentResultResource.getContents().addAll(currentContents);
+
+ final ResourceSet expectedSet = new ResourceSetImpl();
+ Resource expectedResource = expectedSet.getResource(expectedResultFixture.getModelResource().getURI(), true);
+ List<EObject> expectedContents = new ArrayList<EObject>(expectedResource.getContents());
+ expectedContents.sort(new XMIIDSorter());
+ expectedResource.getContents().clear();
+ expectedResource.getContents().addAll(expectedContents);
+
+ final DefaultComparisonScope scope = new DefaultComparisonScope(resultSet, expectedSet, null);
+ final Comparison result = EMFCompareUtils.createEMFCompare().compare(scope);
+ final List<Conflict> conflicts = result.getConflicts();
+ Assert.assertEquals("Conflicts have been detected", 0, conflicts.size()); //$NON-NLS-1$
+
+ final List<Diff> differences = getFilteredDiffForUMLModel(new ArrayList<Diff>(result.getDifferences()));
+
+ if (!differences.isEmpty()) {
+ final StringBuilder builder = new StringBuilder(NLS.bind("{0} differences have been detected: \n", differences.size())); //$NON-NLS-1$
+ final Iterator<Diff> iter = differences.iterator();
+ while (iter.hasNext()) {
+ final Diff current = iter.next();
+ builder.append(current.toString());
+ if (iter.hasNext()) {
+ builder.append("\n"); //$NON-NLS-1$
+ }
+ }
+ Assert.assertEquals(builder.toString(), 0, differences.size());
+ }
+ }
+
+ /**
+ * This allows to manage the filtered differences for the UML Model. Some can be removed because they will not be equals.
+ *
+ * @param diff
+ * The initial list of differences.
+ * @return The list of differences to check.
+ */
+ protected List<Diff> getFilteredDiffForUMLModel(final List<Diff> diff) {
+ return diff;
+ }
+
+ /**
+ * This method allows to check the created Notation Model with the expected one.
+ */
+ @Test
+ public void checkNotationWithEMFCompare() {
+ if (compareNotation()) {
+ initOutputResourcesFields();
+ final ResourceSet resultSet = new ResourceSetImpl();
+ resultSet.getResource(this.umlResource.getURI(), true);
+ resultSet.getResource(this.notationResource.getURI(), true);
+
+ final ResourceSet expectedSet = new ResourceSetImpl();
+
+ expectedSet.getResource(expectedResultFixture.getModelResource().getURI(), true);
+ expectedSet.getResource(expectedResultFixture.getModelResource().getURI().trimFileExtension().appendFileExtension("notation"), true);
+
+ final DefaultComparisonScope scope = new DefaultComparisonScope(resultSet, expectedSet, null);
+ final Comparison result = EMFCompareUtils.createEMFCompare().compare(scope);
+ final List<Conflict> conflicts = result.getConflicts();
+ Assert.assertEquals("Conflicts have been detected", 0, conflicts.size()); //$NON-NLS-1$
+
+ final List<Diff> differences = getFilteredDiffForNotationModel(new ArrayList<Diff>(result.getDifferences()));
+ if (!differences.isEmpty()) {
+ final StringBuilder builder = new StringBuilder(NLS.bind("{0} differences have been detected: \n", differences.size())); //$NON-NLS-1$
+ final Iterator<Diff> iter = differences.iterator();
+ while (iter.hasNext()) {
+ final Diff current = iter.next();
+ builder.append(current.toString());
+ if (iter.hasNext()) {
+ builder.append("\n"); //$NON-NLS-1$
+ }
+ }
+ Assert.assertEquals(builder.toString(), 0, differences.size());
+ }
+ }
+ }
+
+ /**
+ * This allows to determinate if the notation file must be compared.
+ *
+ * @return <code>true</code> if the notation file must be compared, <code>false</code> otherwise.
+ */
+ protected boolean compareNotation() {
+ return true;
+ }
+
+ /**
+ * This allows to manage the filtered differences for the Notation Model. Some can be removed because they will not be equals.
+ *
+ * @param diff
+ * The initial list of differences.
+ * @return The list of differences to check.
+ */
+ protected List<Diff> getFilteredDiffForNotationModel(final List<Diff> diff) {
+ return diff;
+ }
+
+ /**
+ * Checks that the XMI_ID are unique in the uml file.
+ *
+ * @throws Exception
+ * The caught exception.
+ */
+ @Test
+ public void checkUnicityOfXMIIDInUMLFile() throws Exception {
+ final DocumentBuilder dBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ final Document document = dBuilder.parse(getUMLOutputFile());
+ final List<String> ids = new ArrayList<String>();
+ final List<Node> nodes = flattenDocument(document);
+ for (final Node node : nodes) {
+ if (null != node.getAttributes()) {
+ final Node item = node.getAttributes().getNamedItem(XMI_ID_ATTRIBUTE_NAME);
+ if (null != item) {
+ final String value = item.getNodeValue();
+ ids.add(value);
+ }
+ }
+ }
+ final Set<String> uniqueIds = new HashSet<>(ids);
+ for (final String t : uniqueIds) {
+ // remove all method remove all instance, so it can't be used here
+ ids.remove(t);
+ }
+ Assert.assertEquals("Some ids are duplicated in the UML model: " + ids.toString(), 0, ids.size());
+ }
+
+ /**
+ * Checks that the XMI_ID are unique in the notation file.
+ *
+ * @throws Exception
+ * The caught exception.
+ */
+ @Test
+ public void checkUnicityOfXMIIDInNotationFile() throws Exception {
+ final DocumentBuilder dBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ final Document document = dBuilder.parse(getNotationOutputFile());
+ final List<String> ids = new ArrayList<String>();
+ final List<Node> nodes = flattenDocument(document);
+ for (final Node node : nodes) {
+ if (null != node.getAttributes()) {
+ Node item = node.getAttributes().getNamedItem(XMI_ID_ATTRIBUTE_NAME);
+ if (null != item) {
+ final String value = item.getNodeValue();
+ ids.add(value);
+ }
+ }
+ }
+ final Set<String> uniqueIds = new HashSet<>(ids);
+ for (final String t : uniqueIds) {
+ // remove all method remove all instance, so it can't be used here
+ ids.remove(t);
+ }
+ Assert.assertEquals("Some ids are duplicated in the Notation model: " + ids.toString(), 0, ids.size());
+ }
+
+ /**
+ * This allows to check if all the UML elements have XMI_ID.
+ *
+ * @throws Exception
+ * The caught exception.
+ */
+ @Test
+ public void checkAllElementInUMLFileHaveAnID() throws Exception {
+ final DocumentBuilder dBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ final Document document = dBuilder.parse(getUMLOutputFile());
+ final List<String> ids = new ArrayList<String>();
+ final List<Node> nodes = flattenDocument(document);
+ for (final Node node : nodes) {
+ if (null != node.getAttributes()) {
+ final Node item = node.getAttributes().getNamedItem(XMI_ID_ATTRIBUTE_NAME);
+ if (null != item) {
+ final String value = item.getNodeValue();
+ ids.add(value);
+ }
+ }
+ }
+ int nbElements = 0;
+
+ // Here we need to load the umlResource to know how elements there are in the model.
+ // it can fail if several elements have the same IDs and incompatible type
+ initOutputResourcesFields();
+ final Iterator<EObject> iter = this.umlResource.getAllContents();
+ while (iter.hasNext()) {
+ iter.next();
+ nbElements++;
+ }
+ Assert.assertEquals("I don't found the same number of XMI_ID than the number of element in the file", nbElements, ids.size());
+
+ }
+
+ /**
+ * This allows to check if all the notation elements have XMI_ID.
+ *
+ * @throws Exception
+ * The caught exception.
+ */
+ @Test
+ public void checkAllElementInNotationFileHaveAnID() throws Exception {
+ final DocumentBuilder dBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ final Document document = dBuilder.parse(getNotationOutputFile());
+ final List<String> ids = new ArrayList<String>();
+ final List<Node> nodes = flattenDocument(document);
+ for (final Node node : nodes) {
+ if (null != node.getAttributes()) {
+ final Node item = node.getAttributes().getNamedItem(XMI_ID_ATTRIBUTE_NAME);
+ if (null != item) {
+ final String value = item.getNodeValue();
+ ids.add(value);
+ }
+ }
+ }
+ int nbElements = 0;
+
+ // here we need to load the umlResource to know how elements there are in the model.
+ // it can fail if several elements have the same IDs and incompatible type
+ initOutputResourcesFields();
+ final Iterator<EObject> iter = this.notationResource.getAllContents();
+ while (iter.hasNext()) {
+ iter.next();
+ nbElements++;
+ }
+ Assert.assertEquals("I don't found the same number of XMI_ID than the number of element in the file", nbElements, ids.size());
+
+ }
+
+ /**
+ * This allows to get the document children as list.
+ *
+ * @param document
+ * The document.
+ * @return
+ * All the nodes of the document.
+ */
+ public List<Node> flattenDocument(final Document document) {
+ return getAllChildren(document.getChildNodes());
+ }
+
+ /**
+ * This allows to get the node's children as list.
+ *
+ * @param nodeList
+ * The node list.
+ * @return
+ * All nodes and sub-nodes of the node list.
+ */
+ public List<Node> getAllChildren(final NodeList nodeList) {
+ final List<Node> objects = new ArrayList<>();
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ final Node node = nodeList.item(i);
+ objects.add(node);
+ objects.addAll(getAllChildren(node.getChildNodes()));
+ }
+ return objects;
+ }
+
+ /**
+ * Get the UML output file.
+ *
+ * @return
+ * The UML output file.
+ */
+ protected File getUMLOutputFile() {
+ final IPath path = this.outputUmlFile.getRawLocation();
+ final File file = path.toFile();
+ return file;
+ }
+
+ /**
+ * Get the Notation output file.
+ *
+ * @return
+ * The Notation output file.
+ */
+ protected File getNotationOutputFile() {
+ final IPath path = this.outputNotationFile.getRawLocation();
+ final File file = path.toFile();
+ return file;
+ }
+
+ /**
+ * This class allows to sort the XMI ID of objects.
+ */
+ public class XMIIDSorter implements Comparator<EObject> {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public int compare(final EObject o1, final EObject o2) {
+ final XMIResource res1 = (XMIResource) o1.eResource();
+ final XMIResource res2 = (XMIResource) o2.eResource();
+ final String id1 = res1.getID(o1);
+ final String id2 = res2.getID(o2);
+ return id1.compareTo(id2);
+ }
+
+ }
+}
diff --git a/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/EMFCompareUtils.java b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/EMFCompareUtils.java
new file mode 100644
index 00000000000..cd701682f0c
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/EMFCompareUtils.java
@@ -0,0 +1,125 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent LORENZO (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.m2m.qvto.tests.tools.tests;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.compare.EMFCompare;
+import org.eclipse.emf.compare.diff.DefaultDiffEngine;
+import org.eclipse.emf.compare.diff.DiffBuilder;
+import org.eclipse.emf.compare.diff.FeatureFilter;
+import org.eclipse.emf.compare.diff.IDiffEngine;
+import org.eclipse.emf.compare.diff.IDiffProcessor;
+import org.eclipse.emf.compare.match.DefaultComparisonFactory;
+import org.eclipse.emf.compare.match.DefaultEqualityHelperFactory;
+import org.eclipse.emf.compare.match.DefaultMatchEngine;
+import org.eclipse.emf.compare.match.IComparisonFactory;
+import org.eclipse.emf.compare.match.IEqualityHelperFactory;
+import org.eclipse.emf.compare.match.IMatchEngine;
+import org.eclipse.emf.compare.match.eobject.IEObjectMatcher;
+import org.eclipse.emf.compare.match.eobject.WeightProviderDescriptorRegistryImpl;
+import org.eclipse.emf.compare.match.impl.MatchEngineFactoryImpl;
+import org.eclipse.emf.compare.match.impl.MatchEngineFactoryRegistryImpl;
+import org.eclipse.emf.compare.utils.EqualityHelper;
+import org.eclipse.emf.compare.utils.IEqualityHelper;
+import org.eclipse.emf.compare.utils.UseIdentifiers;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+
+import com.google.common.cache.LoadingCache;
+
+/**
+ * The utils for the EMF Compare engine.
+ */
+public class EMFCompareUtils {
+
+ /**
+ * This allows to create the EMF compare element for the JUnit tests.
+ *
+ * @returnThe created EMF Compare element.
+ */
+ public static final EMFCompare createEMFCompare() {
+ // testing equality helper
+
+ // we override the equality helper to be able to match some objects which didn't match with the default one
+ final IEqualityHelperFactory helperFactory = new DefaultEqualityHelperFactory();
+ final IComparisonFactory comparisonFactory = new DefaultComparisonFactory(helperFactory);
+
+ // we override the DiffEngine to ignore differences for non ordered feature
+ final IDiffProcessor diffProcessor = new DiffBuilder();
+ final IDiffEngine diffEngine = createDiffEngineIgnoringNonOrderedFeature(diffProcessor);
+
+ final IMatchEngine.Factory.Registry registry = MatchEngineFactoryRegistryImpl.createStandaloneInstance();
+
+ final IEObjectMatcher matcher = DefaultMatchEngine.createDefaultEObjectMatcher(UseIdentifiers.ONLY, WeightProviderDescriptorRegistryImpl.createStandaloneInstance());
+ final MatchEngineFactoryImpl mathEnginefactory = new MatchEngineFactoryImpl(matcher, comparisonFactory);
+ registry.add(mathEnginefactory);
+ mathEnginefactory.setRanking(30); // default engine ranking is 10, must be higher to override.
+
+ return EMFCompare.builder().setDiffEngine(diffEngine).setMatchEngineFactoryRegistry(registry).build();
+ }
+
+ /**
+ * This allows to create the needed equality helper.
+ *
+ * @return
+ * A new equality helper used for UML.
+ */
+ protected static final IEqualityHelperFactory createUMLEqualityHelper() {
+ // we override the equality helper to be able to match some objects which didn't match with the default one
+ final IEqualityHelperFactory helperFactory = new DefaultEqualityHelperFactory() {
+ @Override
+ public IEqualityHelper createEqualityHelper() {
+ final LoadingCache<EObject, URI> cache = EqualityHelper.createDefaultCache(getCacheBuilder());
+ return new UMLIgnoringIdentifiedEqualityHelper(cache);
+ }
+ };
+ return helperFactory;
+ }
+
+ /**
+ * This allows to create the DiffEngine for the needed feature ignored.
+ *
+ * @param diffProcessor
+ * The diff processor.
+ * @return
+ * A DiffEngine ignoring the feature where isOrdered() return false.
+ */
+ protected static final IDiffEngine createDiffEngineIgnoringNonOrderedFeature(final IDiffProcessor diffProcessor) {
+ return new DefaultDiffEngine(diffProcessor) {
+ @Override
+ protected FeatureFilter createFeatureFilter() {
+ return new FeatureFilter() {
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.diff.FeatureFilter#checkForOrderingChanges(org.eclipse.emf.ecore.EStructuralFeature)
+ */
+ @Override
+ public boolean checkForOrderingChanges(final EStructuralFeature feature) {
+ if (feature.isOrdered()) {
+ if (EcorePackage.eINSTANCE == feature.eClass().getEPackage()) {
+ return false;
+ }
+ }
+ return feature.isOrdered();
+ }
+ };
+ }
+ };
+ }
+}
diff --git a/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/PapyrusProximityEObjectMatcher.java b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/PapyrusProximityEObjectMatcher.java
new file mode 100644
index 00000000000..137c1961070
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/PapyrusProximityEObjectMatcher.java
@@ -0,0 +1,493 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent LORENZO (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.m2m.qvto.tests.tools.tests;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.Monitor;
+import org.eclipse.emf.compare.CompareFactory;
+import org.eclipse.emf.compare.Comparison;
+import org.eclipse.emf.compare.ComparisonCanceledException;
+import org.eclipse.emf.compare.EMFCompareMessages;
+import org.eclipse.emf.compare.Match;
+import org.eclipse.emf.compare.match.eobject.EObjectIndex;
+import org.eclipse.emf.compare.match.eobject.EObjectIndex.Side;
+import org.eclipse.emf.compare.match.eobject.IEObjectMatcher;
+import org.eclipse.emf.compare.match.eobject.ProximityEObjectMatcher.DistanceFunction;
+import org.eclipse.emf.compare.match.eobject.ScopeQuery;
+import org.eclipse.emf.compare.match.eobject.internal.ByTypeIndex;
+import org.eclipse.emf.compare.match.eobject.internal.MatchAheadOfTime;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.PackageImport;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterators;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+
+/**
+ * This matcher is using a distance function to match EObject. It guarantees that elements are matched with
+ * the other EObject having the lowest distance. If two elements have the same distance regarding the other
+ * EObject it will arbitrary pick one. (You should probably not rely on this and make sure your distance only
+ * return 0 if both EObject have the very same content). The matcher will try to use the fact that it is a
+ * distance to achieve a suitable scalability. It is also build on the following assumptions :
+ * <ul>
+ * <li>Most EObjects have no difference and have their corresponding EObject on the other sides of the model
+ * (right and origins)</li>
+ * <li>Two consecutive calls on the distance function with the same parameters will give the same distance.
+ * </li>
+ * </ul>
+ * The scalability you'll get will highly depend on the complexity of the distance function. The
+ * implementation is not caching any distance result from two EObjects.
+ *
+ * @author <a href="mailto:cedric.brun@obeo.fr">Cedric Brun</a>
+ */
+@SuppressWarnings("restriction")
+public class PapyrusProximityEObjectMatcher implements IEObjectMatcher, ScopeQuery {
+
+ /**
+ * Number of elements to index before a starting a match ahead step.
+ */
+ private static final int NB_ELEMENTS_BETWEEN_MATCH_AHEAD = 10000;
+
+ /**
+ * The index which keep the EObjects.
+ */
+ private EObjectIndex index;
+
+ /**
+ * Keeps track of which side was the EObject from.
+ */
+ private Map<EObject, Side> eObjectsToSide = Maps.newHashMap();
+
+ /**
+ * The left map of named elements.
+ */
+ final Map<String, EObject> leftMap = new HashMap<String, EObject>();
+
+ /**
+ * The right map of named elements.
+ */
+ final Map<String, EObject> rightMap = new HashMap<String, EObject>();
+
+ /**
+ * The left map of package import.
+ */
+ final Map<String, EObject> leftPackageImportMap = new HashMap<String, EObject>();
+
+ /**
+ * The right map of package import.
+ */
+ final Map<String, EObject> rightPackageImportMap = new HashMap<String, EObject>();
+
+ /**
+ * The left map of profile applicaton.
+ */
+ final Map<String, EObject> leftProfileApplicationImportMap = new HashMap<String, EObject>();
+
+ /**
+ * The right map of profile applicaton.
+ */
+ final Map<String, EObject> rightProfileApplicationImportMap = new HashMap<String, EObject>();
+
+ /**
+ * Create the matcher using the given distance function.
+ *
+ * @param meter
+ * A function to measure the distance between two {@link EObject}s.
+ */
+ public PapyrusProximityEObjectMatcher(final DistanceFunction meter) {
+ this.index = new ByTypeIndex(meter, this);
+ }
+
+ /**
+ * This allows to add named element to left map.
+ *
+ * @param object
+ * The object to add in the left map.
+ */
+ private void addToLeftNamedElementMap(final EObject object) {
+ if (object instanceof NamedElement) {
+ leftMap.put(((NamedElement) object).getQualifiedName(), object);
+ } else if (object instanceof PackageImport) {
+ leftPackageImportMap.put(((PackageImport) object).getImportedPackage().getQualifiedName(), object);
+ } else if (object instanceof ProfileApplication) {
+ leftProfileApplicationImportMap.put(((ProfileApplication) object).getAppliedProfile().getQualifiedName(), object);
+ }
+
+ }
+
+ /**
+ * This allows to add named element to right map.
+ *
+ * @param object
+ * The object to add in the right map.
+ */
+ private void addToRightNamedElementMap(final EObject object) {
+ if (object instanceof NamedElement) {
+ rightMap.put(((NamedElement) object).getQualifiedName(), object);
+ } else if (object instanceof PackageImport) {
+ rightPackageImportMap.put(((PackageImport) object).getImportedPackage().getQualifiedName(), object);
+ } else if (object instanceof ProfileApplication) {
+ rightProfileApplicationImportMap.put(((ProfileApplication) object).getAppliedProfile().getQualifiedName(), object);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.match.eobject.IEObjectMatcher#createMatches(org.eclipse.emf.compare.Comparison, java.util.Iterator, java.util.Iterator, java.util.Iterator, org.eclipse.emf.common.util.Monitor)
+ */
+ @Override
+ public void createMatches(final Comparison comparison, final Iterator<? extends EObject> leftEObjects,
+ final Iterator<? extends EObject> rightEObjects, final Iterator<? extends EObject> originEObjects,
+ final Monitor monitor) {
+ if (!leftEObjects.hasNext() && !rightEObjects.hasNext() && !originEObjects.hasNext()) {
+ return;
+ }
+
+ monitor.subTask(EMFCompareMessages.getString("ProximityEObjectMatcher.monitor.indexing")); //$NON-NLS-1$
+ int nbElements = 0;
+ int lastSegment = 0;
+ /*
+ * We are iterating through the three sides of the scope at the same time so that index might apply
+ * pre-matching strategies elements if they wish.
+ */
+ while (leftEObjects.hasNext() || rightEObjects.hasNext() || originEObjects.hasNext()) {
+ if (monitor.isCanceled()) {
+ throw new ComparisonCanceledException();
+ }
+
+ if (leftEObjects.hasNext()) {
+ final EObject next = leftEObjects.next();
+ nbElements++;
+ index.index(next, Side.LEFT);
+ eObjectsToSide.put(next, Side.LEFT);
+ addToLeftNamedElementMap(next);
+ }
+
+ if (rightEObjects.hasNext()) {
+ final EObject next = rightEObjects.next();
+ index.index(next, Side.RIGHT);
+ eObjectsToSide.put(next, Side.RIGHT);
+ addToRightNamedElementMap(next);
+ }
+
+ if (originEObjects.hasNext()) {
+ final EObject next = originEObjects.next();
+ index.index(next, Side.ORIGIN);
+ eObjectsToSide.put(next, Side.ORIGIN);
+ }
+ if (nbElements / NB_ELEMENTS_BETWEEN_MATCH_AHEAD > lastSegment) {
+ matchAheadOfTime(comparison, monitor);
+ lastSegment++;
+ }
+
+ }
+
+ monitor.subTask(EMFCompareMessages.getString("ProximityEObjectMatcher.monitor.matching")); //$NON-NLS-1$
+ createMatch(comparison);
+ matchIndexedObjects(comparison, monitor);
+
+ createUnmatchesForRemainingObjects(comparison);
+ restructureMatchModel(comparison);
+
+ }
+
+ /**
+ * This allows to create the match of comparison.
+ *
+ * @param comparison
+ * The current comparison.
+ */
+ private void createMatch(final Comparison comparison) {
+ Iterator<String> iter = leftMap.keySet().iterator();
+ while (iter.hasNext()) {
+ final String current = iter.next();
+ final EObject leftValue = leftMap.get(current);
+ final EObject rightValue = rightMap.get(current);
+ if (null != leftValue && null != rightValue) {
+ areMatching(comparison, leftValue, rightValue, null);
+ }
+ }
+ iter = leftPackageImportMap.keySet().iterator();
+ while (iter.hasNext()) {
+ final String current = iter.next();
+ final EObject leftValue = leftPackageImportMap.get(current);
+ final EObject rightValue = rightPackageImportMap.get(current);
+ if (null != leftValue && null != rightValue) {
+ areMatching(comparison, leftValue, rightValue, null);
+ }
+ }
+
+ iter = leftProfileApplicationImportMap.keySet().iterator();
+ while (iter.hasNext()) {
+ final String current = iter.next();
+ final EObject leftValue = leftProfileApplicationImportMap.get(current);
+ final EObject rightValue = rightProfileApplicationImportMap.get(current);
+ if (null != leftValue && null != rightValue) {
+ areMatching(comparison, leftValue, rightValue, null);
+ }
+ }
+ }
+
+ /**
+ * If the index supports it, match element ahead of time, in case of failure the elements are kept and
+ * will be processed again later on.
+ *
+ * @param comparison
+ * The current comparison.
+ * @param monitor
+ * Monitor to track progress.
+ */
+ private void matchAheadOfTime(final Comparison comparison, final Monitor monitor) {
+ if (index instanceof MatchAheadOfTime) {
+ matchList(comparison, ((MatchAheadOfTime) index).getValuesToMatchAhead(Side.LEFT), false, monitor);
+ matchList(comparison, ((MatchAheadOfTime) index).getValuesToMatchAhead(Side.RIGHT), false,
+ monitor);
+ }
+ }
+
+ /**
+ * Match elements for real, if no match is found for an element, an object will be created to represent
+ * this unmatch and the element will not be processed again.
+ *
+ * @param comparison
+ * The current comparison.
+ * @param monitor
+ * Monitor to track progress.
+ */
+ private void matchIndexedObjects(final Comparison comparison, final Monitor monitor) {
+ Iterable<EObject> todo = index.getValuesStillThere(Side.LEFT);
+ while (todo.iterator().hasNext()) {
+ if (monitor.isCanceled()) {
+ throw new ComparisonCanceledException();
+ }
+ todo = matchList(comparison, todo, true, monitor);
+ }
+ todo = index.getValuesStillThere(Side.RIGHT);
+ while (todo.iterator().hasNext()) {
+ if (monitor.isCanceled()) {
+ throw new ComparisonCanceledException();
+ }
+ todo = matchList(comparison, todo, true, monitor);
+ }
+
+ }
+
+ /**
+ * Create all the Match objects for the remaining EObjects.
+ *
+ * @param comparison
+ * The current comparison.
+ */
+ private void createUnmatchesForRemainingObjects(final Comparison comparison) {
+ for (final EObject notFound : index.getValuesStillThere(Side.RIGHT)) {
+ areMatching(comparison, null, notFound, null);
+ }
+ for (final EObject notFound : index.getValuesStillThere(Side.LEFT)) {
+ areMatching(comparison, notFound, null, null);
+ }
+ for (final EObject notFound : index.getValuesStillThere(Side.ORIGIN)) {
+ areMatching(comparison, null, null, notFound);
+ }
+ }
+
+ /**
+ * Process the list of objects matching them. This method might not be able to process all the EObjects if
+ * - for instance, their container has not been matched already. Every object which could not be matched
+ * is returned in the list.
+ *
+ * @param comparison
+ * The comparison being built.
+ * @param todoList
+ * The list of objects to process.
+ * @param createUnmatches
+ * Whether elements which have no match should trigger the creation of a Match object (meaning
+ * we won't try to match them afterwards) or not.
+ * @param monitor
+ * A monitor to track progress.
+ * @return The list of EObjects which could not be processed for some reason.
+ */
+ private Iterable<EObject> matchList(final Comparison comparison, final Iterable<EObject> todoList,
+ final boolean createUnmatches, final Monitor monitor) {
+ final Set<EObject> remainingResult = Sets.newLinkedHashSet();
+ final List<EObject> requiredContainers = Lists.newArrayList();
+ final Iterator<EObject> todo = todoList.iterator();
+ while (todo.hasNext()) {
+ if (monitor.isCanceled()) {
+ throw new ComparisonCanceledException();
+ }
+ final EObject next = todo.next();
+ /*
+ * Let's first add every container which is in scope
+ */
+ EObject container = next.eContainer();
+ while (null != container && isInScope(container)) {
+ if (comparison.getMatch(container) == null) {
+ requiredContainers.add(0, container);
+ }
+ container = container.eContainer();
+ }
+ }
+ final Iterator<EObject> containersAndTodo = Iterators.concat(requiredContainers.iterator(),
+ todoList.iterator());
+ while (containersAndTodo.hasNext()) {
+ if (monitor.isCanceled()) {
+ throw new ComparisonCanceledException();
+ }
+ final EObject next = containersAndTodo.next();
+ /*
+ * At this point you need to be sure the element has not been matched in any other way before.
+ */
+ if (null == comparison.getMatch(next)) {
+ if (!tryToMatch(comparison, next, createUnmatches)) {
+ remainingResult.add(next);
+ }
+ }
+ }
+ return remainingResult;
+ }
+
+ /**
+ * Try to create a Match. If the match got created, register it (having actual left/right/origin matches
+ * or not), if not, then return false. Cases where it might not create the match : if some required data
+ * has not been computed yet (for instance if the container of an object has not been matched and if the
+ * distance need to know if it's match to find the children matches).
+ *
+ * @param comparison
+ * The comparison under construction, it will be updated with the new match.
+ * @param a
+ * Object to match.
+ * @param createUnmatches
+ * Whether elements which have no match should trigger the creation of a Match object (meaning
+ * we won't try to match them afterwards) or not.
+ * @return <code>false</code> if the conditions are not fulfilled to create the match, <code>true</code> otherwhise.
+ */
+ private boolean tryToMatch(final Comparison comparison, final EObject a, final boolean createUnmatches) {
+ boolean okToMatch = false;
+ Side aSide = eObjectsToSide.get(a);
+ assert null != aSide;
+ Side bSide = Side.LEFT;
+ Side cSide = Side.RIGHT;
+ if (Side.RIGHT == aSide) {
+ bSide = Side.LEFT;
+ cSide = Side.ORIGIN;
+ } else if (Side.LEFT == aSide) {
+ bSide = Side.RIGHT;
+ cSide = Side.ORIGIN;
+ } else if (Side.ORIGIN == aSide) {
+ bSide = Side.LEFT;
+ cSide = Side.RIGHT;
+ }
+ assert aSide != bSide;
+ assert bSide != cSide;
+ assert cSide != aSide;
+ final Map<Side, EObject> closests = index.findClosests(comparison, a, aSide);
+ if (null != closests) {
+ final EObject lObj = closests.get(bSide);
+ final EObject aObj = closests.get(cSide);
+ if (null != lObj || null != aObj) {
+ // we have at least one other match
+ areMatching(comparison, closests.get(Side.LEFT), closests.get(Side.RIGHT),
+ closests.get(Side.ORIGIN));
+ okToMatch = true;
+ } else if (createUnmatches) {
+ areMatching(comparison, closests.get(Side.LEFT), closests.get(Side.RIGHT),
+ closests.get(Side.ORIGIN));
+ okToMatch = true;
+ }
+ }
+ return okToMatch;
+ }
+
+ /**
+ * Process all the matches of the given comparison and re-attach them to their parent if one is found.
+ *
+ * @param comparison
+ * The comparison to restructure.
+ */
+ private void restructureMatchModel(final Comparison comparison) {
+ Iterator<Match> it = ImmutableList.copyOf(Iterators.filter(comparison.eAllContents(), Match.class))
+ .iterator();
+
+ while (it.hasNext()) {
+ final Match cur = it.next();
+ EObject possibleContainer = null;
+ if (null != cur.getLeft()) {
+ possibleContainer = cur.getLeft().eContainer();
+ }
+ if (null == possibleContainer && null != cur.getRight()) {
+ possibleContainer = cur.getRight().eContainer();
+ }
+ if (null == possibleContainer && null != cur.getOrigin()) {
+ possibleContainer = cur.getOrigin().eContainer();
+ }
+ final Match possibleContainerMatch = comparison.getMatch(possibleContainer);
+ if (null != possibleContainerMatch) {
+ ((BasicEList<Match>) possibleContainerMatch.getSubmatches()).addUnique(cur);
+ }
+ }
+ }
+
+ /**
+ * Register the given object as a match and add it in the comparison.
+ *
+ * @param comparison
+ * Container for the Match.
+ * @param left
+ * Left element.
+ * @param right
+ * Right element
+ * @param origin
+ * Origin element.
+ * @return The created match.
+ */
+ private Match areMatching(final Comparison comparison, final EObject left, final EObject right, final EObject origin) {
+ final Match result = CompareFactory.eINSTANCE.createMatch();
+ result.setLeft(left);
+ result.setRight(right);
+ result.setOrigin(origin);
+ ((BasicEList<Match>) comparison.getMatches()).addUnique(result);
+ if (null != left) {
+ index.remove(left, Side.LEFT);
+ }
+ if (null != right) {
+ index.remove(right, Side.RIGHT);
+ }
+ if (null != origin) {
+ index.remove(origin, Side.ORIGIN);
+ }
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.match.eobject.ScopeQuery#isInScope(org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public boolean isInScope(final EObject eContainer) {
+ return null != eObjectsToSide.get(eContainer);
+ }
+}
diff --git a/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/UMLIgnoringIdentifiedEqualityHelper.java b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/UMLIgnoringIdentifiedEqualityHelper.java
new file mode 100644
index 00000000000..79fbf82fb1c
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.uml.m2m.qvto.tests.tools/src/org/eclipse/papyrus/uml/m2m/qvto/tests/tools/tests/UMLIgnoringIdentifiedEqualityHelper.java
@@ -0,0 +1,161 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent LORENZO (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.m2m.qvto.tests.tools.tests;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.compare.utils.EqualityHelper;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.papyrus.infra.constraints.constraints.TrueConstraint;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.PackageImport;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.TemplateBinding;
+import org.eclipse.uml2.uml.TemplateParameterSubstitution;
+
+import com.google.common.cache.LoadingCache;
+
+/**
+ * This allows to manage the ignoring identified objects of UML.
+ */
+public class UMLIgnoringIdentifiedEqualityHelper extends EqualityHelper {
+
+ /**
+ * Constructor.
+ *
+ * @param uriCache The uris in cache.
+ */
+ public UMLIgnoringIdentifiedEqualityHelper(final LoadingCache<EObject, URI> uriCache) {
+ super(uriCache);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.compare.utils.EqualityHelper#matchingEObjects(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ protected boolean matchingEObjects(final EObject object1, final EObject object2) {
+ final EClass eClass1 = object1.eClass();
+ final EClass eClass2 = object2.eClass();
+
+ boolean result = false;
+ if (eClass1 == eClass2) {
+ if (object1.eIsProxy() && object2.eIsProxy()) {
+ result = super.matchingEObjects(object1, object2);
+ } else if (object1 instanceof NamedElement && object2 instanceof NamedElement) {
+ result = matchingNamedElement((NamedElement) object1, (NamedElement) object2);
+ } else if (object1 instanceof Element && object2 instanceof Element) {
+ result = matchingElement((Element) object1, (Element) object2);
+ } else if (EcorePackage.eINSTANCE == object1.eClass().getEPackage()) {
+ result = super.matchingEObjects(object1, object2);
+ } else {
+ result = super.matchingEObjects(object1, object2);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * This allows to check if two named elements are matching.
+ *
+ * @param object1
+ * The first named element.
+ * @param object2
+ * The second named element.
+ * @return
+ * {@link TrueConstraint} if the 2 named element have the same qualified name.
+ */
+ protected boolean matchingNamedElement(final NamedElement object1, final NamedElement object2) {
+ boolean result = false;
+ final String qn1 = ((NamedElement) object1).getQualifiedName();
+ final String qn2 = ((NamedElement) object2).getQualifiedName();
+ if (null == qn1 && null == qn2) {
+ // when there is no name on a named element
+ result = matchingValues(object1.eContainer(), object2.eContainer());
+ }
+ if (null != qn1 && null != qn2) {
+ result = qn1.equals(qn2);
+ }
+ return result;
+ }
+
+ /**
+ * This allows to check if two UML elements are matching.
+ *
+ * @param object1
+ * The first UML element.
+ * @param object2
+ * The second UML element.
+ * @return <code>true</code> if the two UML elements are matching, <code>false</code> otherwise.
+ *
+ */
+ protected boolean matchingElement(final Element object1, final Element object2) {
+ boolean result = false;
+ final EObject parent1 = object1.eContainer();
+ final EObject parent2 = object2.eContainer();
+
+ // we check owner
+ if (matchingValues(parent1, parent2)) {
+ if (object1 instanceof PackageImport && object2 instanceof PackageImport) {
+ final Package importedPackage1 = ((PackageImport) object1).getImportedPackage();
+ final Package importedPackage2 = ((PackageImport) object2).getImportedPackage();
+ result = importedPackage1.getQualifiedName().equals(importedPackage2.getQualifiedName());
+ } else if (object1 instanceof ProfileApplication && object2 instanceof ProfileApplication) {
+ final ProfileApplication prof1 = (ProfileApplication) object1;
+ final ProfileApplication prof2 = (ProfileApplication) object2;
+ final Profile p1 = prof1.getAppliedProfile();
+ final Profile p2 = prof2.getAppliedProfile();
+ final String p1Qname = p1.getQualifiedName();
+ final String p2Qname = p2.getQualifiedName();
+ if (p1Qname != null) {
+ result = p1Qname.equals(p2Qname);
+ }
+ } else if (object1 instanceof ConnectorEnd && object2 instanceof ConnectorEnd) {
+ final ConnectorEnd conn1 = (ConnectorEnd) object1;
+ final ConnectorEnd conn2 = (ConnectorEnd) object2;
+ final Element role1 = conn1.getRole();
+ final Element role2 = conn2.getRole();
+ boolean roleMatching = matchingValues(role1, role2);
+ if (roleMatching) {
+ final Element partWithPort1 = conn1.getPartWithPort();
+ final Element partWithPort2 = conn2.getPartWithPort();
+ result = matchingValues(partWithPort1, partWithPort2);
+ }
+ // }
+ } else if (object1 instanceof Comment && object2 instanceof Comment) {
+ final String body1 = ((Comment) object1).getBody();
+ final String body2 = ((Comment) object2).getBody();
+ if (body1 != null) {
+ result = body1.equals(body2);
+ }
+ } else if (object1 instanceof TemplateBinding && object2 instanceof TemplateBinding) {
+ // owner already checked
+ result = true;
+ } else if (object1 instanceof TemplateParameterSubstitution && object2 instanceof TemplateParameterSubstitution) {
+ // owner already checked
+ result = true;
+ }
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/developer/pom.xml b/plugins/developer/pom.xml
index cca1a56fe97..611fb6837c3 100644
--- a/plugins/developer/pom.xml
+++ b/plugins/developer/pom.xml
@@ -35,5 +35,6 @@
<module>org.eclipse.papyrus.infra.gmfdiag.css.debug</module>
<module>org.eclipse.papyrus.mwe2.utils</module>
<module>org.eclipse.papyrus.releng.tools</module>
+ <module>org.eclipse.papyrus.uml.m2m.qvto.tests.tools</module>
</modules>
</project>

Back to the top