Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/alf/core')
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.classpath7
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.project28
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/META-INF/MANIFEST.MF23
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/about.html28
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/build.properties6
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/pom.xml14
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/ActivatorText.java67
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/generation/DefaultEditStringRetrievalStrategy.java121
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/generation/EditStringRetrievalStrategy.java47
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/merge/manual/AlfCompareEditor.java46
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/merge/manual/MergeActionDialog.java137
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/AlfTextualRepresentation.java187
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/IAlfTextualRepresentation.java31
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/TextualRepresentation.java98
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/IAdvancedDifference.java41
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/LineComparator.java53
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/LineDifference.java102
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/RegionDifference.java77
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/StringUtil.java44
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/TokenDifference.java62
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/util/RepresentationParser.java98
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/util/RepresentationParsingError.java25
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.classpath7
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.project28
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/META-INF/MANIFEST.MF30
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/about.html28
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/build.properties7
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/plugin.xml19
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/pom.xml14
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/ActivatorTransaction.java56
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/AlfCommand.java51
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/AlfCommandFactory.java70
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/AlfCommandLabels.java25
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/CompileCommand.java62
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/SaveCommand.java54
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/VersioningSaveCommand.java35
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/ChangeScenario.java46
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/CommitScenario.java114
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/IChangeScenario.java17
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/IScenario.java28
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/ISyncScenario.java25
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/SaveScenario.java100
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/Scenario.java53
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/ScenarioFactory.java41
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/SyncScenario.java511
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/AlfAbstractJob.java50
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/AlfCompilationJob.java147
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/AlfJobObserver.java63
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/SaveTextualRepresentationJob.java49
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/FUMLElementService.java56
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/FUMLElementListener.java83
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/filter/FUMLFilter.java353
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/filter/FUMLScopeUtil.java246
57 files changed, 0 insertions, 4528 deletions
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.classpath b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.classpath
deleted file mode 100644
index b1dabee3829..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.project b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.project
deleted file mode 100644
index 116c74ef06e..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.alf.text</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/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.settings/org.eclipse.jdt.core.prefs b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 9ca8e68231b..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,291 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
-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/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.settings/org.eclipse.jdt.ui.prefs b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 954281dbc31..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,68 +0,0 @@
-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/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/META-INF/MANIFEST.MF b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/META-INF/MANIFEST.MF
deleted file mode 100644
index 5387153d4c8..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.uml2.uml,
- org.eclipse.papyrus.uml.alf;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.uml.alf.libraries;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.compare,
- org.eclipse.gmf.runtime.common.core,
- org.eclipse.swt,
- org.eclipse.compare.core,
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0"
-Export-Package: org.eclipse.papyrus.uml.alf.text.generation,
- org.eclipse.papyrus.uml.alf.text.merge.manual,
- org.eclipse.papyrus.uml.alf.text.representation,
- org.eclipse.papyrus.uml.alf.text.representation.util
-Bundle-Vendor: Eclipse Modeling Project
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 0.7.0.qualifier
-Bundle-Name: ALF Text (Incubation)
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.alf.text.ActivatorText
-Bundle-SymbolicName: org.eclipse.papyrus.uml.alf.text
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/about.html b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/about.html
deleted file mode 100644
index 209103075a7..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>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/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/build.properties b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/build.properties
deleted file mode 100644
index 785a40c0ec7..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html
-src.includes = about.html
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/pom.xml b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/pom.xml
deleted file mode 100644
index 2d038ab45fd..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>3.0.0-SNAPSHOT</version>
- <relativePath>../../../../releng/extra</relativePath>
- </parent>
- <artifactId>org.eclipse.papyrus.uml.alf.text</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>0.7.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/ActivatorText.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/ActivatorText.java
deleted file mode 100644
index c9089ee5ab1..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/ActivatorText.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package org.eclipse.papyrus.uml.alf.text;
-
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.papyrus.uml.alf.AlfRuntimeModule;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class ActivatorText extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.alf.text"; //$NON-NLS-1$
-
- // The shared instance
- private static ActivatorText plugin;
-
- private Injector injector;
-
- public static LogHelper logger;
-
- /**
- * The constructor
- */
- public ActivatorText() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- this.injector = Guice.createInjector(new AlfRuntimeModule());
- logger = new LogHelper(this);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- logger = null;
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static ActivatorText getDefault() {
- return plugin;
- }
-
- public Injector getInjector() {
- return this.injector;
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/generation/DefaultEditStringRetrievalStrategy.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/generation/DefaultEditStringRetrievalStrategy.java
deleted file mode 100644
index 85ad34e43bb..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/generation/DefaultEditStringRetrievalStrategy.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package org.eclipse.papyrus.uml.alf.text.generation;
-
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet (CEA LIST);
- *****************************************************************************/
-import java.util.Iterator;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.papyrus.uml.alf.Member;
-import org.eclipse.papyrus.uml.alf.PropertyDefinition;
-import org.eclipse.papyrus.uml.alf.text.ActivatorText;
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-import org.eclipse.papyrus.uml.alf.text.representation.util.RepresentationParser;
-import org.eclipse.papyrus.uml.alf.text.representation.util.RepresentationParsingError;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.xtext.resource.SaveOptions;
-import org.eclipse.xtext.serializer.ISerializer;
-
-public class DefaultEditStringRetrievalStrategy extends EditStringRetrievalStrategy {
-
- /**
- * The serializer associated to the ALF grammar
- */
- private ISerializer serializer;
-
- public DefaultEditStringRetrievalStrategy() {
- this.serializer = ActivatorText.getDefault().getInjector().getInstance(ISerializer.class);
- }
-
- /**
- * Return the textual representation associated to a given model element
- *
- * @param element
- * - the element for which the textual representation is computed
- * @return generated - the textual representation computed for this element
- */
- public String getGeneratedEditString(Element element) {
- String generated = "";
- Resource alfModel = this.getAlfModel((NamedElement) element);
- if (this.serializer != null) {
- EObject serializationTarget = null;
- if (element instanceof Property) {
- serializationTarget = this.getPropertyDefinition((Property) element, alfModel);
- } else {
- serializationTarget = alfModel.getContents().get(0);
- }
- generated = this.serializer.serialize(serializationTarget, SaveOptions.newBuilder().noValidation().getOptions());
- }
- return generated;
- }
-
- /**
- * When opened the editor retrieve the based string on which the user is going to work.
- * There are two possibilities:
- * 1 - The element already has a textual representation associated. Then the return string is the registered representation
- * 2 - The element does not have an associated textual representation. Then the return string is the one dynamically calculated
- *
- * @param element
- * - the element for which the textual representation is computed
- * @return registered - the textual representation computed for this element
- */
- public String getEditString(Element element) {
- AlfTextualRepresentation registeredRep = null;
- /* 1. Parse the representation associated to model element */
- try {
- registeredRep = RepresentationParser.getInstance().
- parse((NamedElement) element);
- } catch (RepresentationParsingError e) {
- e.printStackTrace();
- }
- /* 2. If the representation is in detached state (i.e. there is no model element owning it) then rely on the issued from a snapshot */
- if (registeredRep != null && registeredRep.isDetached()) {
- AlfTextualRepresentation generatedRep = null;
- try {
- generatedRep = RepresentationParser.getInstance().
- getSnapshot((NamedElement) element);
- } catch (RepresentationParsingError e) {
- e.printStackTrace();
- }
- if (generatedRep != null) {
- registeredRep.setText(generatedRep.getContent());
- }
- }
- return registeredRep.getContent();
- }
-
-
- private EObject getPropertyDefinition(Property property, Resource alfModelResource) {
- EObject memberDefinition = null;
- Iterator<EObject> contentIterator = alfModelResource.getAllContents();
- boolean found = false;
- while (contentIterator.hasNext() && !found) {
- EObject currentObject = contentIterator.next();
- if (currentObject instanceof Member) {
- Member member = (Member) currentObject;
- if (member.getVisibility().equals(property.getVisibility().toString())
- && member.getDefinition() instanceof PropertyDefinition) {
- PropertyDefinition definition = (PropertyDefinition) member.getDefinition();
- if (definition.getName().equals(property.getName())) {
- found = (definition.getTypePart().isIsAny() && property.getType() == null)
- || definition.getTypePart().getTypeName().toString().equals(property.getType().toString());
- memberDefinition = member;
- }
- }
- }
- }
- return memberDefinition;
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/generation/EditStringRetrievalStrategy.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/generation/EditStringRetrievalStrategy.java
deleted file mode 100644
index 752469be8e5..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/generation/EditStringRetrievalStrategy.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet (CEA LIST)
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.text.generation;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.papyrus.uml.alf.MappingError;
-import org.eclipse.papyrus.uml.alf.UMLMapper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Property;
-
-public abstract class EditStringRetrievalStrategy {
-
- /**
- * Provide a resource containing the ALF model corresponding to the given UML element
- *
- * @param UMLelement
- * - the element from which the ALF model is computed
- * @return alfModelResource - the resource containing the ALF model
- */
- protected Resource getAlfModel(NamedElement UMLelement) {
- UMLMapper mapper = new UMLMapper();
- Resource alfModelResource = null;
- try {
- if (UMLelement instanceof Property) {
- alfModelResource = mapper.map(((Property) UMLelement).getNamespace());
- } else {
- alfModelResource = mapper.map(UMLelement);
- }
- } catch (MappingError e) {
- e.printStackTrace();
- }
- return alfModelResource;
- }
-
- public abstract String getEditString(Element element);
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/merge/manual/AlfCompareEditor.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/merge/manual/AlfCompareEditor.java
deleted file mode 100644
index 9388f4f7de1..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/merge/manual/AlfCompareEditor.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet (CEA LIST)
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.text.merge.manual;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-
-public class AlfCompareEditor extends CompareEditorInput {
-
- protected final AlfTextualRepresentation registeredRep;
-
- protected final AlfTextualRepresentation generatedRep;
-
- public AlfCompareEditor(AlfTextualRepresentation registeredTextualRepresentation,
- AlfTextualRepresentation generatedTextualRepresentation) {
- super(new CompareConfiguration());
- this.registeredRep = registeredTextualRepresentation;
- this.generatedRep = generatedTextualRepresentation;
- }
-
- @Override
- protected Object prepareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- return null;
- }
-
- @Override
- public void saveChanges(IProgressMonitor monitor) throws CoreException {
- super.saveChanges(monitor);
- }
-
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/merge/manual/MergeActionDialog.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/merge/manual/MergeActionDialog.java
deleted file mode 100644
index 66d79baa526..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/merge/manual/MergeActionDialog.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.text.merge.manual;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.uml2.uml.NamedElement;
-
-public class MergeActionDialog extends TitleAreaDialog {
-
- protected NamedElement modelElement;
-
- protected final int WIDTH = 590;
-
- protected final int HEIGHT = 280;
-
- private List<Button> checkboxes;
-
- private int returnCode;
-
- private final String REBASE_MSG = "Abandon the modifications you previously saved for this element";
- private final String MERGE_MSG = "Merge your ongoing modifications with the current state of this element [under construction]";
- private final String RECONCILE_MSG = "Try to automatically reconcile your ongoing modifications with the current state of this element (risky)";
-
- public static final int REBASE = 0;
- public static final int MERGE = 1;
- public static final int RECONCILE = 2;
-
- public MergeActionDialog(Shell parent, NamedElement modelElement) {
- super(parent);
- this.returnCode = 0;
- this.modelElement = modelElement;
- this.checkboxes = new ArrayList<Button>();
- }
-
- public void create() {
- super.create();
- this.setTitle("Warning");
- String value = "You have ongoing changes this model element: ";
- value += this.modelElement.getName() == null ? "<unknown>" : this.modelElement.getName();
- value += " (" + this.modelElement.eClass().getInstanceTypeName() + ")";
- this.setMessage(value, IMessageProvider.WARNING);
- this.getShell().setText("Potential conflict(s) detected");
- this.getShell().setSize(WIDTH, HEIGHT);
- Rectangle parentShellBounds = this.getParentShell().getBounds();
- this.getShell().setLocation((parentShellBounds.width - WIDTH) / 2 + parentShellBounds.x,
- (parentShellBounds.height - HEIGHT) / 2 + parentShellBounds.y);
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite area = (Composite) super.createDialogArea(parent);
- Composite container = new Composite(area, SWT.NONE);
- GridLayout layout = new GridLayout();
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- container.setLayoutData(data);
- container.setLayout(layout);
- this.createActionGroup(container);
- return area;
- }
-
- private void createActionGroup(Composite parent) {
- Group actionsGroup = new Group(parent, SWT.NONE);
- actionsGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- RowLayout layout = new RowLayout();
- layout.type = SWT.VERTICAL;
- layout.spacing = 12;
- actionsGroup.setLayout(layout);
- this.checkboxes.add(this.createAction(actionsGroup, true, REBASE_MSG));
- Button merge = this.createAction(actionsGroup, false, MERGE_MSG);
- merge.setEnabled(false);
- this.checkboxes.add(merge);
- this.checkboxes.add(this.createAction(actionsGroup, false, RECONCILE_MSG));
- this.returnCode = REBASE;
- }
-
- private Button createAction(Composite parent, final boolean checked, final String message) {
- Button checkbox = new Button(parent, SWT.CHECK);
- checkbox.setSelection(checked);
- checkbox.setText(message);
- checkbox.addSelectionListener(new CheckboxSelectionListener());
- return checkbox;
- }
-
- @Override
- public int getReturnCode() {
- if (super.getReturnCode() != 0) {
- this.returnCode = super.getReturnCode();
- }
- return this.returnCode;
- }
-
- private class CheckboxSelectionListener extends SelectionAdapter {
-
- public void widgetSelected(SelectionEvent e) {
- for (Button checkbox : MergeActionDialog.this.checkboxes) {
- if (checkbox == e.getSource()) {
- checkbox.setSelection(true);
- if (checkbox.getText().equals(REBASE_MSG)) {
- MergeActionDialog.this.returnCode = REBASE;
- } else if (checkbox.getText().equals(MERGE_MSG)) {
- MergeActionDialog.this.returnCode = MERGE;
- } else {
- MergeActionDialog.this.returnCode = RECONCILE;
- }
- } else {
- checkbox.setSelection(false);
- }
- }
- }
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/AlfTextualRepresentation.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/AlfTextualRepresentation.java
deleted file mode 100644
index 8616893ffb1..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/AlfTextualRepresentation.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet (CEA LIST)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.text.representation;
-
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.compare.IModificationDate;
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-import org.eclipse.compare.rangedifferencer.RangeDifference;
-import org.eclipse.compare.rangedifferencer.RangeDifferencer;
-import org.eclipse.papyrus.uml.alf.libraries.helper.BackupState;
-import org.eclipse.papyrus.uml.alf.libraries.helper.BackupState.EditionStatus;
-import org.eclipse.papyrus.uml.alf.text.representation.compare.LineComparator;
-import org.eclipse.papyrus.uml.alf.text.representation.compare.LineDifference;
-import org.eclipse.papyrus.uml.alf.text.representation.compare.StringUtil;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.uml2.uml.NamedElement;
-
-public class AlfTextualRepresentation extends TextualRepresentation
- implements IAlfTextualRepresentation, IModificationDate {
-
- protected BackupState editionState;
-
- public AlfTextualRepresentation(NamedElement owner) {
- super(owner);
- this.editionState = new BackupState();
- }
-
- public boolean isSaved() {
- return this.editionState.status.equals(EditionStatus.SAVED);
- }
-
- public boolean isMerged() {
- return this.editionState.status.equals(EditionStatus.MERGED);
- }
-
- public void setEditionState(BackupState state) {
- this.editionState.timestamp = state.timestamp;
- this.editionState.status = state.status;
- }
-
- public BackupState getEditionState() {
- return this.editionState;
- }
-
- public EditionStatus getStatus() {
- if (this.editionState != null) {
- return this.editionState.status;
- }
- return null;
- }
-
- public long getModificationDate() {
- return this.editionState.timestamp.getTime();
- }
-
- /**
- * Two representations are considered as different since the set of differences is not empty
- */
- public boolean isDifferent(AlfTextualRepresentation representation) {
- return !this.compare(representation).isEmpty();
- }
-
- /**
- * Returns the set of differences found between two representations
- */
- public List<LineDifference> compare(AlfTextualRepresentation representation) {
- /* 1. Build comparator for each representation */
- IRangeComparator left = this.getRangeComparator();
- IRangeComparator right = representation.getRangeComparator();
- /* 2. Perform the differencing */
- RangeDifference[] differences = RangeDifferencer.findDifferences(left, right);
- /* 3. Build the result list */
- List<LineDifference> results = new ArrayList<LineDifference>();
- for (RangeDifference difference : differences) {
- results.add(new LineDifference(difference, this, representation, left, right));
- }
- return results;
- }
-
- public boolean merge(AlfTextualRepresentation representation) {
- // TODO
- return true;
- }
-
- /**
- * Heuristic to reconcile to different textual representation of the same model element.
- * If possible changes in <code>representation</code> are propagated into the current textual representation.
- * There is no guarantee that the reconciliation phase does not introduce loss of data.
- *
- * @return this - the current textual representation
- */
- public AlfTextualRepresentation reconcile(AlfTextualRepresentation representation) {
- StringBuilder builder = new StringBuilder(this.text);
- int offset = 0;
- /* 1. Compute the list of differences */
- Iterator<LineDifference> differenceIterator = this.compare(representation).iterator();
- /* 2. Try to reconcile differences */
- while (differenceIterator.hasNext()) {
-
- /* 2.1. Retrieve the current difference and extract the position of the region to change (left) */
- LineDifference difference = differenceIterator.next();
- Point leftFragmentPosition = difference.getLeftFragmentPosition();
-
- /* 2.2. Split the regions impacted by the difference into lines */
- StringBuilder leftHandSideBuilder = new StringBuilder();
- String[] leftLines = difference.getLeftState().split(StringUtil.EOL);
- String[] rightLines = difference.getRightState().split(StringUtil.EOL);
- int maxLineCount = Math.max(leftLines.length, rightLines.length);
-
- /*
- * 2.3. Integrate changes from left to right. In case where left hand side and right side
- * have different sizes:
- * A. right > left -> remaining lines in the right are preserved
- * B. left > right -> remaining lines are integrated to the right
- */
- for (int i = 0; i < maxLineCount; i++) {
-
- /* 2.3.1 Both sides have a definition of the same line */
- if (i < leftLines.length && i < rightLines.length) {
- if (!StringUtil.isNegligible(rightLines[i])) {
- leftHandSideBuilder.append(rightLines[i] + StringUtil.EOL);
- } else {
- leftHandSideBuilder.append(leftLines[i] + StringUtil.EOL);
- }
- } else {
- /* 2.3.2. The left side is larger than the right hand side */
- if (i < leftLines.length) {
- leftHandSideBuilder.append(leftLines[i] + StringUtil.EOL);
- } else {
- leftHandSideBuilder.append(rightLines[i] + StringUtil.EOL);
- }
- }
- }
-
- /* 2.4. Apply the change in the original representation */
- builder.delete(leftFragmentPosition.x + offset, leftFragmentPosition.y + offset);
- builder.insert(leftFragmentPosition.x + offset, leftHandSideBuilder);
- offset += leftHandSideBuilder.length() - difference.getLeftState().length();
- }
-
- /* 3. Delete the EOF separator added previously at the end and replace text of the current representation */
- if (builder.charAt(builder.length() - 1) == StringUtil.CHAR_EOL) {
- builder.deleteCharAt(builder.length());
- }
- this.setText(builder.toString());
- return this;
- }
-
- /**
- * Rebase the current ALF representation onto the representation provided as parameter
- * A rebase can only work if two representation concerns the same model element
- *
- * @return this - the current textual representation
- */
- public AlfTextualRepresentation rebase(AlfTextualRepresentation representation) {
- if (representation!= null && this.getOwner() == representation.getOwner()) {
- BackupState state = new BackupState();
- state.status = representation.getStatus();
- state.timestamp = new Timestamp(representation.getModificationDate());
- this.setEditionState(state);
- this.setText(representation.getContent());
- }
- return this;
- }
-
- /**
- * Provide the comparator to be used to compare two textual representation
- */
- protected IRangeComparator getRangeComparator() {
- return new LineComparator(this.text);
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/IAlfTextualRepresentation.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/IAlfTextualRepresentation.java
deleted file mode 100644
index 234607fe31c..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/IAlfTextualRepresentation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.text.representation;
-
-import java.util.List;
-
-import org.eclipse.papyrus.uml.alf.text.representation.compare.LineDifference;
-
-public interface IAlfTextualRepresentation {
-
- public boolean isDifferent(AlfTextualRepresentation representation);
-
- public List<LineDifference> compare(AlfTextualRepresentation representation);
-
- public boolean merge(AlfTextualRepresentation representation);
-
- public AlfTextualRepresentation reconcile(AlfTextualRepresentation representation);
-
- public AlfTextualRepresentation rebase(AlfTextualRepresentation representation);
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/TextualRepresentation.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/TextualRepresentation.java
deleted file mode 100644
index b634c83ec9a..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/TextualRepresentation.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet (CEA LIST)
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.text.representation;
-
-import java.io.InputStream;
-
-import org.eclipse.compare.IStreamContentAccessor;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.xtext.util.StringInputStream;
-
-public abstract class TextualRepresentation
- implements IStreamContentAccessor, ITypedElement {
-
- protected NamedElement owner;
-
- protected Comment source;
-
- protected String text;
-
- public TextualRepresentation() {
- }
-
- public TextualRepresentation(NamedElement owner) {
- this.owner = owner;
- }
-
- public Comment getSource() {
- return this.source;
- }
-
- public void setSource(Comment source) {
- this.source = source;
- }
-
- public NamedElement getOwner() {
- return this.owner;
- }
-
- public void setText(String text) {
- this.text = text;
- }
-
- public String getContent() {
- return this.text;
- }
-
- public String getName() {
- if (this.getOwner() != null) {
- return this.getOwner().getName();
- }
- return null;
- }
-
- public Image getImage() {
- return null;
- }
-
- public String getType() {
- return ITypedElement.TEXT_TYPE;
- }
-
- public InputStream getContents() throws CoreException {
- return new StringInputStream(this.text);
- }
-
- /**
- * Be detached means the textual representation is not attached to a particular comment
- *
- * @return true if no source exists false otherwise
- */
- public boolean isDetached() {
- return this.source == null;
- }
-
- /**
- * Obtain a comparator from the textual representation in order to let the text
- * be compared using range differencing strategy to another textual representation
- *
- * @return
- */
- protected abstract IRangeComparator getRangeComparator();
-
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/IAdvancedDifference.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/IAdvancedDifference.java
deleted file mode 100644
index 0a289fa903d..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/IAdvancedDifference.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet (CEA LIST)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.text.representation.compare;
-
-import org.eclipse.swt.graphics.Point;
-
-public interface IAdvancedDifference {
-
- /**
- * Provide the start index and the end index of the region concerned by the modification (at the left)
- */
- Point getLeftFragmentPosition();
-
- /**
- * Provide the start index and the end index of the region concerned by the modification (at the right)
- */
- Point getRightFragmentPosition();
-
- /**
- * Returns the region of the left hand side representation concerned by the difference
- */
- String getLeftState();
-
- /**
- * Returns the region of the right hand side representation concerned by the difference
- */
- String getRightState();
-
-
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/LineComparator.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/LineComparator.java
deleted file mode 100644
index 9647b1a854e..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/LineComparator.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet (CEA LIST)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.text.representation.compare;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-
-public class LineComparator implements IRangeComparator {
-
- private List<String> lines;
-
- public LineComparator(final String content) {
- this.lines = new ArrayList<String>();
- for (String line : content.split("\n")) {
- lines.add(line);
- }
- }
-
- public String getLine(int index) {
- return this.lines.get(index);
- }
-
- @Override
- public int getRangeCount() {
- return this.lines.size();
- }
-
- @Override
- public boolean rangesEqual(int thisIndex, IRangeComparator other, int otherIndex) {
- String l1 = this.lines.get(thisIndex);
- String l2 = ((LineComparator) other).lines.get(otherIndex);
- return l1.equals(l2);
- }
-
- @Override
- public boolean skipRangeComparison(int length, int maxLength, IRangeComparator other) {
- return false;
- }
-
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/LineDifference.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/LineDifference.java
deleted file mode 100644
index d3c7952b405..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/LineDifference.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.text.representation.compare;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.compare.contentmergeviewer.ITokenComparator;
-import org.eclipse.compare.contentmergeviewer.TokenComparator;
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-import org.eclipse.compare.rangedifferencer.RangeDifference;
-import org.eclipse.compare.rangedifferencer.RangeDifferencer;
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-import org.eclipse.swt.graphics.Point;
-
-/**
- * This class represent a difference between regions of two representations
- */
-public class LineDifference extends RegionDifference implements IAdvancedDifference {
-
- public LineDifference(RangeDifference d, AlfTextualRepresentation leftR,
- AlfTextualRepresentation rightR, IRangeComparator leftC, IRangeComparator rightC) {
- super(d, leftR, rightR, leftC, rightC);
- }
-
- public String getLeftState() {
- Point position = this.getLeftFragmentPosition();
- return this.leftR.getContent().substring(position.x, position.y);
- }
-
- public String getRightState() {
- Point position = this.getRightFragmentPosition();
- return this.rightR.getContent().substring(position.x, position.y);
- }
-
- public Point getLeftFragmentPosition() {
- String[] leftLines = this.leftR.getContent().split(StringUtil.EOL);
- int startIndex = 0;
- for (int i = 0; i < this.leftStart; i++) {
- startIndex += leftLines[i].length() + 1;
- }
- int endIndex = startIndex;
- for (int i = this.leftStart; i < this.leftEnd(); i++) {
- if (this.leftEnd() == leftLines.length) {
- endIndex += leftLines[i].length();
- } else {
- endIndex += leftLines[i].length() + 1;
- }
- }
- return new Point(startIndex, endIndex);
- }
-
- public Point getRightFragmentPosition() {
- String[] rightLines = this.rightR.getContent().split(StringUtil.EOL);
- int startIndex = 0;
- for (int i = 0; i < this.rightStart; i++) {
- startIndex += rightLines[i].length() + 1;
- }
- int endIndex = startIndex;
- for (int i = this.rightStart; i < this.rightEnd(); i++) {
- if (this.rightEnd() == rightLines.length) {
- endIndex += rightLines[i].length();
- } else {
- endIndex += rightLines[i].length() + 1;
- }
- }
- return new Point(startIndex, endIndex);
- }
-
- /**
- * return all the differences between tokens present in the left line and
- * those present at the right line
- *
- * @return tokenDifferences - the list of differences
- */
- public List<TokenDifference> getChildren() {
- ITokenComparator leftTokenComparator = new TokenComparator(this.getLeftState());
- ITokenComparator rightTokenComparator = new TokenComparator(this.getRightState());
- AlfTextualRepresentation leftRepresentation = new AlfTextualRepresentation(null);
- leftRepresentation.setText(this.getLeftState());
- AlfTextualRepresentation rightRepresentation = new AlfTextualRepresentation(null);
- leftRepresentation.setText(this.getRightState());
- RangeDifference[] differences = RangeDifferencer.findDifferences(leftTokenComparator, rightTokenComparator);
- List<TokenDifference> tokenDifferences = new ArrayList<TokenDifference>();
- for (RangeDifference difference : differences) {
- tokenDifferences.add(new TokenDifference(difference, leftRepresentation, rightRepresentation, leftTokenComparator, rightTokenComparator));
- }
- return tokenDifferences;
- }
-
-} \ No newline at end of file
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/RegionDifference.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/RegionDifference.java
deleted file mode 100644
index 7d6d101033b..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/RegionDifference.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.papyrus.uml.alf.text.representation.compare;
-
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-import org.eclipse.compare.rangedifferencer.RangeDifference;
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-
-public abstract class RegionDifference extends RangeDifference implements IAdvancedDifference {
-
- /**
- * The left hand side comparator
- */
- protected IRangeComparator leftC;
-
- /**
- * The right hand side comparator
- */
- protected IRangeComparator rightC;
-
- /**
- * The left side representation
- */
- protected AlfTextualRepresentation leftR;
-
- /**
- * The right side representation
- */
- protected AlfTextualRepresentation rightR;
-
- protected RegionDifference(RangeDifference d, AlfTextualRepresentation leftR,
- AlfTextualRepresentation rightR, IRangeComparator leftC, IRangeComparator rightC) {
- this(d.kind(), d.rightStart(), d.rightLength(), d.leftStart(),
- d.leftLength(), d.ancestorStart(), d.ancestorLength());
- this.leftC = leftC;
- this.rightC = rightC;
- this.leftR = leftR;
- this.rightR = rightR;
- }
-
- public RegionDifference(int kind, int rightStart, int rightLength, int leftStart, int leftLength,
- int ancestorStart, int ancestorLength) {
- super(kind, rightStart, rightLength, leftStart, leftLength, ancestorStart, ancestorLength);
- }
-
- /**
- * Return true if the current difference represents a deletion. Typically a deletion means
- * a member in the right state disappeared in the left state
- */
- public boolean isDeletion() {
- return !StringUtil.isNegligible(this.getLeftState()) && StringUtil.isNegligible(this.getRightState());
- }
-
- /**
- * Return true if the current difference represents an addition. An addition is the exact reverse
- * of a deletion (i.e. we have a member in the left that does exists in the right states).
- */
- public boolean isAddition() {
- return StringUtil.isNegligible(this.getLeftState()) && !StringUtil.isNegligible(this.getRightState());
- }
-
- /**
- * Return true if the current difference represents a change. A change is an update of a member
- * existing in the right state
- */
- public boolean isChange() {
- return !StringUtil.isNegligible(this.getLeftState()) && !StringUtil.isNegligible(this.getRightState());
- }
-
- public String toString() {
- String serialization = "\n=======================DIFF=======================\n";
- serialization += this.getLeftState();
- serialization += "\n==================================================\n";
- serialization += this.getRightState();
- serialization += "\n=====================END DIFF=====================\n";
- return serialization;
- }
-
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/StringUtil.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/StringUtil.java
deleted file mode 100644
index e3120567d8d..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/StringUtil.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.text.representation.compare;
-
-public class StringUtil {
-
- public static final char CHAR_EOL = '\n';
- public static final String EOL = "\n";
-
- /**
- * Return true if the given string is not negligible to be used in a comparison
- *
- * @param str
- * - the assessed string
- * @return negligible
- */
- public static final boolean isNegligible(String str) {
- boolean negligible = true;
- if (!str.isEmpty()) {
- int i = 0;
- while (negligible && i < str.length()) {
- if (str.charAt(i) != '\n'
- && str.charAt(i) != '\r'
- && str.charAt(i) != ' '
- && str.charAt(i) != '\t') {
- negligible = false;
- }
- i++;
- }
- }
- return negligible;
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/TokenDifference.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/TokenDifference.java
deleted file mode 100644
index f1ffebdd9de..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/TokenDifference.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet (CEA LIST)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.text.representation.compare;
-
-import org.eclipse.compare.contentmergeviewer.ITokenComparator;
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-import org.eclipse.compare.rangedifferencer.RangeDifference;
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-import org.eclipse.swt.graphics.Point;
-
-public class TokenDifference extends RegionDifference implements IAdvancedDifference {
-
- public TokenDifference(RangeDifference d, AlfTextualRepresentation leftR,
- AlfTextualRepresentation rightR, IRangeComparator leftC, IRangeComparator rightC) {
- super(d, leftR, rightR, leftC, rightC);
- }
-
- public String getLeftState() {
- String result = "";
- int startIndex = ((ITokenComparator) this.leftC).getTokenStart(this.leftStart);
- int endIndex = 0;
- for (int i = this.leftStart; i <= this.leftEnd(); i++) {
- endIndex += ((ITokenComparator) this.leftC).getTokenLength(i);
- }
- result = this.leftR.getContent().substring(startIndex, startIndex + endIndex);
- return result;
- }
-
- @Override
- public String getRightState() {
- String result = "";
- int endIndex = 0;
- int startIndex = ((ITokenComparator) this.rightC).getTokenStart(this.rightStart);
- for (int i = this.rightStart; i <= this.rightEnd(); i++) {
- endIndex += ((ITokenComparator) this.rightC).getTokenLength(i);
- }
- result = this.rightR.getContent().substring(startIndex, startIndex + endIndex);
- return result;
- }
-
- public Point getLeftFragmentPosition() {
- return new Point(((ITokenComparator) this.leftC).getTokenStart(this.leftStart),
- ((ITokenComparator) this.leftC).getTokenStart(this.leftEnd()) + ((ITokenComparator) this.leftC).getTokenLength(this.leftEnd()));
- }
-
- public Point getRightFragmentPosition() {
- return new Point(((ITokenComparator) this.rightC).getTokenStart(this.rightStart),
- ((ITokenComparator) this.rightC).getTokenStart(this.rightEnd()) + ((ITokenComparator) this.rightC).getTokenLength(this.rightEnd()));
- }
-
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/util/RepresentationParser.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/util/RepresentationParser.java
deleted file mode 100644
index b6496533214..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/util/RepresentationParser.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.text.representation.util;
-
-import java.sql.Timestamp;
-import java.util.Calendar;
-
-import org.eclipse.papyrus.uml.alf.libraries.helper.AlfUtil;
-import org.eclipse.papyrus.uml.alf.libraries.helper.BackupState;
-import org.eclipse.papyrus.uml.alf.libraries.helper.BackupUtil;
-import org.eclipse.papyrus.uml.alf.libraries.helper.BackupState.EditionStatus;
-import org.eclipse.papyrus.uml.alf.text.generation.DefaultEditStringRetrievalStrategy;
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Stereotype;
-
-public class RepresentationParser {
-
- private static RepresentationParser parser;
-
- private BackupUtil helperBackup;
-
- private AlfUtil helperAlf;
-
- private RepresentationParser() {
- this.helperBackup = BackupUtil.getInstance();
- this.helperAlf = AlfUtil.getInstance();
- }
-
- public static RepresentationParser getInstance() {
- if (parser == null) {
- parser = new RepresentationParser();
- }
- return parser;
- }
-
- /**
- * Load the textual representation attached to a model element which is a NamedElement
- *
- * @param modelElement
- * @return representation
- * @throws RepresentationParsingError
- */
- public AlfTextualRepresentation parse(NamedElement modelElement) throws RepresentationParsingError {
- if (modelElement == null) {
- throw new RepresentationParsingError(
- "The model element for which the representation is calculated cannot be null");
- }
- AlfTextualRepresentation representation = new AlfTextualRepresentation(modelElement);
- Comment comment = helperAlf.getTextualRepresentationComment(modelElement);
- if (comment != null) {
- representation.setSource(comment);
- representation.setText(comment.getBody());
- if (helperBackup.isBackup(comment)) {
- Stereotype backup = helperBackup.getBackupStereotype(modelElement);
- if (backup != null) {
- representation.setEditionState(helperBackup.getBackupState(comment));
- }
- }
- } else {
- representation.setText(new DefaultEditStringRetrievalStrategy().getGeneratedEditString(modelElement));
- }
- return representation;
- }
-
- /**
- * Capture the textual representation of a model element. It does not returns an already registered representation
- * associated to this element. It captures the current state of a model element.
- *
- * @param modelElement
- * @return representation
- * @throws RepresentationParsingError
- */
- public AlfTextualRepresentation getSnapshot(NamedElement modelElement) throws RepresentationParsingError {
- if (modelElement == null) {
- throw new RepresentationParsingError(
- "The model element for which the representation is calculated cannot be null");
- }
- AlfTextualRepresentation representation = new AlfTextualRepresentation(modelElement);
- representation.setText(new DefaultEditStringRetrievalStrategy().getGeneratedEditString(modelElement));
- representation.setEditionState(new BackupState(
- new Timestamp(Calendar.getInstance().getTimeInMillis()),
- EditionStatus.MERGED));
- return representation;
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/util/RepresentationParsingError.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/util/RepresentationParsingError.java
deleted file mode 100644
index fbc6e82baef..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/util/RepresentationParsingError.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * J�r�mie Tatibouet (CEA LIST)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.text.representation.util;
-
-@SuppressWarnings("serial")
-public class RepresentationParsingError extends Exception {
-
- public RepresentationParsingError() {
- }
-
- public RepresentationParsingError(String arg0) {
- super(arg0);
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.classpath b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.classpath
deleted file mode 100644
index b1dabee3829..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.project b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.project
deleted file mode 100644
index 578c14e5c99..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.alf.transaction</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/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.settings/org.eclipse.jdt.core.prefs b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 9ca8e68231b..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,291 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
-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/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.settings/org.eclipse.jdt.ui.prefs b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 954281dbc31..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,68 +0,0 @@
-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/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/META-INF/MANIFEST.MF b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/META-INF/MANIFEST.MF
deleted file mode 100644
index ab8fe65f04b..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: ALF Transaction (Incubation)
-Bundle-SymbolicName: org.eclipse.papyrus.uml.alf.transaction;singleton:=true
-Bundle-Version: 0.7.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.alf.transaction.ActivatorTransaction
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.uml2.uml;bundle-version="5.1.0",
- org.eclipse.papyrus.uml.alf.libraries;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.emf.commands.core,
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.common.ui.services,
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.xtext.integration.ui;bundle-version="1.1.0",
- org.eclipse.xtext.ui;bundle-version="2.8.0",
- org.eclipse.papyrus.uml.alf;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.alf.text;bundle-version="0.7.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
- org.eclipse.compare,
- org.eclipse.papyrus.uml.alf.preferences
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.papyrus.uml.alf.transaction,
- org.eclipse.papyrus.uml.alf.transaction.commands,
- org.eclipse.papyrus.uml.alf.transaction.commit,
- org.eclipse.papyrus.uml.alf.transaction.job,
- org.eclipse.papyrus.uml.alf.transaction.observation.listener.filter
-Bundle-Vendor: Eclipse Modeling Project
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/about.html b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/about.html
deleted file mode 100644
index 209103075a7..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>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/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/build.properties b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/build.properties
deleted file mode 100644
index e3693a3b66e..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.xml
-src.includes = about.html
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/plugin.xml b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/plugin.xml
deleted file mode 100644
index fb44258b67e..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/plugin.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.papyrus.infra.core.service">
- <service
- classname="org.eclipse.papyrus.uml.alf.transaction.observation.FUMLElementService"
- description="Service to register a listener onto model elements that are in the fUML subset"
- id="org.eclipse.papyrus.uml.alf.transaction.observation.FUMLElementService"
- priority="1"
- startKind="startup">
- <dependsOn
- description="Editing domain which will receive the fUML listener"
- serviceKeyRef="org.eclipse.emf.transaction.TransactionalEditingDomain">
- </dependsOn>
- </service>
- </extension>
-
-</plugin>
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/pom.xml b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/pom.xml
deleted file mode 100644
index 0481b13be2a..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>3.0.0-SNAPSHOT</version>
- <relativePath>../../../../releng/extra</relativePath>
- </parent>
- <artifactId>org.eclipse.papyrus.uml.alf.transaction</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>0.7.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/ActivatorTransaction.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/ActivatorTransaction.java
deleted file mode 100644
index fd7eff3f384..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/ActivatorTransaction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.papyrus.uml.alf.transaction;
-
-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 ActivatorTransaction extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.alf.transaction"; //$NON-NLS-1$
-
- // The shared instance
- private static ActivatorTransaction plugin;
-
- public static LogHelper logger;
-
- /**
- * The constructor
- */
- public ActivatorTransaction() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- logger = new LogHelper(plugin);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- logger = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static ActivatorTransaction getDefault() {
- return plugin;
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/AlfCommand.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/AlfCommand.java
deleted file mode 100644
index 37109581d15..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/AlfCommand.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- * Arnaud Cuccuru
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.commands;
-
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-import org.eclipse.uml2.uml.NamedElement;
-
-/**
- * Transaction used by the ALF framework to persist modification of UML model
- */
-public abstract class AlfCommand extends RecordingCommand {
-
- /**
- * The state of a particular model element given as text
- */
- protected AlfTextualRepresentation modelElementState;
-
-
- public AlfCommand(String commandLabel, AlfTextualRepresentation state) {
- super(TransactionUtil.getEditingDomain(state.getOwner()));
- this.modelElementState = state;
- }
-
- /**
- * Returns the UML named element target by the command execution
- */
- public NamedElement getCommandTarget() {
- return this.modelElementState.getOwner();
- }
-
- /**
- * Returns the modification that need to be applied to a particular model element
- */
- public AlfTextualRepresentation getModelElementState() {
- return this.modelElementState;
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/AlfCommandFactory.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/AlfCommandFactory.java
deleted file mode 100644
index 9c1f484dd61..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/AlfCommandFactory.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jérémie Tatibouet
- * Arnaud Cuccuru
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.commands;
-
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-
-/**
- * Factory providing facilities to instantiate ALF commands.
- */
-public class AlfCommandFactory {
-
- /** The factory. */
- private static AlfCommandFactory factory;
-
- /**
- * Instantiates a new alf command factory.
- */
- private AlfCommandFactory() {
- }
-
- /**
- * Gets the single instance of AlfCommandFactory.
- *
- * @return single instance of AlfCommandFactory
- */
- public static AlfCommandFactory getInstance() {
- if (factory == null) {
- factory = new AlfCommandFactory();
- }
- return factory;
- }
-
- /**
- * Creates a new AlfCommand object.
- *
- * @param element
- * the element
- * @param textualRepresentation
- * the textual representation
- * @return the abstract transactional command
- */
- public AlfCommand createCompilationCommand(AlfTextualRepresentation representation) {
- return new CompileCommand(representation);
- }
-
- /**
- * Creates a new AlfCommand object.
- *
- * @param element
- * the element
- * @param textualRepresentation
- * the textual representation
- * @return the abstract transactional command
- */
- public AlfCommand creatSaveCommand(AlfTextualRepresentation representation) {
- return new VersioningSaveCommand(representation);
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/AlfCommandLabels.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/AlfCommandLabels.java
deleted file mode 100644
index 727c1a02ee8..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/AlfCommandLabels.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- * Arnaud Cuccuru
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.commands;
-
-/**
- * Provides ALF commands labels.
- */
-public class AlfCommandLabels {
-
- public static final String COMPILATION = "Compilation";
-
- public static final String CREATE_OR_UPDATE_TEXTUAL_REPRESENTATION = "Create Or Update Textual Representation";
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/CompileCommand.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/CompileCommand.java
deleted file mode 100644
index d9455109ec7..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/CompileCommand.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- * Arnaud Cuccuru
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.commands;
-
-import org.eclipse.core.runtime.AssertionFailedException;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.papyrus.uml.alf.AlfCompiler;
-import org.eclipse.papyrus.uml.alf.MappingError;
-import org.eclipse.papyrus.uml.alf.ParsingError;
-import org.eclipse.papyrus.uml.alf.libraries.helper.AlfUtil;
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-import org.eclipse.uml2.uml.Model;
-import org.eclipse.uml2.uml.NamedElement;
-
-/**
- * This command enables the compilation (ALF->fUML) of the given textual representation
- */
-public class CompileCommand extends AlfCommand {
-
- protected CompileCommand(AlfTextualRepresentation modelElementState) {
- super(AlfCommandLabels.COMPILATION, modelElementState);
- }
-
- /**
- * Compile the description provided by the textual representation and merge
- * them within the current model element
- */
- protected void doExecute() {
- NamedElement context = this.modelElementState.getOwner();
- Model root = context.getModel();
- if (root != null) {
- AlfCompiler alfCompiler = new AlfCompiler(
- (NamedElement) this.modelElementState.getOwner(),
- AlfUtil.getInstance().getStandardProfile(root),
- AlfUtil.getInstance().getActionLanguageProfile(root));
- try {
- alfCompiler.compile(this.modelElementState.getContent());
- } catch (ParsingError e) {
- e.printStackTrace();
- throw new WrappedException(e);
- } catch (MappingError e) {
- e.printStackTrace();
- throw new WrappedException(e);
- } catch (AssertionFailedException e) {
- e.printStackTrace();
- }
- }
- }
-
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/SaveCommand.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/SaveCommand.java
deleted file mode 100644
index af4fe98714d..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/SaveCommand.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- * Arnaud Cuccuru
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.commands;
-
-import org.eclipse.papyrus.uml.alf.libraries.helper.AlfUtil;
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * This command enables the backup of the specification of particular model element
- * in a comment owned by this latter
- */
-public class SaveCommand extends AlfCommand {
-
- protected SaveCommand(AlfTextualRepresentation representation) {
- super(AlfCommandLabels.CREATE_OR_UPDATE_TEXTUAL_REPRESENTATION, representation);
- }
-
- /**
- * Saves the specification in a comment stereotyped TextualRepresentation
- */
- protected void doExecute() {
- AlfUtil helper = AlfUtil.getInstance();
- /* 1. Make sure it exists a comment to save the model element description */
- Comment comment = this.modelElementState.getSource();
- if (comment == null) {
- comment = UMLFactory.eINSTANCE.createComment();
- this.modelElementState.setSource(comment);
- }
- /* 2. Make sure the comment used to save the model element description has a owner */
- if (comment.getOwner() == null) {
- this.modelElementState.getOwner().getOwnedComments().add(comment);
- }
- /* 3. Set the body of the comment with the model element description */
- comment.setBody(this.modelElementState.getContent());
- /* 4. Make sure the TextualRepresentation stereotype is applied onto the comment */
- if (!helper.isATextualRepresentationComment(comment)) {
- helper.applyTextualRepresentation(comment);
- }
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/VersioningSaveCommand.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/VersioningSaveCommand.java
deleted file mode 100644
index 5d67da750ee..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commands/VersioningSaveCommand.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet (CEA LIST)
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.commands;
-
-import org.eclipse.papyrus.uml.alf.libraries.helper.BackupUtil;
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-
-public class VersioningSaveCommand extends SaveCommand {
-
- protected VersioningSaveCommand(AlfTextualRepresentation representation) {
- super(representation);
- }
-
- /**
- * In addition to save the specification of a model element, this command
- * also serialization about edition time and status (i.e. is the specification
- * merged into the model or is it just saved in the comment waiting to be propagated).
- */
- protected void doExecute() {
- /* 1. Saves the stereotyped comment in the model */
- super.doExecute();
- /* 2. Save time and edition status */
- BackupUtil.getInstance().applyBackup(this.modelElementState.getSource(), this.modelElementState.getEditionState());
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/ChangeScenario.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/ChangeScenario.java
deleted file mode 100644
index 406951252e7..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/ChangeScenario.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.commit;
-
-import org.eclipse.papyrus.uml.alf.libraries.helper.AlfUtil;
-import org.eclipse.papyrus.uml.alf.libraries.helper.BackupUtil;
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-
-public abstract class ChangeScenario extends Scenario implements IChangeScenario {
-
- /**
- * The model state that is taken as reference to perform a change
- */
- protected AlfTextualRepresentation modelStateToBeCommitted;
-
- public ChangeScenario() {
- super();
- this.modelStateToBeCommitted = null;
- }
-
- public void before() {
- /* 1. Apply action language profile if it is not already applied */
- if (!AlfUtil.getInstance().isActionLanguageProfileApplied(this.currentModelState.getOwner())) {
- AlfUtil.getInstance().applyActionLanguageProfile(this.currentModelState.getOwner());
- }
- /* 2. Apply standard profile if it is not already applied */
- if (!AlfUtil.getInstance().isStandardProfileApplied(this.currentModelState.getOwner())) {
- AlfUtil.getInstance().applyStandardProfile(this.currentModelState.getOwner());
- }
- /* 3. Apply backup profile if it is not already applied */
- if (!BackupUtil.getInstance().isBackupProfileApplied(this.currentModelState.getOwner())) {
- BackupUtil.getInstance().applyBackupProfile(this.currentModelState.getOwner());
- }
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/CommitScenario.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/CommitScenario.java
deleted file mode 100644
index 0cd452e2a45..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/CommitScenario.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.commit;
-
-//import static org.eclipse.papyrus.uml.alf.transaction.ActivatorTransaction.logger;
-
-import java.sql.Timestamp;
-import java.util.Calendar;
-
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.papyrus.uml.alf.libraries.helper.BackupState;
-import org.eclipse.papyrus.uml.alf.libraries.helper.BackupState.EditionStatus;
-import org.eclipse.papyrus.uml.alf.transaction.job.AlfCompilationJob;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.uml.NamedElement;
-
-
-/**
- * This class describes the process of propagating the state of a particular
- * model element in a given UML model
- */
-public class CommitScenario extends ChangeScenario {
-
- /**
- * Flag use to know if the commit is required. it may change in the before method
- */
- private boolean isCommitRequired;
-
- /**
- * Text editor that can be updated when the commit scenario is done
- */
- private StyledText view;
-
- public CommitScenario() {
- super();
- this.isCommitRequired = true;
- }
-
- public void bindView(StyledText view){
- this.view = view;
- }
-
- /**
- * Update the user model state edition status
- */
- public void before() {
- /* 1. Check parent constraints */
- super.before();
- /* 2. Update user model state meta-data */
- BackupState editionState = new BackupState();
- editionState.status = EditionStatus.MERGED;
- editionState.timestamp = new Timestamp(Calendar.getInstance().getTimeInMillis());
- this.userModelState.setEditionState(editionState);
- this.modelStateToBeCommitted = this.userModelState;
- }
-
- /**
- * Propagate the model state specified in text within the model
- *
- * @param - the model element to update with the specified changes
- */
- public void execute(NamedElement target, final String lastEditedVersion) {
- /* 1. Load the states of the target */
- this.init(target);
- if (!this.userModelState.getContent().equals(lastEditedVersion)) {
- this.userModelState.setText(lastEditedVersion);
- }
- /* 2. Realize before actions */
- this.before();
- if (this.isCommitRequired) {
- /* 3.1. Schedule a job in charge of propagated the changes in the model */
- Job job = new AlfCompilationJob(this.modelStateToBeCommitted);
- job.setPriority(Job.SHORT);
- job.addJobChangeListener(new JobChangeAdapter() {
- @Override
- public void done(IJobChangeEvent event) {
- CommitScenario.this.after();
- }
- });
- job.schedule();
- } else {
- this.isCommitRequired = true;
- }
- }
-
- /**
- * This method is automatically called after the job scheduled by this scenario terminates.
- */
- public void after() {
- if(this.view!=null && !this.view.isDisposed()){
- Display.getDefault().syncExec(new Runnable() {
- @Override
- public void run() {
- CommitScenario.this.view.setText(CommitScenario.this.modelStateToBeCommitted.getContent());
- }
- });
- }
- }
-
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/IChangeScenario.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/IChangeScenario.java
deleted file mode 100644
index bedb1638a9a..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/IChangeScenario.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.papyrus.uml.alf.transaction.commit;
-
-import org.eclipse.uml2.uml.NamedElement;
-
-public interface IChangeScenario {
-
- /**
- * The core method of a scenario
- *
- * @param target
- * - the element for which the scenario is executed
- * @param lastEditedVersion
- * - the last version of the textual representation (usually in an editor)
- */
- public void execute(NamedElement target, final String lastEditedVersion);
-
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/IScenario.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/IScenario.java
deleted file mode 100644
index 55f4b014bc3..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/IScenario.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.commit;
-
-public abstract interface IScenario {
-
- /**
- * Computations that need to be realized before the main method of the scenario
- */
- public void before();
-
- /**
- * Computations that need to be realized after the main method of the scenario
- */
- public void after();
-
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/ISyncScenario.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/ISyncScenario.java
deleted file mode 100644
index 4091fc63705..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/ISyncScenario.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 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:
- * Jeremie Tatibouet (CEA LIST)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.commit;
-
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.uml2.uml.Element;
-
-public interface ISyncScenario {
-
- public Command synchronize(HashMap<Element, List<Notification>> changes);
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/SaveScenario.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/SaveScenario.java
deleted file mode 100644
index de7ee69f5e2..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/SaveScenario.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.commit;
-
-//import static org.eclipse.papyrus.uml.alf.transaction.ActivatorTransaction.logger;
-
-import java.sql.Timestamp;
-import java.util.Calendar;
-
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.papyrus.uml.alf.libraries.helper.BackupState;
-import org.eclipse.papyrus.uml.alf.libraries.helper.BackupState.EditionStatus;
-import org.eclipse.papyrus.uml.alf.transaction.job.SaveTextualRepresentationJob;
-import org.eclipse.uml2.uml.NamedElement;
-
-/**
- * This class describes the process of persisting the state description
- * attached to a particular model element.
- */
-public class SaveScenario extends ChangeScenario {
-
- /**
- * Flag use to know if the backup is required. It may change in the before method
- */
- private boolean isBackupRequired;
-
- public SaveScenario() {
- super();
- this.isBackupRequired = true;
- }
-
- /**
- * If the <code>userModelState<code> and the <code>currentModelState<code> are not different
- * then consider the textual specification was MERGED. Otherwise, the user model stand point
- * is considered as SAVED. Typically it diverges from state of the current model.
- */
- public void before() {
- super.before();
- if (!this.userModelState.isDifferent(this.currentModelState)) {
- this.userModelState.rebase(this.currentModelState);
- } else {
- BackupState editionState = new BackupState();
- editionState.status = EditionStatus.SAVED;
- editionState.timestamp = new Timestamp(Calendar.getInstance().getTimeInMillis());
- this.userModelState.setEditionState(editionState);
- }
- this.modelStateToBeCommitted = this.userModelState;
- }
-
- /**
- * Persist in the model the state of the target as a comment
- *
- * @param target
- * - the model element state to persist
- */
- public void execute(NamedElement target, final String lastEditedVersion) {
- /* 1. Load the states of the target */
- this.init(target);
- if (!this.userModelState.getContent().equals(lastEditedVersion)) {
- this.userModelState.setText(lastEditedVersion);
- }
- /* 2. Realize before actions */
- this.before();
- /* 3. Is a backup required */
- if (this.isBackupRequired) {
- /* 3.1. Schedule a job in charge of saving target state */
- Job job = new SaveTextualRepresentationJob(this.modelStateToBeCommitted);
- job.setPriority(Job.SHORT);
- job.addJobChangeListener(new JobChangeAdapter() {
- @Override
- public void done(IJobChangeEvent event) {
- SaveScenario.this.after();
- }
- });
- job.schedule();
- } else {
- this.isBackupRequired = true;
- }
- }
-
- /**
- * This method is automatically called after the job scheduled by this scenario terminates.
- */
- public void after() {
- //logger.info("Save Job Done");
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/Scenario.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/Scenario.java
deleted file mode 100644
index dc5cb875881..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/Scenario.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.commit;
-
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-import org.eclipse.papyrus.uml.alf.text.representation.util.RepresentationParser;
-import org.eclipse.papyrus.uml.alf.text.representation.util.RepresentationParsingError;
-import org.eclipse.uml2.uml.NamedElement;
-
-import static org.eclipse.papyrus.uml.alf.transaction.ActivatorTransaction.logger;
-
-public abstract class Scenario implements IScenario {
-
- /**
- * The textual representation of a model element from the user stand point
- */
- protected AlfTextualRepresentation userModelState;
-
- /**
- * The textual representation of a model element from the semantic model stand point
- */
- protected AlfTextualRepresentation currentModelState;
-
- public Scenario() {
- this.userModelState = null;
- this.currentModelState = null;
- }
-
- protected void init(NamedElement target) throws IllegalArgumentException {
- if (target == null) {
- throw new IllegalArgumentException("The model element provided to the scenario cannot be null");
- }
- try {
- this.userModelState = RepresentationParser.getInstance().parse(target);
- this.currentModelState = RepresentationParser.getInstance().getSnapshot(target);
- } catch (RepresentationParsingError e) {
- logger.error("Parsing of ["+target.getName()+"]", e);
- } catch(RuntimeException e){
- logger.error("Serialization of ["+target.getName()+"] failed", e);
- }
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/ScenarioFactory.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/ScenarioFactory.java
deleted file mode 100644
index ced2cf605ed..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/ScenarioFactory.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.commit;
-
-public class ScenarioFactory {
-
- private static ScenarioFactory INSTANCE;
-
- private ScenarioFactory() {
- }
-
- public static ScenarioFactory getInstance() {
- if (INSTANCE == null) {
- INSTANCE = new ScenarioFactory();
- }
- return INSTANCE;
- }
-
- public IChangeScenario createSaveScenario() {
- return new SaveScenario();
- }
-
- public IChangeScenario createCommitScenario() {
- return new CommitScenario();
- }
-
- public ISyncScenario createSyncScenario() {
- return new SyncScenario();
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/SyncScenario.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/SyncScenario.java
deleted file mode 100644
index 19f278b4461..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/commit/SyncScenario.java
+++ /dev/null
@@ -1,511 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet (CEA LIST)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.commit;
-
-import static org.eclipse.papyrus.uml.alf.transaction.ActivatorTransaction.logger;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.uml.alf.text.merge.manual.AlfCompareEditor;
-import org.eclipse.papyrus.uml.alf.text.merge.manual.MergeActionDialog;
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-import org.eclipse.papyrus.uml.alf.transaction.commands.AlfCommandFactory;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.uml.Association;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Classifier;
-import org.eclipse.uml2.uml.DataType;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ElementImport;
-import org.eclipse.uml2.uml.Enumeration;
-import org.eclipse.uml2.uml.EnumerationLiteral;
-import org.eclipse.uml2.uml.Feature;
-import org.eclipse.uml2.uml.Generalization;
-import org.eclipse.uml2.uml.Model;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.PackageImport;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Signal;
-import org.eclipse.uml2.uml.UMLPackage;
-
-public class SyncScenario extends Scenario implements ISyncScenario {
-
- /**
- * The model state that is taken as reference to perform the synchronization
- */
- protected AlfTextualRepresentation modelStateToBeCommitted;
-
- public SyncScenario() {
- super();
- this.modelStateToBeCommitted = null;
- }
-
- /**
- * Checks required before to perform a synchronization
- */
- public void before() {
- /* 1. It means the user model has not been saved in the current model */
- if (this.userModelState.isSaved()) {
- /* 1.1. The two models diverge */
- if (this.userModelState.isDifferent(this.currentModelState)) {
- MergeActionDialog mergeActionDialog = new MergeActionDialog(Display.getCurrent().getActiveShell(), this.currentModelState.getOwner());
- /* 1.1.1. The user has to choose what to do */
- if (mergeActionDialog.open() == Window.OK) {
- if (mergeActionDialog.getReturnCode() == MergeActionDialog.REBASE) {
- this.userModelState.rebase(this.currentModelState);
- this.modelStateToBeCommitted = this.userModelState;
- } else if (mergeActionDialog.getReturnCode() == MergeActionDialog.MERGE) {
- CompareUI.openCompareDialog(new AlfCompareEditor(this.userModelState, this.currentModelState));
- } else {
- this.currentModelState.reconcile(this.userModelState);
- this.currentModelState.setSource(this.userModelState.getSource());
- this.modelStateToBeCommitted = this.currentModelState;
- }
- }
- } else {
- this.modelStateToBeCommitted = this.userModelState.rebase(this.currentModelState);
- }
- } else {
- this.modelStateToBeCommitted = this.userModelState.rebase(this.currentModelState);
- }
- }
-
- public Command synchronize(HashMap<Element, List<Notification>> changes) {
- CompoundCommand compoundCommand = new CompoundCommand("synchronize");
- for (NamedElement affectedElement : this.getSynchronizationPoints(changes)) {
- compoundCommand.append(this._synchronize(affectedElement));
- }
- return compoundCommand;
- }
-
- /**
- * Compute the set of element that need to have their serialization updated
- *
- * @param changes
- * the list of changes per UML element
- *
- * @return syncPoints
- * the list of UML elements that will have their serialization updated
- */
- protected Set<NamedElement> getSynchronizationPoints(HashMap<Element, List<Notification>> changes) {
- Set<NamedElement> syncPoints = new HashSet<NamedElement>();
- /*1. Take out changes that cannot be handled*/
- this.preFilter(changes);
- /*2. Compute synchronization targets according to changes*/
- for (Element target : changes.keySet()) {
- //logger.info("[MODIFIED] "+ target.toString());
- if(target instanceof PackageImport ||target instanceof ElementImport){
- syncPoints.addAll(this.getUpdateTargets(target, changes.get(target)));
- }else if(target instanceof Association){
- syncPoints.addAll(this.getUpdateTargets((Association) target, changes.get(target)));
- }else if (target instanceof Generalization){
- syncPoints.addAll(this.getUpdateTargets((Generalization) target, changes.get(target)));
- }else if (target instanceof Package) {
- syncPoints.addAll(this.getUpdateTargets((Package) target, changes.get(target)));
- } else if (target instanceof Classifier) {
- syncPoints.addAll(this.getUpdateTargets((Classifier) target, changes.get(target)));
- } else if (target instanceof Feature) {
- syncPoints.addAll(this.getUpdateTargets((Feature) target, changes.get(target)));
- } else if(target instanceof EnumerationLiteral){
- syncPoints.addAll(this.getUpdateTargets((EnumerationLiteral) target, changes.get(target)));
- }
- }
- /*for (NamedElement element : syncPoints) {
- logger.info("[UPADTED] " + element);
- }*/
- return syncPoints;
- }
-
- /**
- * Takes out from a map of changes those that cannot be computed by synchronization engine
- *
- * @param changes
- * the list of notifications per modified object
- */
- private void preFilter(HashMap<Element, List<Notification>> changes){
- for(Element element : changes.keySet()){
- Iterator<Notification> iterator = changes.get(element).iterator();
- while(iterator.hasNext()){
- Notification notification = iterator.next();
- if(!this.isWorkable(notification)){
- iterator.remove();
- }
- }
- }
- }
-
- /**
- * Determine if an ADD notification can be used by the synchronizer or not.
- * Typically such notification can be used if the new value has a name.
- *
- * NOTE: necessity of this check was introduced by the arrival of notification
- * for which created values (newValue) had no name.
- *
- * @return true if the notification can be used false otherwise
- */
- private boolean isWorkable(Notification notification){
- boolean isWorkable = true;
- if(notification.getNewValue()!=null && notification.getEventType()==Notification.ADD){
- if(notification.getNewValue() instanceof NamedElement){
- isWorkable = ((NamedElement)notification.getNewValue()).getName() != null;
- }
- }
- return isWorkable;
- }
-
- /**
- * Get the set of elements that are intended to have their serialization updated
- *
- * @param element
- * the given element can only be an element import or a package import
- *
- * @param changes
- * the list of changes having affected the given element
- *
- * @return targets
- * the of elements that need to have their serialization updated due to the changes
- */
- protected Set<NamedElement> getUpdateTargets(Element element, List<Notification> changes) {
- assert (element instanceof ElementImport || element instanceof PackageImport) : "element can only be an element import or a package import";
- Set<NamedElement> targets = new HashSet<NamedElement>();;
- Iterator<Notification> changesIterator = changes.iterator();
- while (changesIterator.hasNext()) {
- Notification notification = changesIterator.next();
- switch(notification.getEventType()){
- case Notification.SET:{
- EStructuralFeature feature = (EStructuralFeature) notification.getFeature();
- if(feature == UMLPackage.eINSTANCE.getElementImport_ImportingNamespace()
- || feature == UMLPackage.eINSTANCE.getElementImport_ImportingNamespace()){
- /*The old importing namespace has to be updated*/
- if(notification.getNewValue()==null){
- targets.addAll(this.getParentPath((Element)notification.getOldValue()));
- }else{ /*The new importing namespace has to be updated*/
- targets.addAll(this.getParentPath((Element)notification.getNewValue()));
- }
- }else{
- if(feature == UMLPackage.eINSTANCE.getPackageImport_ImportedPackage()){
- if(element.getModel() != ((PackageImport)element).getImportingNamespace()){
- targets.addAll(this.getParentPath(element.getOwner()));
- }
- }else{
- targets.addAll(this.getParentPath(element.getOwner()));
- }
- }
- }break;
- }
- }
- return targets;
- }
-
- /**
- * Get the set of elements that are intended to have their serialization updated
- *
- * @param generalization
- * a generalization relationship that exists between two classifier
- *
- * @param changes
- * the list of changes having affected the given element
- *
- * @return targets
- * the of elements that need to have their serialization updated due to the changes
- */
- protected Set<NamedElement> getUpdateTargets(Generalization generalization, List<Notification> changes) {
- Set<NamedElement> targets = new HashSet<NamedElement>();
- Iterator<Notification> changesIterator = changes.iterator();
- while (changesIterator.hasNext()) {
- Notification notification = changesIterator.next();
- switch(notification.getEventType()){
- case Notification.SET:{
- if(notification.getFeature()==UMLPackage.eINSTANCE.getGeneralization_General()){
- targets.addAll(this.getParentPath(generalization.getSpecific()));
- }else if (notification.getFeature()==UMLPackage.eINSTANCE.getGeneralization_Specific()){
- targets.addAll(this.getParentPath((Element)notification.getOldValue()));
- targets.addAll(this.getParentPath((Element)notification.getNewValue()));
- }
- }
- break;
- }
- }
- return targets;
- }
-
- /**
- * Get the set of elements that are intended to have their serialization updated
- *
- * @param element
- * the package that was modified
- *
- * @param changes
- * the list of changes describing updates applied on this package
- *
- * @return targets
- * the set of element to update
- */
- protected Set<NamedElement> getUpdateTargets(Package element, List<Notification> changes) {
- Set<NamedElement> targets = new HashSet<NamedElement>();
- Iterator<Notification> changesIterator = changes.iterator();
- while (changesIterator.hasNext()) {
- Notification notification = changesIterator.next();
- switch (notification.getEventType()) {
- case Notification.ADD: {
- if (notification.getFeature() == UMLPackage.eINSTANCE.getPackage_PackagedElement()) {
- targets.addAll(this.getUpdateTarget((NamedElement) notification.getNewValue()));
- }
- }
- break;
- case Notification.REMOVE: {
- EStructuralFeature feature = (EStructuralFeature)notification.getFeature();
- if (feature == UMLPackage.eINSTANCE.getPackage_PackagedElement()) {
- NamedElement oldValue = (NamedElement) notification.getOldValue();
- if (oldValue.getModel() != null) {
- targets.addAll(this.getUpdateTarget((NamedElement) notification.getOldValue()));
- }
- }else if(feature == UMLPackage.eINSTANCE.getNamespace_PackageImport()
- || feature == UMLPackage.eINSTANCE.getNamespace_ElementImport()){
- targets.addAll(this.getParentPath(element));
- }
- }
- break;
- }
- }
- targets.addAll(this.getUpdateTarget(element));
- return targets;
- }
-
- /**
- * Retrieve the set of elements that need to be updated afterwards that the given target was modified
- *
- * @param target
- * the source element
- *
- * @return targets
- * the set of elements to update
- */
- protected Set<NamedElement> getUpdateTarget(Element target) {
- Set<NamedElement> targets = new HashSet<NamedElement>();
- targets.addAll(this.getParentPath(target));
- targets.addAll(this.getChildren(target));
- return targets;
- }
-
- /**
- * Find out from a given element the set of children that need to be updated
- *
- * @param root
- *
- * @return
- */
- private Set<NamedElement> getChildren(Element root) {
- Set<NamedElement> children = new HashSet<NamedElement>();
- for (Element element : root.getOwnedElements()) {
- if (element instanceof Package
- || element instanceof Class) {
- children.add((NamedElement) element);
- children.addAll(this.getChildren(element));
- } else if (element instanceof Enumeration) {
- children.add((NamedElement) element);
- } else if (element instanceof DataType) {
- children.add((NamedElement) element);
- } else if (element instanceof Signal) {
- children.add((NamedElement) element);
- } else if (element instanceof Association) {
- children.add((NamedElement) element);
- }
- }
- return children;
- }
-
- /**
- * Rewind the parent of the target until the top level package or class
- *
- * @param target
- * the starting point of the of the search
- *
- * @return the list of elements that need to be traversed to reach the top level element
- */
- private Set<NamedElement> getParentPath(Element target) {
- Set<NamedElement> targets = new HashSet<NamedElement>();
- Element owner = target.getOwner();
- if (owner == null || owner instanceof Model) {
- targets.add((NamedElement) target);
- return targets;
- } else if (owner instanceof Class || owner instanceof Package || owner instanceof Enumeration) {
- targets.addAll(this.getParentPath(owner));
- if(!(target instanceof Property)){
- targets.add((NamedElement) target);
- }
- return targets;
- } else {
- return targets;
- }
- }
-
- /**
- * Retrieve all target that need to be updated when a class is modified (e.g. by the adding of a nested classifier)
- *
- * @param classifier
- * the class that was modified
- *
- * @param changes
- * the list of changes registered for this class
- *
- * @return targets
- * the list of targets
- */
- protected Set<NamedElement> getUpdateTargets(Classifier classifier, List<Notification> changes) {
- Set<NamedElement> targets = new HashSet<NamedElement>();
- Iterator<Notification> changesIterator = changes.iterator();
- while (changesIterator.hasNext()) {
- Notification notification = changesIterator.next();
- switch (notification.getEventType()) {
-
- /*
- * 1. if a nested classifier is added, it means parents of the currently modified
- * element must be synchronized as well as its children. Otherwise (e.g. when a property is added)
- * only the parents are synchronized.
- */
- case Notification.ADD: {
- if (notification.getFeature() == UMLPackage.eINSTANCE.getClass_NestedClassifier()) {
- targets.addAll(this.getUpdateTarget((Element) notification.getNewValue()));
- } else {
- if(notification.getNewValue() instanceof EnumerationLiteral){
- Enumeration owner = ((EnumerationLiteral) notification.getNewValue()).getClassifier();
- if(owner!=null){
- targets.addAll(this.getParentPath(owner));
- }
- }else if(notification.getNewValue() instanceof Generalization
- || notification.getNewValue() instanceof ElementImport){
- targets.addAll(this.getParentPath(classifier));
- }else{
- targets.addAll(this.getParentPath((Element) notification.getNewValue()));
- }
- }
- }
- break;
-
- /*
- * 2. if an element is removed from the class then only parents need to be synchronized
- */
- case Notification.REMOVE: {
- EStructuralFeature feature = (EStructuralFeature) notification.getFeature();
- if(feature == UMLPackage.eINSTANCE.getClassifier_Generalization()
- || feature == UMLPackage.eINSTANCE.getNamespace_ElementImport()){
- targets.addAll(this.getParentPath(classifier));
- }else{
- NamedElement oldValue = (NamedElement) notification.getOldValue();
- if (oldValue != null) {
- targets.addAll(this.getParentPath(classifier));
- }
- }
- }
- break;
- /*
- * 3. When a property of the class (e.g. its name) is modified then both parents and children
- * of the currently modified element need to be synchronized
- */
- case Notification.SET: {
- targets.addAll(this.getUpdateTarget(classifier));
- }
- break;
- }
- }
- return targets;
- }
-
- /**
- * Retrieve all target that need to be updated when a Feature (e.g. property, operation, reception) is modified
- *
- * @param property
- * the property currently modified
- *
- * @param changes
- * the list of changes registered for this property
- *
- * @return target
- * the set of elements that need to be updated
- */
- protected Set<NamedElement> getUpdateTargets(Feature feature, List<Notification> changes) {
- Set<NamedElement> targets = new HashSet<NamedElement>();
- Iterator<Notification> changesIterator = changes.iterator();
- while (changesIterator.hasNext()) {
- Notification notification = changesIterator.next();
- switch (notification.getEventType()) {
- case Notification.SET: {
- targets.addAll(this.getParentPath(feature.getOwner()));
- }
- break;
- case Notification.REMOVE:{
- if(notification.getFeature() == UMLPackage.eINSTANCE.getBehavioralFeature_OwnedParameter()){
- targets.addAll(this.getParentPath(feature.getOwner()));
- }
- }
- break;
- case Notification.ADD_MANY:{
- if(notification.getFeature() == UMLPackage.eINSTANCE.getBehavioralFeature_OwnedParameter()){
- targets.addAll(this.getParentPath(feature.getOwner()));
- }
- }
- break;
- }
- }
- return targets;
- }
-
- protected Set<NamedElement> getUpdateTargets(EnumerationLiteral enumerationLiteral, List<Notification> changes) {
- Set<NamedElement> targets = new HashSet<NamedElement>();
- Iterator<Notification> changesIterator = changes.iterator();
- while (changesIterator.hasNext()) {
- Notification notification = changesIterator.next();
- switch (notification.getEventType()) {
- case Notification.SET: {
- targets.addAll(this.getParentPath(enumerationLiteral.getOwner()));
- }
- break;
- }
- }
- return targets;
- }
-
-
- /**
- * Provide a synchronization command for the given target
- *
- * @param target
- * - the model element on which textual specification must be aligned
- * @return command - a command to synchronize the model element and the text
- */
- protected Command _synchronize(NamedElement target) {
- /* 1. Load the target states */
- this.init(target);
- /* 2. Do before checks */
- this.before();
- /* 3. Provide save command */
- return AlfCommandFactory.getInstance().creatSaveCommand(this.modelStateToBeCommitted);
- }
-
- public void after() {
- logger.info("Synchronization Done");
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/AlfAbstractJob.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/AlfAbstractJob.java
deleted file mode 100644
index 29e91c3e593..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/AlfAbstractJob.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet (CEA LIST)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.job;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResource;
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-
-public abstract class AlfAbstractJob extends Job {
-
- protected AlfTextualRepresentation modelElementState;
-
- protected TransactionalEditingDomain getEditingDomain() {
- ServicesRegistry registry = null;
- try {
- registry = ServiceUtilsForResource.getInstance().getServiceRegistry(this.modelElementState.getOwner().eResource());
- } catch (ServiceException e) {
- e.printStackTrace();
- }
- TransactionalEditingDomain domain = null;
- if (registry != null) {
- try {
- domain = ServiceUtils.getInstance().getTransactionalEditingDomain(registry);
- } catch (ServiceException e) {
- e.printStackTrace();
- }
- }
- return domain;
- }
-
- public AlfAbstractJob(String name, AlfTextualRepresentation modelElemtState) {
- super(name);
- this.modelElementState = modelElemtState;
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/AlfCompilationJob.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/AlfCompilationJob.java
deleted file mode 100644
index a2387eb4b3f..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/AlfCompilationJob.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- * Jeremie Tatibouet (CEA LIST)
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.alf.transaction.job;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.papyrus.uml.alf.MappingError;
-import org.eclipse.papyrus.uml.alf.ParsingError;
-import org.eclipse.papyrus.uml.alf.libraries.helper.AlfUtil;
-import org.eclipse.papyrus.uml.alf.text.generation.DefaultEditStringRetrievalStrategy;
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-import org.eclipse.papyrus.uml.alf.transaction.ActivatorTransaction;
-import org.eclipse.papyrus.uml.alf.transaction.commands.AlfCommand;
-import org.eclipse.papyrus.uml.alf.transaction.commands.AlfCommandFactory;
-import org.eclipse.uml2.uml.Activity;
-
-public class AlfCompilationJob extends AlfAbstractJob {
-
- public static final String NAME = "Compile";
-
- private List<AlfCommand> executedCommands;
-
- public AlfCompilationJob(AlfTextualRepresentation representation) {
- super(NAME, representation);
- setUser(true);
- this.executedCommands = new ArrayList<AlfCommand>();
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Propagate Alf specification into the model", 4);
- this.executedCommands.clear();
- IStatus jobStatus = Status.OK_STATUS;
- TransactionalEditingDomain domain = this.getEditingDomain();
- if (domain != null) {
- /* Protect the resource in case of concurrent jobs */
- monitor.subTask("Prepare compilation");
- Resource resource = this.modelElementState.getOwner().eResource();
- monitor.worked(1);
- synchronized (resource) {
- /* 1. Do not listen to modifications that occur on the resource during compilation */
- resource.setTrackingModification(false);
- /* 2. Do compilation phase */
- jobStatus = this.doCompilation(domain, monitor);
- /* 3. Save the textual representation within the model */
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- } else if (jobStatus.equals(Status.OK_STATUS)) {
- jobStatus = this.doSave(domain, monitor);
- } else {
- return jobStatus;
- }
- /* 4. Restore the modification tracking */
- resource.setTrackingModification(true);
- }
- }
- monitor.done();
- return jobStatus;
- }
-
- /**
- * Execute the compilation procedure
- *
- * @param domain
- * - the editing domain in which the modifications are done
- * @param monitor
- * - the monitor used to report progress
- * @return a status reporting the state of the job
- */
- protected IStatus doCompilation(TransactionalEditingDomain domain, IProgressMonitor monitor) {
- monitor.subTask("Compiling");
- try {
- AlfCommand command = AlfCommandFactory.getInstance().createCompilationCommand(this.modelElementState);
- domain.getCommandStack().execute(command);
- this.executedCommands.add(command);
- } catch (WrappedException we) {
- Exception e = we.exception();
- if (e instanceof ParsingError) {
- return new Status(Status.ERROR, ActivatorTransaction.PLUGIN_ID, "The parsed specification is not valid");
- } else if (e instanceof MappingError) {
- return new Status(Status.ERROR, ActivatorTransaction.PLUGIN_ID, "It was not possible to map the specification into UML");
- } else {
- return new Status(Status.ERROR, ActivatorTransaction.PLUGIN_ID, "An unexpected error stopped the compilation phase");
- }
- } catch (Exception e) {
- return new Status(Status.ERROR, ActivatorTransaction.PLUGIN_ID, "An unexpected error stopped the compilation phase");
- }
- monitor.worked(1);
- return Status.OK_STATUS;
- }
-
- /**
- * Execute the save procedure
- *
- * @param domain
- * - the editing domain in which the modifications are done
- * @param monitor
- * - the monitor used to report progress
- * @return a status reporting the state of the job
- */
- protected IStatus doSave(TransactionalEditingDomain domain, IProgressMonitor monitor) {
- /* The specification is only updated in case of elements that are not activites */
- if (!(this.modelElementState.getOwner() instanceof Activity)) {
- monitor.subTask("Format specification");
- this.modelElementState.setText(new DefaultEditStringRetrievalStrategy().getGeneratedEditString(this.modelElementState.getOwner()));
- monitor.worked(1);
- }
- try {
- if (this.modelElementState.getSource() == null) {
- this.modelElementState.setSource(AlfUtil.getInstance().getTextualRepresentationComment(this.modelElementState.getOwner()));
- }
- monitor.subTask("Save specification");
- AlfCommand command = AlfCommandFactory.getInstance().creatSaveCommand(this.modelElementState);
- domain.getCommandStack().execute(command);
- this.executedCommands.add(command);
- monitor.worked(1);
- } catch (Exception e) {
- return new Status(Status.ERROR, ActivatorTransaction.PLUGIN_ID, "An unexpected error stopped the compilation phase");
- }
- return Status.OK_STATUS;
- }
-
- @Override
- protected void canceling() {
- super.canceling();
- /*TODO: support cancellation*/
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/AlfJobObserver.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/AlfJobObserver.java
deleted file mode 100644
index f686076de20..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/AlfJobObserver.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet (CEA LIST)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.job;
-
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.papyrus.uml.xtext.integration.job.XtextValidationJob;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Display;
-
-public class AlfJobObserver extends JobChangeAdapter {
-
- private Button commitButtton;
-
- public AlfJobObserver(Button commitButton) {
- this.commitButtton = commitButton;
- }
-
- public void done(IJobChangeEvent event) {
- if (event.getJob() instanceof XtextValidationJob) {
- XtextValidationJob job = (XtextValidationJob) event.getJob();
- this.setCommitButtonState(job.hasValidationIssues());
- }
- }
-
- protected void setCommitButtonState(boolean validationIssues) {
- Display ui = Display.getDefault();
- if (ui != null) {
- if (!validationIssues) {
- ui.syncExec(new Runnable() {
- public void run() {
- if (!AlfJobObserver.this.commitButtton.isDisposed() &&
- !AlfJobObserver.this.commitButtton.isEnabled()) {
- AlfJobObserver.this.commitButtton.setEnabled(true);
- }
- }
- });
- }
- else {
- ui.syncExec(new Runnable() {
- public void run() {
- if (!AlfJobObserver.this.commitButtton.isDisposed() &&
- AlfJobObserver.this.commitButtton.isEnabled()) {
- AlfJobObserver.this.commitButtton.setEnabled(false);
- }
- }
- });
- }
- }
- }
-
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/SaveTextualRepresentationJob.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/SaveTextualRepresentationJob.java
deleted file mode 100644
index 5f90f77671f..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/job/SaveTextualRepresentationJob.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet (CEA LIST)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.job;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.papyrus.uml.alf.text.representation.AlfTextualRepresentation;
-import org.eclipse.papyrus.uml.alf.transaction.commands.AlfCommandFactory;
-
-public class SaveTextualRepresentationJob extends AlfAbstractJob {
-
- public static final String NAME = "Save";
-
- public SaveTextualRepresentationJob(AlfTextualRepresentation representation) {
- super(NAME, representation);
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- /* 1. Retrieve the editing domain */
- TransactionalEditingDomain domain = this.getEditingDomain();
- /* 3. Ask for the execution of the command */
- if (domain != null) {
- /* Protect the resource in case of concurrent jobs */
- Resource resource = this.modelElementState.getOwner().eResource();
- synchronized (resource) {
- domain.getCommandStack().execute(AlfCommandFactory.getInstance().creatSaveCommand(this.modelElementState));
- }
- } else {
- return Status.CANCEL_STATUS;
- }
- return Status.OK_STATUS;
- }
-
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/FUMLElementService.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/FUMLElementService.java
deleted file mode 100644
index 7a1ac24fc4b..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/FUMLElementService.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.observation;
-
-import org.eclipse.emf.transaction.ResourceSetListenerImpl;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.papyrus.infra.core.services.IService;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
-import org.eclipse.papyrus.uml.alf.transaction.observation.listener.FUMLElementListener;
-
-public class FUMLElementService implements IService {
-
- protected TransactionalEditingDomain editingDomain;
-
- protected ResourceSetListenerImpl listener;
-
- public FUMLElementService() {
- this.editingDomain = null;
- this.listener = null;
- }
-
- public void init(ServicesRegistry servicesRegistry) throws ServiceException {
- this.editingDomain = ServiceUtils.getInstance().getTransactionalEditingDomain(servicesRegistry);
- this.listener = new FUMLElementListener(this.editingDomain);
- }
-
- public TransactionalEditingDomain getEditingDomain() {
- return this.editingDomain;
- }
-
- public void startService() throws ServiceException {
- this.editingDomain.addResourceSetListener(this.listener);
- }
-
- public void disposeService() throws ServiceException {
- this.editingDomain.removeResourceSetListener(this.listener);
- this.listener = null;
- }
-
- public ResourceSetListenerImpl getListener() {
- return this.listener;
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/FUMLElementListener.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/FUMLElementListener.java
deleted file mode 100644
index 6476489f4a8..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/FUMLElementListener.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.observation.listener;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.NotificationFilter;
-import org.eclipse.emf.transaction.ResourceSetChangeEvent;
-import org.eclipse.emf.transaction.ResourceSetListenerImpl;
-import org.eclipse.emf.transaction.RollbackException;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.papyrus.uml.alf.preferences.AlfIntegrationPreferencesUtil;
-import org.eclipse.papyrus.uml.alf.transaction.commit.ISyncScenario;
-import org.eclipse.papyrus.uml.alf.transaction.commit.ScenarioFactory;
-import org.eclipse.papyrus.uml.alf.transaction.observation.listener.filter.FUMLFilter;
-import org.eclipse.uml2.uml.Element;
-
-public class FUMLElementListener extends ResourceSetListenerImpl {
-
- public FUMLElementListener(TransactionalEditingDomain editingDomain) {
- this(editingDomain.getResourceSet());
- }
-
- protected FUMLElementListener(ResourceSet resourceSet) {
- super();
- }
-
- public NotificationFilter getFilter() {
- return new FUMLFilter();
- }
-
- /**
- * If a changes occurs on a model element supported by fUML then
- * 1. If this change is implied by the ALF framework then we do nothing
- * 2. If this change is not implied by the ALF framework then we try to automatically
- * align the textual representation onto the current state of the edited model element.
- * Note this is not always possible (e.g. the user has ongoing changes in the text)
- */
- public Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException {
- /* 0. If the user disabled the synchronization then we do not exploit notifications*/
- if(!AlfIntegrationPreferencesUtil.isAlfAutoSyncEnabled()){
- return null;
- }
- /* 1. Initialization */
- CompoundCommand subCommands = new CompoundCommand("Synchronization");
- HashMap<Element, List<Notification>> modifications = new HashMap<Element, List<Notification>>();
- /* 2. Notification handling */
- if (!event.getNotifications().isEmpty()) {
- /* 2.1. Notification registration phase */
- for (Notification notification : event.getNotifications()) {
- Element target = (Element) notification.getNotifier();
- if (modifications.get(target) == null) {
- modifications.put(target, new ArrayList<Notification>());
- }
- modifications.get(target).add(notification);
- }
- /* 2.2. Calculate synchronization actions through a synchronization scenario */
- ISyncScenario scenario = ScenarioFactory.getInstance().createSyncScenario();
- subCommands.append(scenario.synchronize(modifications));
- }
- return subCommands;
- }
-
-
-}
-
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/filter/FUMLFilter.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/filter/FUMLFilter.java
deleted file mode 100644
index f4b64d662e1..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/filter/FUMLFilter.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 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:
- * Jeremie Tatibouet (CEA LIST)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.observation.listener.filter;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.NotificationFilter;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.resource.UMLResource;
-
-public class FUMLFilter extends NotificationFilter.Custom {
-
- public FUMLFilter() {
- }
-
- /**
- * Filter starting point
- */
- public boolean matches(Notification notification) {
- Object notifier = notification.getNotifier();
- if (!this.isNotifierAllowed(notifier)) {
- return false;
- }
- Object feature = notification.getFeature();
- if (notifier != null && feature != null) {
- if (FUMLScopeUtil.isEnumeration(notifier)) {
- return this.isEnumerationFeatureListened((EStructuralFeature) feature);
- } else if (FUMLScopeUtil.isDataType(notifier)) {
- return this.isDatatypeFeatureListened((EStructuralFeature) feature);
- } else if (FUMLScopeUtil.isPackage(notifier)) {
- return this.isPackageFeatureListened((EStructuralFeature) feature);
- }/* else if (this.isAssociation(notifier)) {
- return this.isAssociationFeatureListener((EStructuralFeature) feature);
- }*/ else if (FUMLScopeUtil.isSignal(notifier)) {
- return this.isSignalFeatureListened((EStructuralFeature) feature);
- } else if (FUMLScopeUtil.isClass(notifier)) {
- return this.isClassFeatureListened((EStructuralFeature) feature);
- } else if (FUMLScopeUtil.isGeneralization(notifier)) {
- return this.isGeneralizationtFeatureListened((EStructuralFeature) feature);
- }else if(FUMLScopeUtil.isProperty(notifier)){
- return this.isPropertyFeatureListened((EStructuralFeature)feature);
- }else if(FUMLScopeUtil.isOperation(notifier)){
- return this.isOperationFeatureListened((EStructuralFeature)feature);
- }else if(FUMLScopeUtil.isReception(notifier)){
- return this.isReceptionFeatureListened((EStructuralFeature)feature);
- }else if(FUMLScopeUtil.isLiteralUnlimitedNatural(notifier)){
- return this.isLiteralUnlimitedNaturalFeatureListened((EStructuralFeature)feature);
- }else if(FUMLScopeUtil.isEnumerationLiteral(notifier)){
- return this.isEnumerationLiteralFeatureListened((EStructuralFeature)feature);
- }else if(FUMLScopeUtil.isPackageImport(notifier)){
- return this.isPackageImportFeatureListened((EStructuralFeature)feature);
- }else if(FUMLScopeUtil.isElementImport(notifier)){
- return this.isElementImportFeatureListened((EStructuralFeature)feature);
- }
- }
- return false;
- }
-
- private boolean isNotifierAllowed(Object notifier) {
- boolean allowed = false;
- if (notifier instanceof Element) {
- EObject target = (EObject) notifier;
- if (target.eResource() != null && target.eResource() instanceof UMLResource) {
- allowed = target.eResource().isTrackingModification();
- }
- }
- return allowed;
- }
-
- /*----------------------------------------------------------------------------*/
- /* Low level checks encoding the UML meta-model hierarchy */
- /*----------------------------------------------------------------------------*/
-
- private boolean isGeneralizationtFeatureListened(EStructuralFeature feature) {
- if (UMLPackage.eINSTANCE.getGeneralization_General() == feature
- || UMLPackage.eINSTANCE.getGeneralization_Specific() == feature) {
- return true;
- }
- return false;
- }
-
- private boolean isNamedElementFeatureListened(EStructuralFeature feature) {
- if (UMLPackage.eINSTANCE.getNamedElement_Name() == feature
- || UMLPackage.eINSTANCE.getNamedElement_QualifiedName() == feature
- || UMLPackage.eINSTANCE.getNamedElement_Namespace() == feature
- || UMLPackage.eINSTANCE.getNamedElement_Visibility() == feature
- || UMLPackage.eINSTANCE.getNamedElement_Namespace() == feature) {
- return true;
- }
- return false;
- }
-
- private boolean isTypeFeatureListened(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getType_Package() == feature || this.isPackageableElementFeatureListened(feature);
- }
-
- private boolean isNamespaceFeatureListened(EStructuralFeature feature) {
- if (UMLPackage.eINSTANCE.getNamespace_ElementImport() == feature
- //|| UMLPackage.eINSTANCE.getNamespace_ImportedMember() == feature [Detected when element import changes]
- || UMLPackage.eINSTANCE.getNamespace_Member() == feature
- || UMLPackage.eINSTANCE.getNamespace_OwnedMember() == feature
- || UMLPackage.eINSTANCE.getNamespace_PackageImport() == feature
- || this.isNamedElementFeatureListened(feature)) {
- return true;
- }
- return false;
- }
-
- private boolean isPackageableElementFeatureListened(EStructuralFeature feature) {
- return this.isNamedElementFeatureListened(feature);
- }
-
- private boolean isPackageFeatureListened(EStructuralFeature feature) {
- if (UMLPackage.eINSTANCE.getPackage_URI() == feature
- || UMLPackage.eINSTANCE.getPackage_NestedPackage() == feature
- || UMLPackage.eINSTANCE.getPackage_NestingPackage() == feature
- || UMLPackage.eINSTANCE.getPackage_OwnedType() == feature
- || UMLPackage.eINSTANCE.getPackage_PackagedElement() == feature
- || this.isPackageableElementFeatureListened(feature)
- || this.isNamespaceFeatureListened(feature)) {
- return true;
- }
- return false;
- }
-
- private boolean isClassifierFeatureListened(EStructuralFeature feature) {
- if (UMLPackage.eINSTANCE.getClassifier_IsFinalSpecialization() == feature
- || UMLPackage.eINSTANCE.getClassifier_IsAbstract() == feature
- || UMLPackage.eINSTANCE.getClassifier_Attribute() == feature
- || UMLPackage.eINSTANCE.getClassifier_Feature() == feature
- //|| UMLPackage.eINSTANCE.getClassifier_General() == feature [Detected when generalization changes]
- || UMLPackage.eINSTANCE.getClassifier_Generalization() == feature
- || this.isNamespaceFeatureListened(feature)
- || this.isTypeFeatureListened(feature)) {
- return true;
- }
- return false;
- }
-
- private boolean isStructuredClassifierFeatureListened(EStructuralFeature feature) {
- if (UMLPackage.eINSTANCE.getStructuredClassifier_OwnedAttribute() == feature
- || this.isClassifierFeatureListened(feature)) {
- return true;
- }
- return false;
- }
-
- private boolean isEncapsulatedClassifierFeatureListened(EStructuralFeature feature) {
- return this.isStructuredClassifierFeatureListened(feature);
- }
-
- private boolean isBehavioredClassifierListened(EStructuralFeature feature) {
- if (UMLPackage.eINSTANCE.getBehavioredClassifier_ClassifierBehavior() == feature
- || UMLPackage.eINSTANCE.getBehavioredClassifier_OwnedBehavior() == feature
- || this.isClassifierFeatureListened(feature)) {
- return true;
- }
- return false;
- }
-
- private boolean isClassFeatureListened(EStructuralFeature feature) {
- if (UMLPackage.eINSTANCE.getClass_IsActive() == feature
- || UMLPackage.eINSTANCE.getClass_NestedClassifier() == feature
- || UMLPackage.eINSTANCE.getClass_OwnedOperation() == feature
- || UMLPackage.eINSTANCE.getClass_OwnedReception() == feature
- || UMLPackage.eINSTANCE.getClass_SuperClass() == feature
- || this.isEncapsulatedClassifierFeatureListened(feature)
- || this.isBehavioredClassifierListened(feature)) {
- return true;
- }
- return false;
- }
-
- @SuppressWarnings("unused")
- private boolean isAssociationFeatureListener(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getAssociation_OwnedEnd() == feature || this.isClassifierFeatureListened(feature);
- }
-
- private boolean isSignalFeatureListened(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getSignal_OwnedAttribute() == feature || this.isClassifierFeatureListened(feature);
- }
-
- private boolean isDatatypeFeatureListened(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getDataType_OwnedAttribute() == feature || this.isClassifierFeatureListened(feature);
- }
-
- private boolean isEnumerationFeatureListened(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getEnumeration_OwnedLiteral() == feature || this.isDatatypeFeatureListened(feature);
- }
-
- private boolean isRedefinableElementFeatureListened(EStructuralFeature feature){
- if(UMLPackage.eINSTANCE.getRedefinableElement_IsLeaf() == feature
- || UMLPackage.eINSTANCE.getRedefinableElement_RedefinedElement() == feature
- || UMLPackage.eINSTANCE.getRedefinableElement_RedefinitionContext() == feature
- || this.isNamedElementFeatureListened(feature)){
- return true;
- }
- return false;
- }
-
- private boolean isFeatureFeatureListened(EStructuralFeature feature){
- if(UMLPackage.eINSTANCE.getFeature_IsStatic() == feature
- || UMLPackage.eINSTANCE.getFeature_FeaturingClassifier() == feature
- || this.isRedefinableElementFeatureListened(feature)){
- return true;
- }
- return false;
- }
-
- private boolean isMultiplicityElementFeatureListened(EStructuralFeature feature){
- if(UMLPackage.eINSTANCE.getMultiplicityElement_IsOrdered() == feature
- || UMLPackage.eINSTANCE.getMultiplicityElement_IsUnique() == feature
- || UMLPackage.eINSTANCE.getMultiplicityElement_Lower() == feature
- || UMLPackage.eINSTANCE.getMultiplicityElement_Upper() == feature){
- return true;
- }
- return false;
- }
-
- private boolean isTypedElementFeatureListened(EStructuralFeature feature){
- if(UMLPackage.eINSTANCE.getTypedElement_Type() == feature
- || this.isNamedElementFeatureListened(feature)){
- return true;
- }
- return false;
- }
-
- private boolean isStructuralFeatureListened(EStructuralFeature feature){
- if(UMLPackage.eINSTANCE.getStructuralFeature_IsReadOnly() == feature
- || this.isFeatureFeatureListened(feature)
- || this.isMultiplicityElementFeatureListened(feature)
- || this.isTypedElementFeatureListened(feature)){
- return true;
- }
- return false;
- }
-
- private boolean isPropertyFeatureListened(EStructuralFeature feature){
- if(UMLPackage.eINSTANCE.getProperty_Aggregation() == feature
- || UMLPackage.eINSTANCE.getProperty_IsComposite() == feature
- || UMLPackage.eINSTANCE.getProperty_IsDerived() == feature
- || UMLPackage.eINSTANCE.getProperty_IsDerivedUnion() == feature
- || UMLPackage.eINSTANCE.getProperty_IsID()==feature
- || UMLPackage.eINSTANCE.getProperty_Association() == feature
- || UMLPackage.eINSTANCE.getProperty_Class() == feature
- || UMLPackage.eINSTANCE.getProperty_Datatype() == feature
- || UMLPackage.eINSTANCE.getProperty_Opposite() == feature
- || UMLPackage.eINSTANCE.getProperty_OwningAssociation() == feature
- || this.isStructuralFeatureListened(feature)){
- return true;
- }
- return false;
- }
-
- private boolean isValueSpecificationFeatureListened(EStructuralFeature feature){
- if(this.isTypedElementFeatureListened(feature)){
- return true;
- }
- return false;
- }
-
- private boolean isLiteralSpecificationFeatureListened(EStructuralFeature feature){
- if(this.isValueSpecificationFeatureListened(feature)){
- return true;
- }
- return false;
- }
-
- private boolean isLiteralUnlimitedNaturalFeatureListened(EStructuralFeature feature){
- if(UMLPackage.eINSTANCE.getLiteralUnlimitedNatural_Value() == feature
- || this.isLiteralSpecificationFeatureListened(feature)){
- return true;
- }
- return false;
- }
-
- private boolean isBehavioralFeatureListened(EStructuralFeature feature){
- if(UMLPackage.eINSTANCE.getBehavioralFeature_Concurrency() == feature
- || UMLPackage.eINSTANCE.getBehavioralFeature_OwnedParameter() == feature
- || UMLPackage.eINSTANCE.getBehavioralFeature_Method() == feature
- || this.isFeatureFeatureListened(feature)){
- return true;
- }
- return false;
- }
-
- private boolean isOperationFeatureListened(EStructuralFeature feature){
- if(UMLPackage.eINSTANCE.getOperation_IsQuery() == feature
- || UMLPackage.eINSTANCE.getOperation_RedefinedOperation() == feature
- || UMLPackage.eINSTANCE.getOperation_Type() == feature
- || UMLPackage.eINSTANCE.getOperation_Class() == feature
- || this.isBehavioralFeatureListened(feature)){
- return true;
- }
- return false;
- }
-
- private boolean isReceptionFeatureListened(EStructuralFeature feature){
- if(UMLPackage.eINSTANCE.getReception_Signal() == feature
- || this.isBehavioralFeatureListened(feature)){
- return true;
- }
- return false;
- }
-
- private boolean isInstanceSpecificationFeatureListener(EStructuralFeature feature){
- if(UMLPackage.eINSTANCE.getInstanceSpecification_Classifier() == feature
- || UMLPackage.eINSTANCE.getInstanceSpecification_Slot() == feature
- || this.isNamedElementFeatureListened(feature)){
- return true;
- }
- return false;
- }
-
- private boolean isEnumerationLiteralFeatureListened(EStructuralFeature feature){
- if(UMLPackage.eINSTANCE.getEnumerationLiteral_Enumeration() == feature
- || this.isInstanceSpecificationFeatureListener(feature)){
- return true;
- }
- return false;
- }
-
- private boolean isPackageImportFeatureListened(EStructuralFeature feature){
- if(UMLPackage.eINSTANCE.getPackageImport_Visibility() == feature
- || UMLPackage.eINSTANCE.getPackageImport_ImportedPackage() == feature
- || UMLPackage.eINSTANCE.getPackageImport_ImportingNamespace() == feature){
- return true;
- }
- return false;
- }
-
- private boolean isElementImportFeatureListened(EStructuralFeature feature){
- if(UMLPackage.eINSTANCE.getElementImport_ImportedElement() == feature
- || UMLPackage.eINSTANCE.getElementImport_ImportingNamespace() == feature
- || UMLPackage.eINSTANCE.getElementImport_Visibility() == feature
- || UMLPackage.eINSTANCE.getElementImport_Alias() == feature){
- return true;
- }
- return false;
- }
-}
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/filter/FUMLScopeUtil.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/filter/FUMLScopeUtil.java
deleted file mode 100644
index d80116956a0..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/filter/FUMLScopeUtil.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 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:
- * Jeremie Tatibouet (CEA LIST)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.transaction.observation.listener.filter;
-
-import org.eclipse.uml2.uml.Activity;
-import org.eclipse.uml2.uml.Association;
-import org.eclipse.uml2.uml.AssociationClass;
-import org.eclipse.uml2.uml.Behavior;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.CommunicationPath;
-import org.eclipse.uml2.uml.Component;
-import org.eclipse.uml2.uml.DataType;
-import org.eclipse.uml2.uml.ElementImport;
-import org.eclipse.uml2.uml.Enumeration;
-import org.eclipse.uml2.uml.EnumerationLiteral;
-import org.eclipse.uml2.uml.Extension;
-import org.eclipse.uml2.uml.ExtensionEnd;
-import org.eclipse.uml2.uml.Generalization;
-import org.eclipse.uml2.uml.LiteralUnlimitedNatural;
-import org.eclipse.uml2.uml.Model;
-import org.eclipse.uml2.uml.Node;
-import org.eclipse.uml2.uml.Operation;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.PackageImport;
-import org.eclipse.uml2.uml.Port;
-import org.eclipse.uml2.uml.Profile;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Reception;
-import org.eclipse.uml2.uml.Signal;
-import org.eclipse.uml2.uml.Stereotype;
-
-/**
- * Provides utility to check if an object is part of the fUML scope
- */
-public class FUMLScopeUtil {
-
- /**
- * Check if the given notifier is strictly a Class
- *
- * @param notifier
- *
- * @return true if constraint is verified false otherwise
- */
- public static boolean isClass(Object notifier) {
- if (notifier instanceof Class &&
- (!(notifier instanceof AssociationClass) &&
- !(notifier instanceof Component) &&
- !(notifier instanceof Node) &&
- !(notifier instanceof Stereotype) &&
- !(notifier instanceof Behavior))) {
- return true;
- }
- return false;
- }
-
- /**
- * Check if the given notifier is strictly a Signal
- *
- * @param notifier
- *
- * @return true if constraint is verified false otherwise
- */
- public static boolean isSignal(Object notifier) {
- return notifier instanceof Signal;
- }
-
- /**
- * Check if the given notifier is strictly a DataType
- *
- * @param notifier
- *
- * @return true if constraint is verified false otherwise
- */
- public static boolean isDataType(Object notifier) {
- if (notifier instanceof DataType
- && !(notifier instanceof Enumeration)) {
- return true;
- }
- return false;
- }
-
- /**
- * Check if the given notifier is strictly a Package
- *
- * @param notifier
- *
- * @return true if constraint is verified false otherwise
- */
- public static boolean isPackage(Object notifier) {
- if (notifier != null
- && notifier instanceof Package
- && !(notifier instanceof Model)
- && !(notifier instanceof Profile)) {
- return true;
- }
- return false;
- }
-
- /**
- * Check if the given notifier is strictly an Enumeration
- *
- * @param notifier
- *
- * @return true if constraint is verified false otherwise
- */
- public static boolean isEnumeration(Object notifier) {
- return notifier instanceof Enumeration;
- }
-
- /**
- * Check if the given notifier is strictly an Association
- *
- * @param notifier
- *
- * @return true if constraint is verified false otherwise
- */
- public static boolean isAssociation(Object notifier) {
- if (notifier instanceof Association
- && !(notifier instanceof AssociationClass)
- && !(notifier instanceof Extension)
- && !(notifier instanceof CommunicationPath)) {
- Association association = (Association)notifier;
- return association.getOwnedEnds().size() == association.getMemberEnds().size();
- }
- return false;
- }
-
- /**
- * Check if the given notifier is strictly a Generalization
- *
- * @param notifier
- *
- * @return true if constraint is verified false otherwise
- */
- public static boolean isGeneralization(Object notifier) {
- return notifier instanceof Generalization;
- }
-
- /**
- * Check if the given notifier is strictly a property
- *
- * @param notifier
- *
- * @return true if constraint is verified false otherwise
- */
- public static boolean isProperty(Object notifier){
- if(notifier instanceof Property
- && !(notifier instanceof Port)
- && !(notifier instanceof ExtensionEnd) ){
- return true;
- }
- return false;
- }
-
- public static boolean isActivity(Object notifier){
- return notifier instanceof Activity;
- }
-
- public static boolean isLiteralUnlimitedNatural(Object notifier){
- return notifier instanceof LiteralUnlimitedNatural;
- }
-
- /**
- * Check if the given notifier is strictly an Operation
- *
- * @param notifier
- *
- * @return true if constraint is verified false otherwise
- */
- public static boolean isOperation(Object notifier){
- return notifier instanceof Operation;
- }
-
- /**
- * This predictate is only valid if:
- * 1 - the notified is an Operation
- * 2 - the operation is not abstract
- * 3 - there is only one implementation for the operation
- * 4 - the implementation is given as an activity
- *
- * @param notifier
- *
- * @return true if constraint is verified false otherwise
- */
- public static boolean isOperationWithImplementation(Object notifier){
- return isOperation(notifier)
- && !((Operation)notifier).isAbstract()
- && ((Operation)notifier).getMethods().size()==1
- && ((Operation)notifier).getMethods().get(0) instanceof Activity;
- }
-
- /**
- * Check if the given notifier is strictly a Reception
- *
- * @param notifier
- *
- * @return true if constraint is verified false otherwise
- */
- public static boolean isReception(Object notifier){
- return notifier instanceof Reception;
- }
-
- /**
- * Check if the given notifier is strictly an Enumeration literal
- *
- * @param notifier
- *
- * @return true if constraint is verified false otherwise
- */
- public static boolean isEnumerationLiteral(Object notifier){
- return notifier instanceof EnumerationLiteral;
- }
-
- /**
- * Check if the given notifier is strictly a PackageImport
- *
- * @param notifier
- *
- * @return true if constraint is verified false otherwise
- */
- public static boolean isPackageImport(Object notifier){
- return notifier instanceof PackageImport;
- }
-
- /**
- * Check if the given notifier is strictly an ElementImport
- *
- * @param notifier
- *
- * @return true if constraint is verified false otherwise
- */
- public static boolean isElementImport(Object notifier){
- return notifier instanceof ElementImport;
- }
-
-}

Back to the top