Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Le Menez2018-01-09 05:09:46 -0500
committerQuentin Le Menez2018-01-09 08:18:15 -0500
commitd98116b5b376f18b6cf626ba4158a35fe9a4a64e (patch)
tree4458c9c5ada0a216b385813a56ea9a9b8c7b6509 /plugins/uml/org.eclipse.papyrus.uml.controlmode.profile
parent453e99bc2dcbd5fabad100f9d0d5f682013c3b19 (diff)
downloadorg.eclipse.papyrus-d98116b5b376f18b6cf626ba4158a35fe9a4a64e.tar.gz
org.eclipse.papyrus-d98116b5b376f18b6cf626ba4158a35fe9a4a64e.tar.xz
org.eclipse.papyrus-d98116b5b376f18b6cf626ba4158a35fe9a4a64e.zip
Bug 515367 - [releng] Uniformization of the end of lines to Unix standard
- Format the EOL of all the files matched by: grep -rIUs . | xargs -Ifile dos2unix -k 'file' Change-Id: I5c41d540a9a67b50de9b912ab35e16cc9a912961 Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
Diffstat (limited to 'plugins/uml/org.eclipse.papyrus.uml.controlmode.profile')
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/.settings/org.eclipse.jdt.core.prefs582
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/META-INF/MANIFEST.MF34
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/about.html56
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/build.properties20
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/plugin.properties22
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/plugin.xml114
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/pom.xml20
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/Activator.java116
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/ControlledElementReadOnlyHandler.java160
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/CopyProfileApplicationCommand.java112
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/MoveProfileApplicationCommand.java108
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/RemoveDuplicationProfileApplicationCommand.java96
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/helpers/ProfileApplicationHelper.java410
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/providers/UMLValidationProvider.java390
14 files changed, 1120 insertions, 1120 deletions
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/.settings/org.eclipse.jdt.core.prefs
index 62a08f4494d..b3aa6d60f94 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/.settings/org.eclipse.jdt.core.prefs
@@ -1,291 +1,291 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=260
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=false
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=260
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/META-INF/MANIFEST.MF b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/META-INF/MANIFEST.MF
index 3c4234e0a15..33742c499e9 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/META-INF/MANIFEST.MF
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/META-INF/MANIFEST.MF
@@ -1,19 +1,19 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.papyrus.infra.services.controlmode;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.papyrus.uml.tools;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.infra.emf.readonly;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.infra.services.resourceloading;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.emf.validation.ui;bundle-version="[1.7.0,2.0.0)"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 2.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.uml.controlmode.profile.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.controlmode.profile;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.infra.services.controlmode;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.tools;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.emf.readonly;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.services.resourceloading;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.emf.validation.ui;bundle-version="[1.7.0,2.0.0)"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 2.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.uml.controlmode.profile.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.uml.controlmode.profile;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: com.google.common.base;version="21.0.0",
com.google.common.collect;version="21.0.0"
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/about.html b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/about.html
index 82d49bf5f81..d35d5aed64c 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/about.html
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/about.html
@@ -1,28 +1,28 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&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>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&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>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/build.properties b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/build.properties
index 7cd550295e4..f4bbc811f5a 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/build.properties
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/build.properties
@@ -1,10 +1,10 @@
-#
-#Mon Sep 12 09:29:37 CEST 2011
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html,\
- plugin.properties
-output.. = bin/
-src.includes = about.html
-source.. = src/
+#
+#Mon Sep 12 09:29:37 CEST 2011
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ plugin.properties
+output.. = bin/
+src.includes = about.html
+source.. = src/
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/plugin.properties b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/plugin.properties
index 9828d7c65f8..cf4ed2e6ff5 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/plugin.properties
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/plugin.properties
@@ -1,12 +1,12 @@
-#################################################################################
-# Copyright (c) 2010 Atos Origin.
-# 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:
-# Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - initial API and implementation
-##################################################################################
-pluginName=UML profiles control mode
+#################################################################################
+# Copyright (c) 2010 Atos Origin.
+# 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:
+# Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - initial API and implementation
+##################################################################################
+pluginName=UML profiles control mode
providerName=Eclipse Modeling Project \ No newline at end of file
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/plugin.xml b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/plugin.xml
index 29bd6891f6f..9b7920c89b5 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/plugin.xml
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/plugin.xml
@@ -1,57 +1,57 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension point="org.eclipse.emf.validation.constraintProviders">
- <category id="org.eclipse.papyrus.uml.controlmode.profile/duplicateProfileApplication" mandatory="false" name="duplicateProfileApplication">
- <![CDATA[Validate that Profile Application is correctly duplicated on controlled Packages]]>
- </category>
- <constraintProvider cache="true">
- <package namespaceUri="http://www.eclipse.org/uml2/3.0.0/UML"/>
- <constraints categories="org.eclipse.papyrus.uml.controlmode.profile/duplicateProfileApplication">
- <constraint id="org.eclipse.papyrus.uml.controlmode.profile.validation.ProfileApplicationDuplicationChecker"
- lang="Java"
- name="ProfileApplicationDuplicationChecker"
- class="org.eclipse.papyrus.uml.controlmode.profile.validation.ProfileApplicationDuplicationChecker"
- mode="Live"
- severity="ERROR" statusCode="200">
- <description><![CDATA[Profile Applications must be duplicated on controlled Packages]]></description>
- <message><![CDATA[Profile Applications modification did not successfully completed]]></message>
- <target class="uml.ProfileApplication"/>
- <target class="uml.Package"/>
- </constraint>
- </constraints>
- </constraintProvider>
- </extension>
-
- <extension point="org.eclipse.emf.validation.constraintBindings">
- <clientContext default="false" id="org.eclipse.papyrus.controlmodeDefaultCtx">
- <selector class="org.eclipse.papyrus.uml.controlmode.profile.providers.UMLValidationProvider$DefaultCtx"/>
- </clientContext>
- <binding context="org.eclipse.papyrus.controlmodeDefaultCtx">
- <constraint ref="org.eclipse.papyrus.uml.controlmode.profile.validation.ProfileApplicationDuplicationChecker"/>
- </binding>
- </extension>
-
- <extension point="org.eclipse.emf.validation.ui.UIRegisteredClientContext">
- <clientContext id="org.eclipse.papyrus.controlmodeDefaultCtx"/>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.services.controlmode.participant">
- <participant
- class="org.eclipse.papyrus.uml.controlmode.profile.UMLProfileControlParticipant">
- </participant>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.emf.readonly.readOnlyHandler">
- <readOnlyHandler
- class="org.eclipse.papyrus.uml.controlmode.profile.ControlledElementReadOnlyHandler"
- id="org.eclipse.papyrus.uml.controlmode.profile.ControlledElementReadOnlyHandler"
- priority="50">
- <affinity
- axis="discretion">
- </affinity>
- </readOnlyHandler>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension point="org.eclipse.emf.validation.constraintProviders">
+ <category id="org.eclipse.papyrus.uml.controlmode.profile/duplicateProfileApplication" mandatory="false" name="duplicateProfileApplication">
+ <![CDATA[Validate that Profile Application is correctly duplicated on controlled Packages]]>
+ </category>
+ <constraintProvider cache="true">
+ <package namespaceUri="http://www.eclipse.org/uml2/3.0.0/UML"/>
+ <constraints categories="org.eclipse.papyrus.uml.controlmode.profile/duplicateProfileApplication">
+ <constraint id="org.eclipse.papyrus.uml.controlmode.profile.validation.ProfileApplicationDuplicationChecker"
+ lang="Java"
+ name="ProfileApplicationDuplicationChecker"
+ class="org.eclipse.papyrus.uml.controlmode.profile.validation.ProfileApplicationDuplicationChecker"
+ mode="Live"
+ severity="ERROR" statusCode="200">
+ <description><![CDATA[Profile Applications must be duplicated on controlled Packages]]></description>
+ <message><![CDATA[Profile Applications modification did not successfully completed]]></message>
+ <target class="uml.ProfileApplication"/>
+ <target class="uml.Package"/>
+ </constraint>
+ </constraints>
+ </constraintProvider>
+ </extension>
+
+ <extension point="org.eclipse.emf.validation.constraintBindings">
+ <clientContext default="false" id="org.eclipse.papyrus.controlmodeDefaultCtx">
+ <selector class="org.eclipse.papyrus.uml.controlmode.profile.providers.UMLValidationProvider$DefaultCtx"/>
+ </clientContext>
+ <binding context="org.eclipse.papyrus.controlmodeDefaultCtx">
+ <constraint ref="org.eclipse.papyrus.uml.controlmode.profile.validation.ProfileApplicationDuplicationChecker"/>
+ </binding>
+ </extension>
+
+ <extension point="org.eclipse.emf.validation.ui.UIRegisteredClientContext">
+ <clientContext id="org.eclipse.papyrus.controlmodeDefaultCtx"/>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.services.controlmode.participant">
+ <participant
+ class="org.eclipse.papyrus.uml.controlmode.profile.UMLProfileControlParticipant">
+ </participant>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.emf.readonly.readOnlyHandler">
+ <readOnlyHandler
+ class="org.eclipse.papyrus.uml.controlmode.profile.ControlledElementReadOnlyHandler"
+ id="org.eclipse.papyrus.uml.controlmode.profile.ControlledElementReadOnlyHandler"
+ priority="50">
+ <affinity
+ axis="discretion">
+ </affinity>
+ </readOnlyHandler>
+ </extension>
+
+</plugin>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/pom.xml b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/pom.xml
index 05eb4b9ec11..32ea2bb43c8 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/pom.xml
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/pom.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus.uml</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <artifactId>org.eclipse.papyrus.uml.controlmode.profile</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.uml</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.controlmode.profile</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/Activator.java b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/Activator.java
index 619b0bb4653..b8e0a13ab74 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/Activator.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/Activator.java
@@ -1,58 +1,58 @@
-package org.eclipse.papyrus.uml.controlmode.profile;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.controlmode.profile"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- public static LogHelper log;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- log = new LogHelper(this);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
+package org.eclipse.papyrus.uml.controlmode.profile;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.controlmode.profile"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/ControlledElementReadOnlyHandler.java b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/ControlledElementReadOnlyHandler.java
index cb60b54a4c6..3ff84a6eb2f 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/ControlledElementReadOnlyHandler.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/ControlledElementReadOnlyHandler.java
@@ -1,80 +1,80 @@
-/*****************************************************************************
- * Copyright (c) 2013, 2014 Atos, CEA, 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:
- * Arthur Daussy (Atos) arthur.daussy@atos.net - Initial API and implementation
- * Christian W. Damus (CEA) - bug 429826
- * Camille Letavernier (CEA LIST) - Bug 430118
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.controlmode.profile;
-
-import java.util.Set;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.papyrus.infra.core.resource.AbstractReadOnlyHandler;
-import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
-import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Package;
-
-import com.google.common.base.Optional;
-
-
-/**
- * Read only handler that will prevent model fragment to be modified it the root element is not a package
- * This restriction is because of the UML2 implementation which delete stereotype applications if the current model can not find the corresponding
- * profile
- * application. This handler is discretion-based.
- *
- * @author adaussy
- *
- */
-public class ControlledElementReadOnlyHandler extends AbstractReadOnlyHandler {
-
- public ControlledElementReadOnlyHandler(EditingDomain editingDomain) {
- super(editingDomain);
- }
-
- public Optional<Boolean> anyReadOnly(Set<ReadOnlyAxis> axes, URI[] uris) {
- if ((getEditingDomain() == null) || !axes.contains(ReadOnlyAxis.DISCRETION)) {
- return Optional.absent();
- }
- ResourceSet resourceSet = getEditingDomain().getResourceSet();
- if (resourceSet != null) {
- for (URI uri : uris) {
- if (UmlModel.UML_FILE_EXTENSION.equals(uri.fileExtension())) {
- Resource resource = resourceSet.getResource(uri.trimFragment(), false);
- if (resource != null) {
- if (!resource.getContents().isEmpty()) {
- // A sub model can only be writable if the root element is package or if the root is contained by another loaded resource
- EObject root = resource.getContents().get(0);
- if (!(root instanceof Package) && root instanceof Element) {
- return Optional.of(((Element) root).getNearestPackage() == null);
- }
- }
- }
- }
- }
- }
- return Optional.absent();
- }
-
- public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
- // Never authorize write
- NotificationBuilder.createErrorPopup("This model fragment can not be modified independently from the rest of the model").run();
- return Optional.absent();
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2013, 2014 Atos, CEA, 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:
+ * Arthur Daussy (Atos) arthur.daussy@atos.net - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 429826
+ * Camille Letavernier (CEA LIST) - Bug 430118
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.controlmode.profile;
+
+import java.util.Set;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.infra.core.resource.AbstractReadOnlyHandler;
+import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
+import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+
+import com.google.common.base.Optional;
+
+
+/**
+ * Read only handler that will prevent model fragment to be modified it the root element is not a package
+ * This restriction is because of the UML2 implementation which delete stereotype applications if the current model can not find the corresponding
+ * profile
+ * application. This handler is discretion-based.
+ *
+ * @author adaussy
+ *
+ */
+public class ControlledElementReadOnlyHandler extends AbstractReadOnlyHandler {
+
+ public ControlledElementReadOnlyHandler(EditingDomain editingDomain) {
+ super(editingDomain);
+ }
+
+ public Optional<Boolean> anyReadOnly(Set<ReadOnlyAxis> axes, URI[] uris) {
+ if ((getEditingDomain() == null) || !axes.contains(ReadOnlyAxis.DISCRETION)) {
+ return Optional.absent();
+ }
+ ResourceSet resourceSet = getEditingDomain().getResourceSet();
+ if (resourceSet != null) {
+ for (URI uri : uris) {
+ if (UmlModel.UML_FILE_EXTENSION.equals(uri.fileExtension())) {
+ Resource resource = resourceSet.getResource(uri.trimFragment(), false);
+ if (resource != null) {
+ if (!resource.getContents().isEmpty()) {
+ // A sub model can only be writable if the root element is package or if the root is contained by another loaded resource
+ EObject root = resource.getContents().get(0);
+ if (!(root instanceof Package) && root instanceof Element) {
+ return Optional.of(((Element) root).getNearestPackage() == null);
+ }
+ }
+ }
+ }
+ }
+ }
+ return Optional.absent();
+ }
+
+ public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
+ // Never authorize write
+ NotificationBuilder.createErrorPopup("This model fragment can not be modified independently from the rest of the model").run();
+ return Optional.absent();
+ }
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/CopyProfileApplicationCommand.java b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/CopyProfileApplicationCommand.java
index 69bc5e93d92..e1ff2644ffe 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/CopyProfileApplicationCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/CopyProfileApplicationCommand.java
@@ -1,57 +1,57 @@
-/*****************************************************************************
- * Copyright (c) 2013 Atos.
- *
- *
- * 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:
- * Arthur Daussy (Atos) arthur.daussy@atos.net - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.controlmode.profile.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
-import org.eclipse.papyrus.infra.services.controlmode.commands.AbstractControlCommand;
-import org.eclipse.papyrus.uml.controlmode.profile.helpers.ProfileApplicationHelper;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Profile;
-
-/**
- * Command used to copy profile application when controling an UML model
- *
- * @author adaussy
- *
- */
-public final class CopyProfileApplicationCommand extends AbstractControlCommand {
-
-
- public CopyProfileApplicationCommand(ControlModeRequest request) {
- super("Copy Profile Application to new control resource", null, request);
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- duplicateAppliedProfiles(getRequest().getTargetObject());
- return CommandResult.newOKCommandResult();
- }
-
- /**
- * Duplicate all applied profiles from the package on the root element of the controlled resource
- *
- * @param selection
- */
- private void duplicateAppliedProfiles(final EObject selection) {
- Package _package = (Package) selection;
- for (Profile profile : _package.getAllAppliedProfiles()) {
- ProfileApplicationHelper.duplicateProfileApplication(_package, profile);
- }
- }
+/*****************************************************************************
+ * Copyright (c) 2013 Atos.
+ *
+ *
+ * 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:
+ * Arthur Daussy (Atos) arthur.daussy@atos.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.controlmode.profile.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
+import org.eclipse.papyrus.infra.services.controlmode.commands.AbstractControlCommand;
+import org.eclipse.papyrus.uml.controlmode.profile.helpers.ProfileApplicationHelper;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+
+/**
+ * Command used to copy profile application when controling an UML model
+ *
+ * @author adaussy
+ *
+ */
+public final class CopyProfileApplicationCommand extends AbstractControlCommand {
+
+
+ public CopyProfileApplicationCommand(ControlModeRequest request) {
+ super("Copy Profile Application to new control resource", null, request);
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ duplicateAppliedProfiles(getRequest().getTargetObject());
+ return CommandResult.newOKCommandResult();
+ }
+
+ /**
+ * Duplicate all applied profiles from the package on the root element of the controlled resource
+ *
+ * @param selection
+ */
+ private void duplicateAppliedProfiles(final EObject selection) {
+ Package _package = (Package) selection;
+ for (Profile profile : _package.getAllAppliedProfiles()) {
+ ProfileApplicationHelper.duplicateProfileApplication(_package, profile);
+ }
+ }
} \ No newline at end of file
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/MoveProfileApplicationCommand.java b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/MoveProfileApplicationCommand.java
index f744e9af9fd..81f52d60ea2 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/MoveProfileApplicationCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/MoveProfileApplicationCommand.java
@@ -1,55 +1,55 @@
-/*****************************************************************************
- * Copyright (c) 2013, 2014 Atos, Christian W. Damus, and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Arthur Daussy (Atos) arthur.daussy@atos.net - Initial API and implementation
- * Christian W. Damus - bug 399859
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.controlmode.profile.commands;
-
-import java.util.Collections;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
-import org.eclipse.papyrus.infra.services.controlmode.commands.AbstractControlCommand;
-import org.eclipse.papyrus.uml.controlmode.profile.helpers.ProfileApplicationHelper;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * Command used to move Profile application to new resource
- *
- * @author adaussy
- *
- */
-public class MoveProfileApplicationCommand extends AbstractControlCommand {
-
-
- public MoveProfileApplicationCommand(ControlModeRequest request) {
- super("Move stereotype application to new resource", Collections.singletonList(WorkspaceSynchronizer.getFile(request.getTargetObject().eContainer().eResource())), request);
- Assert.isLegal(request.getTargetObject() instanceof Package);
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- Package packageUncontroled = (Package) getRequest().getTargetObject();
- Resource sourceResource = packageUncontroled.eContainer().eResource();
- Resource targetResource = getRequest().getTargetResource(getRequest().getNewURI().fileExtension());
- if (targetResource == null) {
- return CommandResult.newErrorCommandResult("Unable to retreive target resource");
- }
- ProfileApplicationHelper.nestedRelocateStereotypeApplications(packageUncontroled, sourceResource, targetResource);
- return CommandResult.newOKCommandResult();
- }
+/*****************************************************************************
+ * Copyright (c) 2013, 2014 Atos, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Arthur Daussy (Atos) arthur.daussy@atos.net - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.controlmode.profile.commands;
+
+import java.util.Collections;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
+import org.eclipse.papyrus.infra.services.controlmode.commands.AbstractControlCommand;
+import org.eclipse.papyrus.uml.controlmode.profile.helpers.ProfileApplicationHelper;
+import org.eclipse.uml2.uml.Package;
+
+/**
+ * Command used to move Profile application to new resource
+ *
+ * @author adaussy
+ *
+ */
+public class MoveProfileApplicationCommand extends AbstractControlCommand {
+
+
+ public MoveProfileApplicationCommand(ControlModeRequest request) {
+ super("Move stereotype application to new resource", Collections.singletonList(WorkspaceSynchronizer.getFile(request.getTargetObject().eContainer().eResource())), request);
+ Assert.isLegal(request.getTargetObject() instanceof Package);
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Package packageUncontroled = (Package) getRequest().getTargetObject();
+ Resource sourceResource = packageUncontroled.eContainer().eResource();
+ Resource targetResource = getRequest().getTargetResource(getRequest().getNewURI().fileExtension());
+ if (targetResource == null) {
+ return CommandResult.newErrorCommandResult("Unable to retreive target resource");
+ }
+ ProfileApplicationHelper.nestedRelocateStereotypeApplications(packageUncontroled, sourceResource, targetResource);
+ return CommandResult.newOKCommandResult();
+ }
} \ No newline at end of file
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/RemoveDuplicationProfileApplicationCommand.java b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/RemoveDuplicationProfileApplicationCommand.java
index 7d970134b5a..4a1fa23c3df 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/RemoveDuplicationProfileApplicationCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/RemoveDuplicationProfileApplicationCommand.java
@@ -1,49 +1,49 @@
-/*****************************************************************************
- * Copyright (c) 2013 Atos.
- *
- *
- * 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:
- * Arthur Daussy (Atos) arthur.daussy@atos.net - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.controlmode.profile.commands;
-
-import java.util.Collections;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
-import org.eclipse.papyrus.infra.services.controlmode.commands.AbstractControlCommand;
-import org.eclipse.papyrus.uml.controlmode.profile.helpers.ProfileApplicationHelper;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Profile;
-
-/**
- * Command to remove duplication profile applicaiton during uncontrol
- *
- * @author adaussy
- *
- */
-public final class RemoveDuplicationProfileApplicationCommand extends AbstractControlCommand {
-
- public RemoveDuplicationProfileApplicationCommand(ControlModeRequest request) {
- super("Remove duplicated Profile Application", Collections.singletonList(WorkspaceSynchronizer.getFile(request.getTargetObject().eResource())), request);
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- for (Profile profile : ((Package) getRequest().getTargetObject()).getAppliedProfiles()) {
- // profile is duplicated, unapply it
- ProfileApplicationHelper.removeProfileApplicationDuplication(((Package) getRequest().getTargetObject()), profile, true);
- }
- return CommandResult.newOKCommandResult();
- }
+/*****************************************************************************
+ * Copyright (c) 2013 Atos.
+ *
+ *
+ * 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:
+ * Arthur Daussy (Atos) arthur.daussy@atos.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.controlmode.profile.commands;
+
+import java.util.Collections;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
+import org.eclipse.papyrus.infra.services.controlmode.commands.AbstractControlCommand;
+import org.eclipse.papyrus.uml.controlmode.profile.helpers.ProfileApplicationHelper;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+
+/**
+ * Command to remove duplication profile applicaiton during uncontrol
+ *
+ * @author adaussy
+ *
+ */
+public final class RemoveDuplicationProfileApplicationCommand extends AbstractControlCommand {
+
+ public RemoveDuplicationProfileApplicationCommand(ControlModeRequest request) {
+ super("Remove duplicated Profile Application", Collections.singletonList(WorkspaceSynchronizer.getFile(request.getTargetObject().eResource())), request);
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ for (Profile profile : ((Package) getRequest().getTargetObject()).getAppliedProfiles()) {
+ // profile is duplicated, unapply it
+ ProfileApplicationHelper.removeProfileApplicationDuplication(((Package) getRequest().getTargetObject()), profile, true);
+ }
+ return CommandResult.newOKCommandResult();
+ }
} \ No newline at end of file
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/helpers/ProfileApplicationHelper.java b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/helpers/ProfileApplicationHelper.java
index 193231acdfc..8eb2583d9f9 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/helpers/ProfileApplicationHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/helpers/ProfileApplicationHelper.java
@@ -1,205 +1,205 @@
-/*****************************************************************************
- * Copyright (c) 2011, 2014 Atos Origin, Christian W. Damus, and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- * Christian W. Damus - bug 399859
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.controlmode.profile.helpers;
-
-import java.util.Iterator;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Profile;
-import org.eclipse.uml2.uml.ProfileApplication;
-
-/**
- * This helper provides methods to manipulate profile applications on packages.
- *
- * @author vhemery
- */
-public class ProfileApplicationHelper {
-
- /** EAnnotation for duplicated profiles on controlled packages */
- public static final String DUPLICATED_PROFILE = "duplicatedProfile";
-
- /**
- * Duplicate a profile application on a child package if that profile application is
- * intrinsic to the model (not owned by a different model).
- *
- * @param _package
- * package to duplicate profile application on
- * @param profile
- * profile to apply
- */
- public static void duplicateProfileApplication(Package _package, Profile profile) {
- if (profile != null && profile.getDefinition() != null) {
- ProfileApplication toCopy = _package.getProfileApplication(profile, true);
- // Is it inherited from a parent package and intrinsic to the model?
- if (_package.allOwningPackages().contains(toCopy.getApplyingPackage())) {
- // Don't apply the profile because this needlessly destroys and
- // reconstitutes all stereotype applications by a "migration"
- ProfileApplication profileAppl = EcoreUtil.copy(toCopy);
- _package.getProfileApplications().add(profileAppl);
- markAsDuplicate(profileAppl);
- }
- }
- }
-
- /**
- * Remove a profile application duplicate on a child package
- *
- * @param _package
- * package to remove duplicated profile application from
- * @param profile
- * profile to unapply
- * @param force
- * true when package is no longer controlled for forcing profile application removal
- */
- public static void removeProfileApplicationDuplication(Package _package, Profile profile, boolean force) {
- if (profile != null && profile.getDefinition() != null) {
- if (isSameProfileApplied(_package, profile)) {
- ProfileApplication profileAppl = _package.getProfileApplication(profile);
- // remove only duplicated profile applications with eannotation
- if (isDuplicatedProfileApplication(profileAppl)) {
- if (force || getParentPackageWithProfile(_package, profile, false) == null) {
- // first remove eannotation to ensure it will not added again by checker
- profileAppl.getEAnnotations().remove(profileAppl.getEAnnotation(DUPLICATED_PROFILE));
- _package.unapplyProfile(profile);
- }
- // else, there is another parent profile which justifies the duplication
- }
- }
- }
- }
-
- /**
- * Check if the profile is applied on a package, or one similar
- *
- * @param _package
- * package to test on
- * @param profile
- * profile to check
- * @return true if a similar profile is applied
- */
- private static boolean isSameProfileApplied(Package _package, Profile profile) {
- for (Profile prof : _package.getAppliedProfiles()) {
- if (prof == null) {
- break;
- }
- if (prof.equals(profile)) {
- return true;
- }
- if (profile.getQualifiedName() != null && profile.getQualifiedName().equals(prof.getQualifiedName())) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Relocate stereotype applications for the nested elements of the selection in the controlled resource.
- * Stereotype applications are moved to the {@code target} resource only if they are currently in the {@code source} resource, to account for possibly externalized profile applications.
- *
- * @param pack
- * the package for which stereotype application must be relocated
- * @param source
- * the source resource
- * @param target
- * the target controlled resource
- */
- public static void nestedRelocateStereotypeApplications(Package pack, Resource source, Resource target) {
- relocateStereotypeApplications(pack, source, target);
- for (Iterator<EObject> i = EcoreUtil.getAllProperContents(pack, true); i.hasNext();) {
- EObject current = i.next();
- if (current instanceof Element) {
- relocateStereotypeApplications((Element) current, source, target);
- }
- }
- }
-
- /**
- * Relocate stereotype applications for the an element in the controlled resource.
- * Stereotype applications are moved to the {@code target} resource only if they are currently in the {@code source} resource, to account for possibly externalized profile applications.
- *
- * @param element
- * the element for which stereotype application must be relocated
- * @param source
- * the source resource
- * @param target
- * the target controlled resource
- */
- public static void relocateStereotypeApplications(Element element, Resource source, Resource target) {
- EList<EObject> stereotypeApplications = element.getStereotypeApplications();
- EList<EObject> targetList = target.getContents();
- for (EObject next : stereotypeApplications) {
- if (next.eResource() == source) {
- targetList.add(next);
- }
- }
- }
-
- /**
- * Check if the profile application is a duplicated one
- *
- * @param profileAppl
- * profile application to check
- * @return true if it is a duplicated copy
- */
- public static boolean isDuplicatedProfileApplication(ProfileApplication profileAppl) {
- return profileAppl.getEAnnotation(DUPLICATED_PROFILE) != null;
- }
-
- /**
- * Get the nearest parent package which has the profile applied.
- *
- * @param packageElement
- * child package
- * @param profile
- * applied profile
- * @param notControlledOnly
- * true to return only a not controlled package
- * @return the parent package with profile application
- */
- public static Package getParentPackageWithProfile(Package packageElement, Profile profile, boolean notControlledOnly) {
- if (profile != null && profile.getDefinition() != null) {
- Element parent = packageElement.getOwner();
- while (parent != null) {
- if (parent instanceof Package) {
- Package parentPackage = (Package) parent;
- if (isSameProfileApplied(parentPackage, profile)) {
- if (!notControlledOnly || !AdapterFactoryEditingDomain.isControlled(parentPackage)) {
- return parentPackage;
- }
- }
- }
- parent = parent.getOwner();
- }
- }
- return null;
- }
-
- /**
- * Mark this profile application as the duplication of a parent profile
- *
- * @param profileAppl
- * profile application to mark
- */
- public static void markAsDuplicate(ProfileApplication profileAppl) {
- // add eannotation for duplicated profile applications
- profileAppl.createEAnnotation(DUPLICATED_PROFILE);
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 Atos Origin, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.controlmode.profile.helpers;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+/**
+ * This helper provides methods to manipulate profile applications on packages.
+ *
+ * @author vhemery
+ */
+public class ProfileApplicationHelper {
+
+ /** EAnnotation for duplicated profiles on controlled packages */
+ public static final String DUPLICATED_PROFILE = "duplicatedProfile";
+
+ /**
+ * Duplicate a profile application on a child package if that profile application is
+ * intrinsic to the model (not owned by a different model).
+ *
+ * @param _package
+ * package to duplicate profile application on
+ * @param profile
+ * profile to apply
+ */
+ public static void duplicateProfileApplication(Package _package, Profile profile) {
+ if (profile != null && profile.getDefinition() != null) {
+ ProfileApplication toCopy = _package.getProfileApplication(profile, true);
+ // Is it inherited from a parent package and intrinsic to the model?
+ if (_package.allOwningPackages().contains(toCopy.getApplyingPackage())) {
+ // Don't apply the profile because this needlessly destroys and
+ // reconstitutes all stereotype applications by a "migration"
+ ProfileApplication profileAppl = EcoreUtil.copy(toCopy);
+ _package.getProfileApplications().add(profileAppl);
+ markAsDuplicate(profileAppl);
+ }
+ }
+ }
+
+ /**
+ * Remove a profile application duplicate on a child package
+ *
+ * @param _package
+ * package to remove duplicated profile application from
+ * @param profile
+ * profile to unapply
+ * @param force
+ * true when package is no longer controlled for forcing profile application removal
+ */
+ public static void removeProfileApplicationDuplication(Package _package, Profile profile, boolean force) {
+ if (profile != null && profile.getDefinition() != null) {
+ if (isSameProfileApplied(_package, profile)) {
+ ProfileApplication profileAppl = _package.getProfileApplication(profile);
+ // remove only duplicated profile applications with eannotation
+ if (isDuplicatedProfileApplication(profileAppl)) {
+ if (force || getParentPackageWithProfile(_package, profile, false) == null) {
+ // first remove eannotation to ensure it will not added again by checker
+ profileAppl.getEAnnotations().remove(profileAppl.getEAnnotation(DUPLICATED_PROFILE));
+ _package.unapplyProfile(profile);
+ }
+ // else, there is another parent profile which justifies the duplication
+ }
+ }
+ }
+ }
+
+ /**
+ * Check if the profile is applied on a package, or one similar
+ *
+ * @param _package
+ * package to test on
+ * @param profile
+ * profile to check
+ * @return true if a similar profile is applied
+ */
+ private static boolean isSameProfileApplied(Package _package, Profile profile) {
+ for (Profile prof : _package.getAppliedProfiles()) {
+ if (prof == null) {
+ break;
+ }
+ if (prof.equals(profile)) {
+ return true;
+ }
+ if (profile.getQualifiedName() != null && profile.getQualifiedName().equals(prof.getQualifiedName())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Relocate stereotype applications for the nested elements of the selection in the controlled resource.
+ * Stereotype applications are moved to the {@code target} resource only if they are currently in the {@code source} resource, to account for possibly externalized profile applications.
+ *
+ * @param pack
+ * the package for which stereotype application must be relocated
+ * @param source
+ * the source resource
+ * @param target
+ * the target controlled resource
+ */
+ public static void nestedRelocateStereotypeApplications(Package pack, Resource source, Resource target) {
+ relocateStereotypeApplications(pack, source, target);
+ for (Iterator<EObject> i = EcoreUtil.getAllProperContents(pack, true); i.hasNext();) {
+ EObject current = i.next();
+ if (current instanceof Element) {
+ relocateStereotypeApplications((Element) current, source, target);
+ }
+ }
+ }
+
+ /**
+ * Relocate stereotype applications for the an element in the controlled resource.
+ * Stereotype applications are moved to the {@code target} resource only if they are currently in the {@code source} resource, to account for possibly externalized profile applications.
+ *
+ * @param element
+ * the element for which stereotype application must be relocated
+ * @param source
+ * the source resource
+ * @param target
+ * the target controlled resource
+ */
+ public static void relocateStereotypeApplications(Element element, Resource source, Resource target) {
+ EList<EObject> stereotypeApplications = element.getStereotypeApplications();
+ EList<EObject> targetList = target.getContents();
+ for (EObject next : stereotypeApplications) {
+ if (next.eResource() == source) {
+ targetList.add(next);
+ }
+ }
+ }
+
+ /**
+ * Check if the profile application is a duplicated one
+ *
+ * @param profileAppl
+ * profile application to check
+ * @return true if it is a duplicated copy
+ */
+ public static boolean isDuplicatedProfileApplication(ProfileApplication profileAppl) {
+ return profileAppl.getEAnnotation(DUPLICATED_PROFILE) != null;
+ }
+
+ /**
+ * Get the nearest parent package which has the profile applied.
+ *
+ * @param packageElement
+ * child package
+ * @param profile
+ * applied profile
+ * @param notControlledOnly
+ * true to return only a not controlled package
+ * @return the parent package with profile application
+ */
+ public static Package getParentPackageWithProfile(Package packageElement, Profile profile, boolean notControlledOnly) {
+ if (profile != null && profile.getDefinition() != null) {
+ Element parent = packageElement.getOwner();
+ while (parent != null) {
+ if (parent instanceof Package) {
+ Package parentPackage = (Package) parent;
+ if (isSameProfileApplied(parentPackage, profile)) {
+ if (!notControlledOnly || !AdapterFactoryEditingDomain.isControlled(parentPackage)) {
+ return parentPackage;
+ }
+ }
+ }
+ parent = parent.getOwner();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Mark this profile application as the duplication of a parent profile
+ *
+ * @param profileAppl
+ * profile application to mark
+ */
+ public static void markAsDuplicate(ProfileApplication profileAppl) {
+ // add eannotation for duplicated profile applications
+ profileAppl.createEAnnotation(DUPLICATED_PROFILE);
+ }
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/providers/UMLValidationProvider.java b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/providers/UMLValidationProvider.java
index 9a63c2c240b..9bf84551dd6 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/providers/UMLValidationProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/providers/UMLValidationProvider.java
@@ -1,195 +1,195 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * 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:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.controlmode.profile.providers;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.validation.model.IClientSelector;
-import org.eclipse.emf.validation.model.IConstraintStatus;
-import org.eclipse.emf.validation.service.IValidationListener;
-import org.eclipse.emf.validation.service.ModelValidationService;
-import org.eclipse.emf.validation.service.ValidationEvent;
-import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder;
-import org.eclipse.papyrus.uml.controlmode.profile.Activator;
-import org.eclipse.papyrus.uml.controlmode.profile.helpers.SafeDialogOpenerDuringValidation;
-
-/**
- * Provides validation for UML models
- */
-public class UMLValidationProvider {
-
- /**
- * Whether constraints are active
- */
- private static boolean constraintsActive = false;
-
- /**
- * Ids of constraints which report is already managed by themselves.
- */
- protected static final Collection<String> SELF_MANAGING_CONSTRAINTS = Arrays.asList("org.eclipse.papyrus.uml.controlmode.profile.validation.ProfileApplicationDuplicationChecker");
-
- /**
- * Validation listener which reports problems to the user
- */
- private static class ValidationReportListener implements IValidationListener {
-
- /**
- * Report the validation result to the user in case operation did not fully succeed
- *
- * @see org.eclipse.emf.validation.service.IValidationListener#validationOccurred(org.eclipse.emf.validation.service.ValidationEvent)
- *
- * @param event
- * provides the validation operation results
- */
- public void validationOccurred(ValidationEvent event) {
- boolean needReport = false;
- if (event.getSeverity() >= IStatus.WARNING) {
- needReport = true;
- }
- if (needReport && event.getEvaluationMode().isLive()) {
- StringBuffer messageBuff = new StringBuffer();
- List<String> handledConstraints = new LinkedList<String>(SELF_MANAGING_CONSTRAINTS);
- for (IConstraintStatus status : event.getValidationResults()) {
- // report only major problems
- if (status.getSeverity() >= event.getSeverity()) {
- String constraintId = status.getConstraint().getDescriptor().getId();
- String constraintPlugin = status.getConstraint().getDescriptor().getPluginId();
- if (Activator.PLUGIN_ID.equals(constraintPlugin) && !handledConstraints.contains(constraintId)) {
- handledConstraints.add(constraintId);
- messageBuff.append(status.getMessage());
- }
- }
- }
- if (messageBuff.length() == 0) {
- // no error to report
- return;
- }
- final String message = messageBuff.toString();
- if (event.getSeverity() >= IStatus.ERROR) {
- SafeDialogOpenerDuringValidation<Void> opener = new SafeDialogOpenerDuringValidation<Void>() {
-
- @Override
- protected Void openDialog() {
- NotificationBuilder.createWarningPopup(message).run();
- return null;
- }
- };
- opener.execute();
- } else {
- SafeDialogOpenerDuringValidation<Void> opener = new SafeDialogOpenerDuringValidation<Void>() {
-
- @Override
- protected Void openDialog() {
- NotificationBuilder.createInfoPopup(message).run();
- return null;
- }
- };
- opener.execute();
- }
- }
- }
- }
-
- /**
- * Add a validation listener to report problems
- */
- static {
- ModelValidationService.getInstance().addValidationListener(new ValidationReportListener());
- }
-
- /**
- * Run an operation with checking of the constraints
- *
- * @param editingDomain
- * editing domain
- * @param operation
- * operation to run
- */
- public static void runWithConstraints(TransactionalEditingDomain editingDomain, Runnable operation) {
- final Runnable op = operation;
- Runnable task = new Runnable() {
-
- public void run() {
- try {
- constraintsActive = true;
- op.run();
- } finally {
- constraintsActive = false;
- }
- }
- };
- if (editingDomain != null) {
- try {
- editingDomain.runExclusive(task);
- } catch (Exception e) {
- Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Validation failed", e));
- }
- } else {
- task.run();
- }
- }
-
- /**
- * Context for validation
- */
- public static class DefaultCtx implements IClientSelector {
-
- /**
- * Indicate whether validation is activated
- *
- * @see org.eclipse.emf.validation.model.IClientSelector#selects(java.lang.Object)
- *
- * @param object
- * object to eventually validate
- * @return true if validation is required
- */
- public boolean selects(Object object) {
- if (constraintsActive) {
- return true;
- }
- if (object instanceof EObject) {
- EObject eObj = (EObject) object;
- Resource resource = eObj.eResource();
- if (resource != null) {
- ResourceSet set = resource.getResourceSet();
- return set instanceof ModelSet;
- }
- }
- return false;
- }
- }
-
- /**
- * Format a model element
- *
- * @param object
- * element to format
- * @return text
- */
- static String formatElement(EObject object) {
- return EMFCoreUtil.getQualifiedName(object, true);
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2011 Atos Origin.
+ *
+ *
+ * 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:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.controlmode.profile.providers;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.validation.model.IClientSelector;
+import org.eclipse.emf.validation.model.IConstraintStatus;
+import org.eclipse.emf.validation.service.IValidationListener;
+import org.eclipse.emf.validation.service.ModelValidationService;
+import org.eclipse.emf.validation.service.ValidationEvent;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder;
+import org.eclipse.papyrus.uml.controlmode.profile.Activator;
+import org.eclipse.papyrus.uml.controlmode.profile.helpers.SafeDialogOpenerDuringValidation;
+
+/**
+ * Provides validation for UML models
+ */
+public class UMLValidationProvider {
+
+ /**
+ * Whether constraints are active
+ */
+ private static boolean constraintsActive = false;
+
+ /**
+ * Ids of constraints which report is already managed by themselves.
+ */
+ protected static final Collection<String> SELF_MANAGING_CONSTRAINTS = Arrays.asList("org.eclipse.papyrus.uml.controlmode.profile.validation.ProfileApplicationDuplicationChecker");
+
+ /**
+ * Validation listener which reports problems to the user
+ */
+ private static class ValidationReportListener implements IValidationListener {
+
+ /**
+ * Report the validation result to the user in case operation did not fully succeed
+ *
+ * @see org.eclipse.emf.validation.service.IValidationListener#validationOccurred(org.eclipse.emf.validation.service.ValidationEvent)
+ *
+ * @param event
+ * provides the validation operation results
+ */
+ public void validationOccurred(ValidationEvent event) {
+ boolean needReport = false;
+ if (event.getSeverity() >= IStatus.WARNING) {
+ needReport = true;
+ }
+ if (needReport && event.getEvaluationMode().isLive()) {
+ StringBuffer messageBuff = new StringBuffer();
+ List<String> handledConstraints = new LinkedList<String>(SELF_MANAGING_CONSTRAINTS);
+ for (IConstraintStatus status : event.getValidationResults()) {
+ // report only major problems
+ if (status.getSeverity() >= event.getSeverity()) {
+ String constraintId = status.getConstraint().getDescriptor().getId();
+ String constraintPlugin = status.getConstraint().getDescriptor().getPluginId();
+ if (Activator.PLUGIN_ID.equals(constraintPlugin) && !handledConstraints.contains(constraintId)) {
+ handledConstraints.add(constraintId);
+ messageBuff.append(status.getMessage());
+ }
+ }
+ }
+ if (messageBuff.length() == 0) {
+ // no error to report
+ return;
+ }
+ final String message = messageBuff.toString();
+ if (event.getSeverity() >= IStatus.ERROR) {
+ SafeDialogOpenerDuringValidation<Void> opener = new SafeDialogOpenerDuringValidation<Void>() {
+
+ @Override
+ protected Void openDialog() {
+ NotificationBuilder.createWarningPopup(message).run();
+ return null;
+ }
+ };
+ opener.execute();
+ } else {
+ SafeDialogOpenerDuringValidation<Void> opener = new SafeDialogOpenerDuringValidation<Void>() {
+
+ @Override
+ protected Void openDialog() {
+ NotificationBuilder.createInfoPopup(message).run();
+ return null;
+ }
+ };
+ opener.execute();
+ }
+ }
+ }
+ }
+
+ /**
+ * Add a validation listener to report problems
+ */
+ static {
+ ModelValidationService.getInstance().addValidationListener(new ValidationReportListener());
+ }
+
+ /**
+ * Run an operation with checking of the constraints
+ *
+ * @param editingDomain
+ * editing domain
+ * @param operation
+ * operation to run
+ */
+ public static void runWithConstraints(TransactionalEditingDomain editingDomain, Runnable operation) {
+ final Runnable op = operation;
+ Runnable task = new Runnable() {
+
+ public void run() {
+ try {
+ constraintsActive = true;
+ op.run();
+ } finally {
+ constraintsActive = false;
+ }
+ }
+ };
+ if (editingDomain != null) {
+ try {
+ editingDomain.runExclusive(task);
+ } catch (Exception e) {
+ Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Validation failed", e));
+ }
+ } else {
+ task.run();
+ }
+ }
+
+ /**
+ * Context for validation
+ */
+ public static class DefaultCtx implements IClientSelector {
+
+ /**
+ * Indicate whether validation is activated
+ *
+ * @see org.eclipse.emf.validation.model.IClientSelector#selects(java.lang.Object)
+ *
+ * @param object
+ * object to eventually validate
+ * @return true if validation is required
+ */
+ public boolean selects(Object object) {
+ if (constraintsActive) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ EObject eObj = (EObject) object;
+ Resource resource = eObj.eResource();
+ if (resource != null) {
+ ResourceSet set = resource.getResourceSet();
+ return set instanceof ModelSet;
+ }
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Format a model element
+ *
+ * @param object
+ * element to format
+ * @return text
+ */
+ static String formatElement(EObject object) {
+ return EMFCoreUtil.getQualifiedName(object, true);
+ }
+
+}

Back to the top