Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Le Menez2018-01-09 10:09:46 +0000
committerQuentin Le Menez2018-01-09 13:18:15 +0000
commitd98116b5b376f18b6cf626ba4158a35fe9a4a64e (patch)
tree4458c9c5ada0a216b385813a56ea9a9b8c7b6509 /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication
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/diagram/org.eclipse.papyrus.uml.diagram.communication')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/net.sf.jautodoc.prefs12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/org.eclipse.jdt.core.prefs720
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/org.eclipse.ltk.core.refactoring.prefs6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/org.eclipse.ocl.modelregistry4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/about.html56
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/CommunicationDiagramEditorFactory.java74
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineSemanticChildrenStrategy.java272
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineVisualChildrenStrategy.java156
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomDurationObservationStereotypeLabelEditPartCN.java142
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomLifelineEditPartCN.java350
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomMessageNameEditPart.java170
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomTimeObservationStereotypeLabelEditPartCN.java142
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/ObservationLayoutEditPolicy.java126
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/CustomWrappingLabel.java320
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/DurationObservationNodeFigure.java78
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/TimeObservationNodeFigure.java74
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/CommunicationLinkMappingHelper.java192
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/CommunicationRequestConstant.java80
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/CommunicationUtil.java662
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/InconsistentMessageViewsHelper.java506
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/MessageDirection.java82
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/NotificationHelper.java172
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/RotationHelper.java590
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/TimeObservationHelper.java282
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/messages/Messages.java118
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/messages/messages.properties18
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconciler_1_2_0.java306
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/parts/InteractionCompartmentDiagramUpdater.java286
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/providers/CustomUMLEditPartProvider.java64
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/icons/alt_launcher.xpm614
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/PapyrusUMLCommunicationDiagram.paletteconfiguration226
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.elementtypesconfigurations12
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/pom.xml20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/OpenDiagramEditPolicy.java388
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLPaletteFactory.java358
36 files changed, 3841 insertions, 3841 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/net.sf.jautodoc.prefs b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/net.sf.jautodoc.prefs
index daf1ef7986e..ae0d8f10ee3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/net.sf.jautodoc.prefs
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/net.sf.jautodoc.prefs
@@ -1,6 +1,6 @@
-#Thu Oct 14 13:24:41 CEST 2010
-add_header=true
-eclipse.preferences.version=1
-header_text=/*****************************************************************************\r\n * Copyright (c) 2010 CEA LIST.\r\n *\r\n * \r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * Saadia Dhouib saadia.dhouib@cea.fr \r\n *\r\n *****************************************************************************/
-project_specific_settings=true
-replacements=<?xml version\="1.0" standalone\="yes"?>\n\n<replacements>\n<replacement key\="get" scope\="1" mode\="0">Gets the</replacement>\n<replacement key\="set" scope\="1" mode\="0">Sets the</replacement>\n<replacement key\="add" scope\="1" mode\="0">Adds the</replacement>\n<replacement key\="edit" scope\="1" mode\="0">Edits the</replacement>\n<replacement key\="remove" scope\="1" mode\="0">Removes the</replacement>\n<replacement key\="init" scope\="1" mode\="0">Inits the</replacement>\n<replacement key\="parse" scope\="1" mode\="0">Parses the</replacement>\n<replacement key\="create" scope\="1" mode\="0">Creates the</replacement>\n<replacement key\="build" scope\="1" mode\="0">Builds the</replacement>\n<replacement key\="is" scope\="1" mode\="0">Checks if is</replacement>\n<replacement key\="print" scope\="1" mode\="0">Prints the</replacement>\n<replacement key\="has" scope\="1" mode\="0">Checks for</replacement>\n</replacements>\n\n
+#Thu Oct 14 13:24:41 CEST 2010
+add_header=true
+eclipse.preferences.version=1
+header_text=/*****************************************************************************\r\n * Copyright (c) 2010 CEA LIST.\r\n *\r\n * \r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * Saadia Dhouib saadia.dhouib@cea.fr \r\n *\r\n *****************************************************************************/
+project_specific_settings=true
+replacements=<?xml version\="1.0" standalone\="yes"?>\n\n<replacements>\n<replacement key\="get" scope\="1" mode\="0">Gets the</replacement>\n<replacement key\="set" scope\="1" mode\="0">Sets the</replacement>\n<replacement key\="add" scope\="1" mode\="0">Adds the</replacement>\n<replacement key\="edit" scope\="1" mode\="0">Edits the</replacement>\n<replacement key\="remove" scope\="1" mode\="0">Removes the</replacement>\n<replacement key\="init" scope\="1" mode\="0">Inits the</replacement>\n<replacement key\="parse" scope\="1" mode\="0">Parses the</replacement>\n<replacement key\="create" scope\="1" mode\="0">Creates the</replacement>\n<replacement key\="build" scope\="1" mode\="0">Builds the</replacement>\n<replacement key\="is" scope\="1" mode\="0">Checks if is</replacement>\n<replacement key\="print" scope\="1" mode\="0">Prints the</replacement>\n<replacement key\="has" scope\="1" mode\="0">Checks for</replacement>\n</replacements>\n\n
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/org.eclipse.jdt.core.prefs
index ee2c66aeda8..80d5dc7e895 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/org.eclipse.jdt.core.prefs
@@ -1,360 +1,360 @@
-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.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-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.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+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/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/org.eclipse.ltk.core.refactoring.prefs b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/org.eclipse.ltk.core.refactoring.prefs
index 7bfad2ce9c4..867cbd79d29 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/org.eclipse.ltk.core.refactoring.prefs
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -1,3 +1,3 @@
-#Tue Oct 26 15:27:00 CEST 2010
-eclipse.preferences.version=1
-org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
+#Tue Oct 26 15:27:00 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/org.eclipse.ocl.modelregistry b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/org.eclipse.ocl.modelregistry
index f350ed35e13..2fb76f2a8e8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/org.eclipse.ocl.modelregistry
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/.settings/org.eclipse.ocl.modelregistry
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="ASCII"?>
-<mreg:ModelRegistrySettings xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:mreg="http://www.eclipse.org/ocl/1.0/ModelRegistry"/>
+<?xml version="1.0" encoding="ASCII"?>
+<mreg:ModelRegistrySettings xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:mreg="http://www.eclipse.org/ocl/1.0/ModelRegistry"/>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/about.html b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/about.html
index 82d49bf5f81..d35d5aed64c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/about.html
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/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/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/CommunicationDiagramEditorFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/CommunicationDiagramEditorFactory.java
index 10a770dc89f..f0aec02d4a1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/CommunicationDiagramEditorFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/CommunicationDiagramEditorFactory.java
@@ -1,37 +1,37 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin cedric.dumoulin@lifl.fr - Initial API and implementation
- * Saadia Dhouib saadia.dhouib@cea.fr - Adapted from Composite Structure Diagram
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.communication;
-
-import org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.ModelEditPart;
-
-/**
- *
- * Specialization for communication diagram
- *
- */
-public class CommunicationDiagramEditorFactory extends GmfEditorFactory {
-
- /**
- *
- * Constructor.
- *
- */
- public CommunicationDiagramEditorFactory() {
- super(UmlCommunicationDiagramForMultiEditor.class, ModelEditPart.MODEL_ID);
-
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Saadia Dhouib saadia.dhouib@cea.fr - Adapted from Composite Structure Diagram
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.communication;
+
+import org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.ModelEditPart;
+
+/**
+ *
+ * Specialization for communication diagram
+ *
+ */
+public class CommunicationDiagramEditorFactory extends GmfEditorFactory {
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public CommunicationDiagramEditorFactory() {
+ super(UmlCommunicationDiagramForMultiEditor.class, ModelEditPart.MODEL_ID);
+
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineSemanticChildrenStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineSemanticChildrenStrategy.java
index 2a631945613..f71eb8aed27 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineSemanticChildrenStrategy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineSemanticChildrenStrategy.java
@@ -1,136 +1,136 @@
-/*****************************************************************************
- * Copyright (c) 2015 Christian W. Damus and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Christian W. Damus - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.communication.custom.canonical;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.canonical.DefaultUMLSemanticChildrenStrategy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-
-/**
- * Custom semantic-children strategy for lifelines in communication diagrams.
- * @since 3.0
- */
-public class LifelineSemanticChildrenStrategy extends DefaultUMLSemanticChildrenStrategy {
-
- public LifelineSemanticChildrenStrategy() {
- super();
- }
-
- @Override
- public List<? extends EObject> getCanonicalSemanticConnections(EObject semanticFromEditPart, View viewFromEditPart) {
- // We only have messages connected to lifelines in communication diagrams
- List<? extends EObject> result = null;
-
- Lifeline lifeline = (semanticFromEditPart instanceof Lifeline) ? (Lifeline) semanticFromEditPart : null;
- if (lifeline != null) {
- List<Element> messages = new ArrayList<Element>();
- result = messages;
-
- for (MessageEnd next : getMessageEnds(lifeline)) {
- if (next.getMessage() != null) {
- messages.add(next.getMessage());
- }
- }
- }
-
- return result;
- }
-
- Iterable<MessageEnd> getMessageEnds(Lifeline lifeline) {
- return Iterables.filter(lifeline.getCoveredBys(), MessageEnd.class);
- }
-
- @Override
- public Collection<? extends EObject> getCanonicalDependents(EObject semanticFromEditPart, View viewFromEditPart) {
- List<? extends EObject> result = null;
-
- Lifeline lifeline = (semanticFromEditPart instanceof Lifeline) ? (Lifeline) semanticFromEditPart : null;
- if (lifeline != null) {
- result = Lists.newArrayList(getMessageEnds(lifeline));
- }
-
- return result;
- }
-
- @Override
- public Object getSource(EObject connectionElement) {
- Object result;
-
- if (connectionElement instanceof Message) {
- MessageEnd end = ((Message) connectionElement).getSendEvent();
- result = end;
-
- // But, in this diagram, messages connect lifelines, not message-ends
- Lifeline covered = getCovered(end);
- if (covered != null) {
- result = covered;
- }
- } else {
- result = super.getSource(connectionElement);
- }
-
- return result;
- }
-
- /**
- * If a message end is a message occurrence specification (not a gate), get the lifeline
- * that it covers.
- *
- * @param messageEnd
- * a message end
- * @return its covered lifeline, if any
- */
- protected Lifeline getCovered(MessageEnd messageEnd) {
- Lifeline result = null;
-
- if (messageEnd instanceof OccurrenceSpecification) {
- result = ((MessageOccurrenceSpecification) messageEnd).getCovered();
- }
-
- return result;
- }
-
- @Override
- public Object getTarget(EObject connectionElement) {
- Object result;
-
- if (connectionElement instanceof Message) {
- MessageEnd end = ((Message) connectionElement).getReceiveEvent();
- result = end;
-
- // But, in this diagram, messages connect lifelines, not message-ends
- Lifeline covered = getCovered(end);
- if (covered != null) {
- result = covered;
- }
- } else {
- result = super.getTarget(connectionElement);
- }
-
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.communication.custom.canonical;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.canonical.DefaultUMLSemanticChildrenStrategy;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageEnd;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.eclipse.uml2.uml.OccurrenceSpecification;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * Custom semantic-children strategy for lifelines in communication diagrams.
+ * @since 3.0
+ */
+public class LifelineSemanticChildrenStrategy extends DefaultUMLSemanticChildrenStrategy {
+
+ public LifelineSemanticChildrenStrategy() {
+ super();
+ }
+
+ @Override
+ public List<? extends EObject> getCanonicalSemanticConnections(EObject semanticFromEditPart, View viewFromEditPart) {
+ // We only have messages connected to lifelines in communication diagrams
+ List<? extends EObject> result = null;
+
+ Lifeline lifeline = (semanticFromEditPart instanceof Lifeline) ? (Lifeline) semanticFromEditPart : null;
+ if (lifeline != null) {
+ List<Element> messages = new ArrayList<Element>();
+ result = messages;
+
+ for (MessageEnd next : getMessageEnds(lifeline)) {
+ if (next.getMessage() != null) {
+ messages.add(next.getMessage());
+ }
+ }
+ }
+
+ return result;
+ }
+
+ Iterable<MessageEnd> getMessageEnds(Lifeline lifeline) {
+ return Iterables.filter(lifeline.getCoveredBys(), MessageEnd.class);
+ }
+
+ @Override
+ public Collection<? extends EObject> getCanonicalDependents(EObject semanticFromEditPart, View viewFromEditPart) {
+ List<? extends EObject> result = null;
+
+ Lifeline lifeline = (semanticFromEditPart instanceof Lifeline) ? (Lifeline) semanticFromEditPart : null;
+ if (lifeline != null) {
+ result = Lists.newArrayList(getMessageEnds(lifeline));
+ }
+
+ return result;
+ }
+
+ @Override
+ public Object getSource(EObject connectionElement) {
+ Object result;
+
+ if (connectionElement instanceof Message) {
+ MessageEnd end = ((Message) connectionElement).getSendEvent();
+ result = end;
+
+ // But, in this diagram, messages connect lifelines, not message-ends
+ Lifeline covered = getCovered(end);
+ if (covered != null) {
+ result = covered;
+ }
+ } else {
+ result = super.getSource(connectionElement);
+ }
+
+ return result;
+ }
+
+ /**
+ * If a message end is a message occurrence specification (not a gate), get the lifeline
+ * that it covers.
+ *
+ * @param messageEnd
+ * a message end
+ * @return its covered lifeline, if any
+ */
+ protected Lifeline getCovered(MessageEnd messageEnd) {
+ Lifeline result = null;
+
+ if (messageEnd instanceof OccurrenceSpecification) {
+ result = ((MessageOccurrenceSpecification) messageEnd).getCovered();
+ }
+
+ return result;
+ }
+
+ @Override
+ public Object getTarget(EObject connectionElement) {
+ Object result;
+
+ if (connectionElement instanceof Message) {
+ MessageEnd end = ((Message) connectionElement).getReceiveEvent();
+ result = end;
+
+ // But, in this diagram, messages connect lifelines, not message-ends
+ Lifeline covered = getCovered(end);
+ if (covered != null) {
+ result = covered;
+ }
+ } else {
+ result = super.getTarget(connectionElement);
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineVisualChildrenStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineVisualChildrenStrategy.java
index 92ee17716e0..0776e65132b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineVisualChildrenStrategy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/canonical/LifelineVisualChildrenStrategy.java
@@ -1,78 +1,78 @@
-/*****************************************************************************
- * Copyright (c) 2015 Christian W. Damus and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Christian W. Damus - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.communication.custom.canonical;
-
-import java.util.List;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.canonical.strategy.IVisualChildrenStrategy;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN;
-import org.eclipse.uml2.uml.Message;
-
-import com.google.common.collect.Lists;
-
-/**
- * Custom visual-children strategy for lifelines in communication diagrams.
- * @since 3.0
- */
-public class LifelineVisualChildrenStrategy implements IVisualChildrenStrategy {
-
- public LifelineVisualChildrenStrategy() {
- super();
- }
-
- public List<? extends Edge> getCanonicalChildren(EditPart editPart, View view) {
- return null;
- }
-
- public List<? extends View> getCanonicalEdges(EditPart editPart, View view) {
- List<View> result = null;
-
- if (editPart instanceof LifelineEditPartCN) {
- // In the communication diagram, edges are just communication paths.
- // It is labels on these edges that represent the messages sent
- // and received by lifelines
- result = Lists.newArrayList();
-
- @SuppressWarnings("unchecked")
- List<? extends Edge> sourceEdges = view.getSourceEdges();
- for (Edge next : sourceEdges) {
- collectMessages(next, result);
- }
-
- @SuppressWarnings("unchecked")
- List<? extends Edge> targetEdges = view.getTargetEdges();
- for (Edge next : targetEdges) {
- // Don't process self-edges twice
- if (next.getSource() != view) {
- collectMessages(next, result);
- }
- }
- }
-
- return result;
- }
-
- private static void collectMessages(Edge edge, List<? super View> result) {
- @SuppressWarnings("unchecked")
- List<? extends View> labels = edge.getChildren();
- for (View next : labels) {
- if (next.getElement() instanceof Message) {
- result.add(next);
- }
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.communication.custom.canonical;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.canonical.strategy.IVisualChildrenStrategy;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN;
+import org.eclipse.uml2.uml.Message;
+
+import com.google.common.collect.Lists;
+
+/**
+ * Custom visual-children strategy for lifelines in communication diagrams.
+ * @since 3.0
+ */
+public class LifelineVisualChildrenStrategy implements IVisualChildrenStrategy {
+
+ public LifelineVisualChildrenStrategy() {
+ super();
+ }
+
+ public List<? extends Edge> getCanonicalChildren(EditPart editPart, View view) {
+ return null;
+ }
+
+ public List<? extends View> getCanonicalEdges(EditPart editPart, View view) {
+ List<View> result = null;
+
+ if (editPart instanceof LifelineEditPartCN) {
+ // In the communication diagram, edges are just communication paths.
+ // It is labels on these edges that represent the messages sent
+ // and received by lifelines
+ result = Lists.newArrayList();
+
+ @SuppressWarnings("unchecked")
+ List<? extends Edge> sourceEdges = view.getSourceEdges();
+ for (Edge next : sourceEdges) {
+ collectMessages(next, result);
+ }
+
+ @SuppressWarnings("unchecked")
+ List<? extends Edge> targetEdges = view.getTargetEdges();
+ for (Edge next : targetEdges) {
+ // Don't process self-edges twice
+ if (next.getSource() != view) {
+ collectMessages(next, result);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ private static void collectMessages(Edge edge, List<? super View> result) {
+ @SuppressWarnings("unchecked")
+ List<? extends View> labels = edge.getChildren();
+ for (View next : labels) {
+ if (next.getElement() instanceof Message) {
+ result.add(next);
+ }
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomDurationObservationStereotypeLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomDurationObservationStereotypeLabelEditPartCN.java
index 5d0195a4f8d..ec63ac4c886 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomDurationObservationStereotypeLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomDurationObservationStereotypeLabelEditPartCN.java
@@ -1,71 +1,71 @@
-/**
- * Copyright (c) 2015 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 472932
- */
-package org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts;
-
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationStereotypeLabelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.communication.edit.policies.UMLTextSelectionEditPolicy;
-
-/**
- * The custom edit policy for the duration observation stereotype label.
- */
-public class CustomDurationObservationStereotypeLabelEditPartCN extends DurationObservationStereotypeLabelEditPartCN {
-
- /**
- * Constructor.
- *
- * @param view
- * The view
- */
- public CustomDurationObservationStereotypeLabelEditPartCN(final View view) {
- super(view);
- }
-
- /**
- * Redefine the refresh label to get the STEREOTYPE_LABEL_POLICY if exist and don't recalculate the text.
- *
- * @see org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortAppliedStereotypeEditPart#refreshLabel()
- */
- @Override
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- // Bug 472932 : Stereotype is always displayed
- if (maskLabelPolicy == null) {
- maskLabelPolicy = getEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- } else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-}
+/**
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 472932
+ */
+package org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts;
+
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationStereotypeLabelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.communication.edit.policies.UMLTextSelectionEditPolicy;
+
+/**
+ * The custom edit policy for the duration observation stereotype label.
+ */
+public class CustomDurationObservationStereotypeLabelEditPartCN extends DurationObservationStereotypeLabelEditPartCN {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * The view
+ */
+ public CustomDurationObservationStereotypeLabelEditPartCN(final View view) {
+ super(view);
+ }
+
+ /**
+ * Redefine the refresh label to get the STEREOTYPE_LABEL_POLICY if exist and don't recalculate the text.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortAppliedStereotypeEditPart#refreshLabel()
+ */
+ @Override
+ protected void refreshLabel() {
+ EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
+ if (maskLabelPolicy == null) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ // Bug 472932 : Stereotype is always displayed
+ if (maskLabelPolicy == null) {
+ maskLabelPolicy = getEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomLifelineEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomLifelineEditPartCN.java
index 76807b59142..9a7a3f46da5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomLifelineEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomLifelineEditPartCN.java
@@ -1,175 +1,175 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
-
- * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr
- * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - use of rounded compartment edit part as super type.
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.helper.NotificationHelper;
-import org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN;
-import org.eclipse.uml2.uml.ConnectableElement;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.StructuredClassifier;
-import org.eclipse.uml2.uml.Type;
-
-/**
- *
- * CustomLifelineEditPartCN
- *
- */
-public class CustomLifelineEditPartCN extends LifelineEditPartCN {
-
- /**
- *
- * Constructor.
- *
- * @param view
- */
- public CustomLifelineEditPartCN(View view) {
- super(view);
- }
-
- /**
- * Return the inner ConnectableElements of the Lifeline
- *
- * @param lifeline
- * The lifeline
- * @return inner ConnectableElements
- */
- // TODO Extract in a helper
- public static List<Property> getProperties(Lifeline lifeline) {
- if (lifeline != null) {
- ConnectableElement represents = lifeline.getRepresents();
- if (represents != null) {
- Type type = represents.getType();
- if (type instanceof StructuredClassifier) {
- StructuredClassifier structuredClassifier = (StructuredClassifier) type;
-
- if (!structuredClassifier.getAllAttributes().isEmpty()) {
- return new ArrayList<Property>(((StructuredClassifier) type).getAllAttributes());
- }
- }
- }
- }
-
- return null;
- }
-
- /**
- * True if the lifeline is in inline mode
- */
- private boolean inlineMode;
-
- /**
- * Notfier for listen and unlistend model element.
- */
- private final NotificationHelper notifier = new NotificationHelper(new UIAdapterImpl() {
-
- @Override
- protected void safeNotifyChanged(Notification msg) {
- handleNotificationEvent(msg);
- }
- });
-
- /**
- * Desactivate listeners for Lifeline to handle notification in the message
- * occurence specification
- */
- @Override
- public void deactivate() {
- notifier.unlistenAll();
- super.deactivate();
- }
-
- /**
- * Get available properties
- *
- * @return Only not already used properties
- */
- @SuppressWarnings("unchecked")
- public List<Property> getAvailableProperties() {
- List<Property> properties = getProperties();
- if (properties != null) {
- for (EditPart editPart : (List<EditPart>) getChildren()) {
- if (editPart instanceof LifelineEditPartCN) {
- Lifeline lifeline = (Lifeline) ((LifelineEditPartCN) editPart).resolveSemanticElement();
- ConnectableElement represents = lifeline.getRepresents();
- if (properties.contains(represents)) {
- properties.remove(represents);
- }
- }
- }
- }
- return properties;
- }
-
- /**
- * Determine inline capability
- *
- * @return True if inline mode is possible
- */
- public boolean isInlineCapability() {
- List<Property> properties = getAvailableProperties();
- if (properties != null && !properties.isEmpty()) {
- return inlineMode || getChildren().size() < 2;
- }
-
- return false;
- }
-
- /**
- * This operation returns the InnerConnectableElement EditParts contained in
- * the Lifeline EditPart
- *
- * @return the list of InnerConnectableElement EditParts
- */
- public List<LifelineEditPartCN> getInnerConnectableElementList() {
- List<LifelineEditPartCN> propertyList = new ArrayList<LifelineEditPartCN>();
- for (Object obj : getChildren()) {
- if (obj instanceof LifelineEditPartCN) {
- propertyList.add((LifelineEditPartCN) obj);
- }
- }
- return propertyList;
- }
-
- /**
- * Return the inner ConnectableElements of the lifeline
- *
- * @return inner ConnectableElements
- */
- public List<Property> getProperties() {
- Lifeline lifeline = (Lifeline) resolveSemanticElement();
- return getProperties(lifeline);
- }
-
- /**
- * Remove listeners for Lifeline to handle notification in the message
- * occurence specification
- */
- @Override
- public void removeNotify() {
- notifier.unlistenAll();
- super.removeNotify();
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+
+ * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - use of rounded compartment edit part as super type.
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.helper.NotificationHelper;
+import org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.StructuredClassifier;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ *
+ * CustomLifelineEditPartCN
+ *
+ */
+public class CustomLifelineEditPartCN extends LifelineEditPartCN {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param view
+ */
+ public CustomLifelineEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * Return the inner ConnectableElements of the Lifeline
+ *
+ * @param lifeline
+ * The lifeline
+ * @return inner ConnectableElements
+ */
+ // TODO Extract in a helper
+ public static List<Property> getProperties(Lifeline lifeline) {
+ if (lifeline != null) {
+ ConnectableElement represents = lifeline.getRepresents();
+ if (represents != null) {
+ Type type = represents.getType();
+ if (type instanceof StructuredClassifier) {
+ StructuredClassifier structuredClassifier = (StructuredClassifier) type;
+
+ if (!structuredClassifier.getAllAttributes().isEmpty()) {
+ return new ArrayList<Property>(((StructuredClassifier) type).getAllAttributes());
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * True if the lifeline is in inline mode
+ */
+ private boolean inlineMode;
+
+ /**
+ * Notfier for listen and unlistend model element.
+ */
+ private final NotificationHelper notifier = new NotificationHelper(new UIAdapterImpl() {
+
+ @Override
+ protected void safeNotifyChanged(Notification msg) {
+ handleNotificationEvent(msg);
+ }
+ });
+
+ /**
+ * Desactivate listeners for Lifeline to handle notification in the message
+ * occurence specification
+ */
+ @Override
+ public void deactivate() {
+ notifier.unlistenAll();
+ super.deactivate();
+ }
+
+ /**
+ * Get available properties
+ *
+ * @return Only not already used properties
+ */
+ @SuppressWarnings("unchecked")
+ public List<Property> getAvailableProperties() {
+ List<Property> properties = getProperties();
+ if (properties != null) {
+ for (EditPart editPart : (List<EditPart>) getChildren()) {
+ if (editPart instanceof LifelineEditPartCN) {
+ Lifeline lifeline = (Lifeline) ((LifelineEditPartCN) editPart).resolveSemanticElement();
+ ConnectableElement represents = lifeline.getRepresents();
+ if (properties.contains(represents)) {
+ properties.remove(represents);
+ }
+ }
+ }
+ }
+ return properties;
+ }
+
+ /**
+ * Determine inline capability
+ *
+ * @return True if inline mode is possible
+ */
+ public boolean isInlineCapability() {
+ List<Property> properties = getAvailableProperties();
+ if (properties != null && !properties.isEmpty()) {
+ return inlineMode || getChildren().size() < 2;
+ }
+
+ return false;
+ }
+
+ /**
+ * This operation returns the InnerConnectableElement EditParts contained in
+ * the Lifeline EditPart
+ *
+ * @return the list of InnerConnectableElement EditParts
+ */
+ public List<LifelineEditPartCN> getInnerConnectableElementList() {
+ List<LifelineEditPartCN> propertyList = new ArrayList<LifelineEditPartCN>();
+ for (Object obj : getChildren()) {
+ if (obj instanceof LifelineEditPartCN) {
+ propertyList.add((LifelineEditPartCN) obj);
+ }
+ }
+ return propertyList;
+ }
+
+ /**
+ * Return the inner ConnectableElements of the lifeline
+ *
+ * @return inner ConnectableElements
+ */
+ public List<Property> getProperties() {
+ Lifeline lifeline = (Lifeline) resolveSemanticElement();
+ return getProperties(lifeline);
+ }
+
+ /**
+ * Remove listeners for Lifeline to handle notification in the message
+ * occurence specification
+ */
+ @Override
+ public void removeNotify() {
+ notifier.unlistenAll();
+ super.removeNotify();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomMessageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomMessageNameEditPart.java
index 3e28c3ccf07..86f335c3a69 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomMessageNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomMessageNameEditPart.java
@@ -1,85 +1,85 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts;
-
-import java.awt.Label;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.communication.custom.figures.CustomWrappingLabel;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart;
-import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorPlugin;
-import org.eclipse.swt.graphics.Image;
-
-/**
- *
- * CustomMessageNameEditPart: a custom wrapping label of the MssageEditPart
- *
- */
-public class CustomMessageNameEditPart extends MessageNameEditPart {
-
- /**
- *
- * Constructor.
- *
- * @param view
- */
- public CustomMessageNameEditPart(View view) {
- super(view);
- }
-
- static final String PATH = "/icons/arrow.gif"; //$NON-NLS-1$
-
- /**
- *
- * @see org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart#getLabelIcon()
- *
- * @return the specific icon of the label (an arrow)
- */
- @Override
- public Image getLabelIcon() {
- return org.eclipse.papyrus.uml.diagram.common.Activator.getPluginIconImage(UMLDiagramEditorPlugin.ID, PATH);
-
- }
-
- /**
- *
- * @see org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart#setLabelTextHelper(org.eclipse.draw2d.IFigure, java.lang.String)
- *
- * @param figure
- * @param text
- */
- @Override
- public void setLabelTextHelper(IFigure figure, String text) {
- if (figure instanceof CustomWrappingLabel) {
- ((CustomWrappingLabel) figure).setText(text);
- // added to precise the position of the text relative to
- // the icon
- ((CustomWrappingLabel) figure).setTextPlacement(PositionConstants.NORTH);
- } else if (figure instanceof ILabelFigure) {
- ((ILabelFigure) figure).setText(text);
- }
-
- else {
- ((Label) figure).setText(text);
- }
- }
-
-
-
-
-
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts;
+
+import java.awt.Label;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.papyrus.uml.diagram.communication.custom.figures.CustomWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorPlugin;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ *
+ * CustomMessageNameEditPart: a custom wrapping label of the MssageEditPart
+ *
+ */
+public class CustomMessageNameEditPart extends MessageNameEditPart {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param view
+ */
+ public CustomMessageNameEditPart(View view) {
+ super(view);
+ }
+
+ static final String PATH = "/icons/arrow.gif"; //$NON-NLS-1$
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart#getLabelIcon()
+ *
+ * @return the specific icon of the label (an arrow)
+ */
+ @Override
+ public Image getLabelIcon() {
+ return org.eclipse.papyrus.uml.diagram.common.Activator.getPluginIconImage(UMLDiagramEditorPlugin.ID, PATH);
+
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart#setLabelTextHelper(org.eclipse.draw2d.IFigure, java.lang.String)
+ *
+ * @param figure
+ * @param text
+ */
+ @Override
+ public void setLabelTextHelper(IFigure figure, String text) {
+ if (figure instanceof CustomWrappingLabel) {
+ ((CustomWrappingLabel) figure).setText(text);
+ // added to precise the position of the text relative to
+ // the icon
+ ((CustomWrappingLabel) figure).setTextPlacement(PositionConstants.NORTH);
+ } else if (figure instanceof ILabelFigure) {
+ ((ILabelFigure) figure).setText(text);
+ }
+
+ else {
+ ((Label) figure).setText(text);
+ }
+ }
+
+
+
+
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomTimeObservationStereotypeLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomTimeObservationStereotypeLabelEditPartCN.java
index cd234615048..f2bcfa5550a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomTimeObservationStereotypeLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomTimeObservationStereotypeLabelEditPartCN.java
@@ -1,71 +1,71 @@
-/**
- * Copyright (c) 2015 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 472932
- */
-package org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts;
-
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.TimeObservationStereotypeLabelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.communication.edit.policies.UMLTextSelectionEditPolicy;
-
-/**
- * The custom edit policy for the time observation stereotype label.
- */
-public class CustomTimeObservationStereotypeLabelEditPartCN extends TimeObservationStereotypeLabelEditPartCN {
-
- /**
- * Constructor.
- *
- * @param view
- * The view
- */
- public CustomTimeObservationStereotypeLabelEditPartCN(final View view) {
- super(view);
- }
-
- /**
- * Redefine the refresh label to get the STEREOTYPE_LABEL_POLICY if exist and don't recalculate the text.
- *
- * @see org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortAppliedStereotypeEditPart#refreshLabel()
- */
- @Override
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if (maskLabelPolicy == null) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- // Bug 472932 : Stereotype is always displayed
- if (maskLabelPolicy == null) {
- maskLabelPolicy = getEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- } else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-}
+/**
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 472932
+ */
+package org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts;
+
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.TimeObservationStereotypeLabelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.communication.edit.policies.UMLTextSelectionEditPolicy;
+
+/**
+ * The custom edit policy for the time observation stereotype label.
+ */
+public class CustomTimeObservationStereotypeLabelEditPartCN extends TimeObservationStereotypeLabelEditPartCN {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * The view
+ */
+ public CustomTimeObservationStereotypeLabelEditPartCN(final View view) {
+ super(view);
+ }
+
+ /**
+ * Redefine the refresh label to get the STEREOTYPE_LABEL_POLICY if exist and don't recalculate the text.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortAppliedStereotypeEditPart#refreshLabel()
+ */
+ @Override
+ protected void refreshLabel() {
+ EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
+ if (maskLabelPolicy == null) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ // Bug 472932 : Stereotype is always displayed
+ if (maskLabelPolicy == null) {
+ maskLabelPolicy = getEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/ObservationLayoutEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/ObservationLayoutEditPolicy.java
index 1066e31f294..cbd1f5efc0c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/ObservationLayoutEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/policies/ObservationLayoutEditPolicy.java
@@ -1,63 +1,63 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - adapted from class diagram
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationLabelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationStereotypeLabelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.TimeObservationNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.TimeObservationStereotypeLabelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
-
-/**
- * This edit policy replaces the GMF generated edit policy for Observations. In
- * particular it installs {@link ExternalLabelPrimaryDragRoleEditPolicy} on
- * children that are external label. The code generated by GMF can be found in {@link TimeObservationEditPart#createLayoutEditPolicy()}.
- */
-public class ObservationLayoutEditPolicy extends LayoutEditPolicy {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case DurationObservationLabelEditPartCN.VISUAL_ID:
- case DurationObservationStereotypeLabelEditPartCN.VISUAL_ID:
- case TimeObservationNameEditPartCN.VISUAL_ID:
- case TimeObservationStereotypeLabelEditPartCN.VISUAL_ID:
- return new ExternalLabelPrimaryDragRoleEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - adapted from class diagram
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationLabelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationStereotypeLabelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.TimeObservationNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.TimeObservationStereotypeLabelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
+
+/**
+ * This edit policy replaces the GMF generated edit policy for Observations. In
+ * particular it installs {@link ExternalLabelPrimaryDragRoleEditPolicy} on
+ * children that are external label. The code generated by GMF can be found in {@link TimeObservationEditPart#createLayoutEditPolicy()}.
+ */
+public class ObservationLayoutEditPolicy extends LayoutEditPolicy {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case DurationObservationLabelEditPartCN.VISUAL_ID:
+ case DurationObservationStereotypeLabelEditPartCN.VISUAL_ID:
+ case TimeObservationNameEditPartCN.VISUAL_ID:
+ case TimeObservationStereotypeLabelEditPartCN.VISUAL_ID:
+ return new ExternalLabelPrimaryDragRoleEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/CustomWrappingLabel.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/CustomWrappingLabel.java
index 9808e884401..804cb9dfa2f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/CustomWrappingLabel.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/CustomWrappingLabel.java
@@ -1,160 +1,160 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication.custom.figures;
-
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
-import org.eclipse.papyrus.uml.diagram.communication.custom.helper.RotationHelper;
-import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorPlugin;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * This class extends the WrappingLabel class to permit the rotation of the
- * WrappingLabel icon
- *
- *
- *
- */
-public class CustomWrappingLabel extends PapyrusWrappingLabel
-
-{
-
- /**
- *
- * Constructor.
- *
- */
- public CustomWrappingLabel() {
- super();
-
- }
-
-
-
- /**
- *
- * Constructor.
- *
- * @param text
- */
- public CustomWrappingLabel(String text) {
- super(text);
- }
-
- /**
- *
- * Constructor.
- *
- * @param image
- */
- public CustomWrappingLabel(Image image) {
- super(image);
- }
-
- /**
- *
- * Constructor.
- *
- * @param text
- * @param image
- */
- public CustomWrappingLabel(String text, Image image) {
- super(text, image);
- }
-
- /** rotation angle in degrees */
- private double rotation = 0;
-
- /**
- * This method Sets the angle of the rotation.<BR>
- *
- *
- * @param angle
- * angle of the rotation in radians
- *
- */
- public void setRotation(double angle) {
-
- this.rotation = Math.toDegrees(angle);
-
- }
-
- static final String PATH = "/icons/arrow1.gif"; //$NON-NLS-1$
-
- /**
- * Paints the custom icon that has been rotated
- *
- * @param graphics
- * The graphics context
- */
- private void CustomPaintIcons(Graphics graphics) {
- Point p = Point.SINGLETON;
- graphics.pushState();
-
- if (getIconLocation() != null) {
- p.setLocation(getIconLocation());
-
- Rectangle figBounds = getBounds();
- graphics.translate(figBounds.x, figBounds.y);
-
- int num = getNumberofIcons();
- for (int i = 0; i < num; i++) {
- // Image icon = getIcon(i);
- Image icon = org.eclipse.papyrus.uml.diagram.common.Activator.getPluginIconImage(UMLDiagramEditorPlugin.ID, PATH);
- if (icon != null) {
- icon.setBackground(getBackgroundColor());
- // Image image1 = new Image(PlatformUI.getWorkbench().getDisplay(), RotationHelper.rotateImage(icon, getRotation()));
- Image image1 = RotationHelper.rotateImage(icon, getRotation());
-
- graphics.setClip(graphics.getClip(new Rectangle()).expand(100, 100));
- graphics.drawImage(image1, p);
- // System.out.format("\n***The icon is rotated by %f \n****",
- // getRotation());
- image1.dispose();
-
- p.x += getIconSize(i).width;
- }
- }
- graphics.translate(-figBounds.x, -figBounds.y);
- }
- graphics.popState();
-
-
- }
-
-
-
- @Override
- public void paintFigure(Graphics graphics) {
- // super.paintFigure(graphics);
-
- if (hasIcons()) {
- CustomPaintIcons(graphics);
- // call repaint to refresh (This repaint is no more needed, it consumes a lot of CPU resource)
- // repaint();
- }
- }
-
- /**
- * gets the class member rotation
- *
- * @return the angle of rotation in degrees
- */
- public double getRotation() {
- return rotation;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.figures;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.communication.custom.helper.RotationHelper;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorPlugin;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * This class extends the WrappingLabel class to permit the rotation of the
+ * WrappingLabel icon
+ *
+ *
+ *
+ */
+public class CustomWrappingLabel extends PapyrusWrappingLabel
+
+{
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public CustomWrappingLabel() {
+ super();
+
+ }
+
+
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param text
+ */
+ public CustomWrappingLabel(String text) {
+ super(text);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param image
+ */
+ public CustomWrappingLabel(Image image) {
+ super(image);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param text
+ * @param image
+ */
+ public CustomWrappingLabel(String text, Image image) {
+ super(text, image);
+ }
+
+ /** rotation angle in degrees */
+ private double rotation = 0;
+
+ /**
+ * This method Sets the angle of the rotation.<BR>
+ *
+ *
+ * @param angle
+ * angle of the rotation in radians
+ *
+ */
+ public void setRotation(double angle) {
+
+ this.rotation = Math.toDegrees(angle);
+
+ }
+
+ static final String PATH = "/icons/arrow1.gif"; //$NON-NLS-1$
+
+ /**
+ * Paints the custom icon that has been rotated
+ *
+ * @param graphics
+ * The graphics context
+ */
+ private void CustomPaintIcons(Graphics graphics) {
+ Point p = Point.SINGLETON;
+ graphics.pushState();
+
+ if (getIconLocation() != null) {
+ p.setLocation(getIconLocation());
+
+ Rectangle figBounds = getBounds();
+ graphics.translate(figBounds.x, figBounds.y);
+
+ int num = getNumberofIcons();
+ for (int i = 0; i < num; i++) {
+ // Image icon = getIcon(i);
+ Image icon = org.eclipse.papyrus.uml.diagram.common.Activator.getPluginIconImage(UMLDiagramEditorPlugin.ID, PATH);
+ if (icon != null) {
+ icon.setBackground(getBackgroundColor());
+ // Image image1 = new Image(PlatformUI.getWorkbench().getDisplay(), RotationHelper.rotateImage(icon, getRotation()));
+ Image image1 = RotationHelper.rotateImage(icon, getRotation());
+
+ graphics.setClip(graphics.getClip(new Rectangle()).expand(100, 100));
+ graphics.drawImage(image1, p);
+ // System.out.format("\n***The icon is rotated by %f \n****",
+ // getRotation());
+ image1.dispose();
+
+ p.x += getIconSize(i).width;
+ }
+ }
+ graphics.translate(-figBounds.x, -figBounds.y);
+ }
+ graphics.popState();
+
+
+ }
+
+
+
+ @Override
+ public void paintFigure(Graphics graphics) {
+ // super.paintFigure(graphics);
+
+ if (hasIcons()) {
+ CustomPaintIcons(graphics);
+ // call repaint to refresh (This repaint is no more needed, it consumes a lot of CPU resource)
+ // repaint();
+ }
+ }
+
+ /**
+ * gets the class member rotation
+ *
+ * @return the angle of rotation in degrees
+ */
+ public double getRotation() {
+ return rotation;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/DurationObservationNodeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/DurationObservationNodeFigure.java
index 6c585909843..be6d0dd4045 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/DurationObservationNodeFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/DurationObservationNodeFigure.java
@@ -1,39 +1,39 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - adapted from class diagram
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.communication.custom.figures;
-
-import org.eclipse.papyrus.uml.diagram.common.Activator;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Figure for DurationObservation
- */
-public class DurationObservationNodeFigure extends AbstractObservationNodeFigure {
-
- /**
- * the name of the icon
- */
- public static final String IMAGE_DURATION = "DurationObservation.gif"; //$NON-NLS-1$
-
- @Override
- public void setAppliedStereotypeIcon(Image image) {
- if (image == null) {
- setIcon(Activator.getPluginIconImage(ID, PATH + IMAGE_DURATION));
- } else {
- setIcon(image);
- }
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - adapted from class diagram
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.communication.custom.figures;
+
+import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * Figure for DurationObservation
+ */
+public class DurationObservationNodeFigure extends AbstractObservationNodeFigure {
+
+ /**
+ * the name of the icon
+ */
+ public static final String IMAGE_DURATION = "DurationObservation.gif"; //$NON-NLS-1$
+
+ @Override
+ public void setAppliedStereotypeIcon(Image image) {
+ if (image == null) {
+ setIcon(Activator.getPluginIconImage(ID, PATH + IMAGE_DURATION));
+ } else {
+ setIcon(image);
+ }
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/TimeObservationNodeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/TimeObservationNodeFigure.java
index 36191a157f3..149e6c4d6b2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/TimeObservationNodeFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/TimeObservationNodeFigure.java
@@ -1,37 +1,37 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - Adapted from class diagram
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.communication.custom.figures;
-
-import org.eclipse.papyrus.uml.diagram.common.Activator;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Figure for TimeObservation
- */
-public class TimeObservationNodeFigure extends AbstractObservationNodeFigure {
-
- private static final String IMAGE_OBSERVATION = "TimeObservation.gif"; //$NON-NLS-1$
-
- @Override
- public void setAppliedStereotypeIcon(Image image) {
- if (image == null) {
- setIcon(Activator.getPluginIconImage(ID, PATH + IMAGE_OBSERVATION));
- } else {
- setIcon(image);
- }
-
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - Adapted from class diagram
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.communication.custom.figures;
+
+import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * Figure for TimeObservation
+ */
+public class TimeObservationNodeFigure extends AbstractObservationNodeFigure {
+
+ private static final String IMAGE_OBSERVATION = "TimeObservation.gif"; //$NON-NLS-1$
+
+ @Override
+ public void setAppliedStereotypeIcon(Image image) {
+ if (image == null) {
+ setIcon(Activator.getPluginIconImage(ID, PATH + IMAGE_OBSERVATION));
+ } else {
+ setIcon(image);
+ }
+
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/CommunicationLinkMappingHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/CommunicationLinkMappingHelper.java
index c1e93ae305b..e49bd5876e2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/CommunicationLinkMappingHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/CommunicationLinkMappingHelper.java
@@ -1,96 +1,96 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * 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
- * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - adapted from sequence diagram
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.ILinkMappingHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.LinkMappingHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.LinkMappingHelper.CommonSourceUMLSwitch;
-import org.eclipse.papyrus.uml.diagram.common.helper.LinkMappingHelper.CommonTargetUMLSwitch;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-
-/**
- *
- * The Communication LinkMappingHelper is specialization of the link mapping helper for the Communication diagram
- *
- */
-public class CommunicationLinkMappingHelper implements ILinkMappingHelper {
-
- /**
- * SingletonHolder is loaded at the first execution of getInstance() method
- */
- private static class SingletonHolder {
-
- private final static CommunicationLinkMappingHelper instance = new CommunicationLinkMappingHelper();
- }
-
- /**
- * Gets the single instance of ClassLinkMappingHelper.
- *
- * @return single instance of ClassLinkMappingHelper
- */
- public static CommunicationLinkMappingHelper getInstance() {
- return SingletonHolder.instance;
- }
-
- /**
- * private constructor
- */
- private CommunicationLinkMappingHelper() {
- // do nothing
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<?> getSource(Element link) {
- return LinkMappingHelper.getSource(link, new CommonSourceUMLSwitch() {
-
- @Override
- public java.util.Collection<?> caseMessage(org.eclipse.uml2.uml.Message object) {
- if (object.getSendEvent() != null) {
- MessageEnd messageEnd = object.getSendEvent();
- if (messageEnd instanceof MessageOccurrenceSpecification) {
- return ((MessageOccurrenceSpecification) messageEnd).getCovereds();
- }
- }
- return Collections.EMPTY_LIST;
- };
- });
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<?> getTarget(Element link) {
- return LinkMappingHelper.getTarget(link, new CommonTargetUMLSwitch() {
-
- @Override
- public java.util.Collection<?> caseMessage(org.eclipse.uml2.uml.Message object) {
- if (object.getReceiveEvent() != null) {
- MessageEnd messageEnd = object.getReceiveEvent();
- if (messageEnd instanceof MessageOccurrenceSpecification) {
- return ((MessageOccurrenceSpecification) messageEnd).getCovereds();
- }
- }
- return Collections.EMPTY_LIST;
- };
-
- });
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA
+ *
+ *
+ * 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
+ * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - adapted from sequence diagram
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.papyrus.uml.diagram.common.helper.ILinkMappingHelper;
+import org.eclipse.papyrus.uml.diagram.common.helper.LinkMappingHelper;
+import org.eclipse.papyrus.uml.diagram.common.helper.LinkMappingHelper.CommonSourceUMLSwitch;
+import org.eclipse.papyrus.uml.diagram.common.helper.LinkMappingHelper.CommonTargetUMLSwitch;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.MessageEnd;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+
+/**
+ *
+ * The Communication LinkMappingHelper is specialization of the link mapping helper for the Communication diagram
+ *
+ */
+public class CommunicationLinkMappingHelper implements ILinkMappingHelper {
+
+ /**
+ * SingletonHolder is loaded at the first execution of getInstance() method
+ */
+ private static class SingletonHolder {
+
+ private final static CommunicationLinkMappingHelper instance = new CommunicationLinkMappingHelper();
+ }
+
+ /**
+ * Gets the single instance of ClassLinkMappingHelper.
+ *
+ * @return single instance of ClassLinkMappingHelper
+ */
+ public static CommunicationLinkMappingHelper getInstance() {
+ return SingletonHolder.instance;
+ }
+
+ /**
+ * private constructor
+ */
+ private CommunicationLinkMappingHelper() {
+ // do nothing
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<?> getSource(Element link) {
+ return LinkMappingHelper.getSource(link, new CommonSourceUMLSwitch() {
+
+ @Override
+ public java.util.Collection<?> caseMessage(org.eclipse.uml2.uml.Message object) {
+ if (object.getSendEvent() != null) {
+ MessageEnd messageEnd = object.getSendEvent();
+ if (messageEnd instanceof MessageOccurrenceSpecification) {
+ return ((MessageOccurrenceSpecification) messageEnd).getCovereds();
+ }
+ }
+ return Collections.EMPTY_LIST;
+ };
+ });
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<?> getTarget(Element link) {
+ return LinkMappingHelper.getTarget(link, new CommonTargetUMLSwitch() {
+
+ @Override
+ public java.util.Collection<?> caseMessage(org.eclipse.uml2.uml.Message object) {
+ if (object.getReceiveEvent() != null) {
+ MessageEnd messageEnd = object.getReceiveEvent();
+ if (messageEnd instanceof MessageOccurrenceSpecification) {
+ return ((MessageOccurrenceSpecification) messageEnd).getCovereds();
+ }
+ }
+ return Collections.EMPTY_LIST;
+ };
+
+ });
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/CommunicationRequestConstant.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/CommunicationRequestConstant.java
index a9a16f55c03..38959677194 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/CommunicationRequestConstant.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/CommunicationRequestConstant.java
@@ -1,40 +1,40 @@
-/*****************************************************************************
- * Copyright (c) 2010, 2015 CEA, 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
- * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - adapted from sequence diagram
- * Christian W. Damus - bug 468175
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
-
-/**
- * Constants used in the communication diagram
- */
-public interface CommunicationRequestConstant {
-
- /**
- * A constant representing the container of an interactionFragment. It can
- * be an Interaction or an InteractionOperand
- */
- public static final String INTERACTIONFRAGMENT_CONTAINER = "InteractionFragment Container"; //$NON-NLS-1$
-
- /**
- *
- */
- public static final String SOURCE_MODEL_CONTAINER = "Source model container"; //$NON-NLS-1$
-
- /**
- *
- */
- public static final String TARGET_MODEL_CONTAINER = "Target model container"; //$NON-NLS-1$
-
- /** A request parameter indicating the connectable element that a lifeline represents. */
- public static final String REPRESENTS = "Lifeline::represents"; //$NON-NLS-1$
-}
+/*****************************************************************************
+ * Copyright (c) 2010, 2015 CEA, 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
+ * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - adapted from sequence diagram
+ * Christian W. Damus - bug 468175
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
+
+/**
+ * Constants used in the communication diagram
+ */
+public interface CommunicationRequestConstant {
+
+ /**
+ * A constant representing the container of an interactionFragment. It can
+ * be an Interaction or an InteractionOperand
+ */
+ public static final String INTERACTIONFRAGMENT_CONTAINER = "InteractionFragment Container"; //$NON-NLS-1$
+
+ /**
+ *
+ */
+ public static final String SOURCE_MODEL_CONTAINER = "Source model container"; //$NON-NLS-1$
+
+ /**
+ *
+ */
+ public static final String TARGET_MODEL_CONTAINER = "Target model container"; //$NON-NLS-1$
+
+ /** A request parameter indicating the connectable element that a lifeline represents. */
+ public static final String REPRESENTS = "Lifeline::represents"; //$NON-NLS-1$
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/CommunicationUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/CommunicationUtil.java
index 97ff70ba11d..b810613ed1d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/CommunicationUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/CommunicationUtil.java
@@ -1,331 +1,331 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * 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
- * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - adapted from sequence diagram
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature.Setting;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN;
-import org.eclipse.uml2.common.util.CacheAdapter;
-import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
-import org.eclipse.uml2.uml.DurationConstraint;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.IntervalConstraint;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.TimeConstraint;
-import org.eclipse.uml2.uml.TimeObservation;
-
-/**
- *
- * @author This is for special commands for communication diagram
- *
- */
-public class CommunicationUtil {
-
- /**
- * Find the container interaction fragment at the given location. The
- * elements are drawn under the lifeline, but their model container is an
- * interaction fragment. It can be of type Interaction or InteractionOperand
- *
- * @param location
- * the location
- * @param host
- * the host edit part
- * @return the interaction fragment or null
- */
- public static InteractionFragment findInteractionFragmentAt(Point location, EditPart host) {
-
- if (host == null) {
- return null;
- }
-
- List<IFigure> exclusionSet = new ArrayList<IFigure>();
-
- InteractionFragment interactionFragment = null;
- EditPart ep = host.getRoot().getViewer().findObjectAtExcluding(location, exclusionSet);
- while (ep instanceof LifelineEditPartCN) {
- exclusionSet.add(((GraphicalEditPart) ep).getFigure());
- ep = host.getRoot().getViewer().findObjectAtExcluding(location, exclusionSet);
- }
- // Get the rootEditpart Content
- if (ep != null && ep.getModel() instanceof View) {
- EObject eObject = ViewUtil.resolveSemanticElement((View) ep.getModel());
- if (eObject instanceof InteractionOperand || eObject instanceof Interaction) {
- interactionFragment = (InteractionFragment) eObject;
- }
- }
-
- return interactionFragment;
- }
-
-
-
- /**
- * Complete an ICommand which destroys an DestructionEvent element to also destroy dependent time/duration constraint/observation linked with
- * these ends
- *
- * @param deleteViewsCmd
- * the command to complete
- * @param editingDomain
- * the editing domain
- * @param destructionEventPart
- * the execution specification edit part on which the request is called
- * @return the deletion command deleteViewsCmd for convenience
- */
- public static CompoundCommand completeDeleteDestructionEventViewCommand(CompoundCommand deleteViewsCmd, TransactionalEditingDomain editingDomain, EditPart destructionEventPart) {
- Object model = destructionEventPart.getModel();
- if (model instanceof Node) {
- EObject obj = ((Node) model).getElement();
-
- if (obj instanceof DestructionOccurrenceSpecification) {
- LifelineEditPartCN lifelinePart = getParentLifelinePart(destructionEventPart);
- if (lifelinePart != null) {
- for (Object lifelineChild : lifelinePart.getChildren()) {
- if (lifelineChild instanceof IBorderItemEditPart) {
- final IBorderItemEditPart timePart = (IBorderItemEditPart) lifelineChild;
- // At most one destruction event. Only parts linked to it can not move for now.
- boolean isNotLinked = CommunicationUtil.canTimeElementPartBeYMoved(timePart);
- if (!isNotLinked) {
- // time part is linked, delete the view
- Command deleteTimeViewCommand = new ICommandProxy(new DeleteCommand(editingDomain, (View) timePart.getModel()));
- deleteViewsCmd.add(deleteTimeViewCommand);
- }
- }
- }
- }
- }
- }
- return deleteViewsCmd;
- }
-
- /**
- * Know whether this time element part can be moved within the lifeline or not.
- * Parts linked with a destruction event can not be moved since the destruction event is always at the end.
- *
- * @param timeElementPart
- * the part representing a time/duration constraint/observation
- * @return true if the part can be moved
- */
- public static boolean canTimeElementPartBeYMoved(IBorderItemEditPart timeElementPart) {
- EObject timeElement = timeElementPart.resolveSemanticElement();
- List<? extends Element> occurrences = Collections.emptyList();
- if (timeElement instanceof TimeObservation) {
- NamedElement occurence = ((TimeObservation) timeElement).getEvent();
- occurrences = Collections.singletonList(occurence);
- } else if (timeElement instanceof TimeConstraint || timeElement instanceof DurationConstraint) {
- occurrences = ((IntervalConstraint) timeElement).getConstrainedElements();
- }
- // check whether one of the time occurrences correspond to a DestructionEvent
- for (Element occurrence : occurrences) {
- if (occurrence instanceof DestructionOccurrenceSpecification) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Return the lifeline edit part containing this part (directly or indirectly)
- *
- * @param nodeEditPart
- * the contained edit part or itself
- * @return lifeline edit part or null
- */
- public static LifelineEditPartCN getParentLifelinePart(EditPart nodeEditPart) {
- EditPart parent = nodeEditPart;
- while (parent != null) {
- if (parent instanceof LifelineEditPartCN) {
- return (LifelineEditPartCN) parent;
- } else {
- parent = parent.getParent();
- }
- }
- return null;
- }
-
- /**
- * Get the edit part which starts or finishes with the event on the given lifeline part
- *
- * @param lifelinePart
- * the lifeline edit part on which the event is located
- * @param event
- * the event
- * @return the edit part of which an end is defined by event on the lifelinePart edit part
- */
- public static EditPart getLinkedEditPart(EditPart lifelinePart, OccurrenceSpecification event) {
- if (event instanceof MessageOccurrenceSpecification) {
- // get parts representing the message linked with the event
- Message message = ((MessageOccurrenceSpecification) event).getMessage();
- if (message == null) {
- return null;
- }
- Collection<Setting> settings = CacheAdapter.getInstance().getNonNavigableInverseReferences(message);
- for (Setting ref : settings) {
- if (NotationPackage.eINSTANCE.getView_Element().equals(ref.getEStructuralFeature())) {
- View view = (View) ref.getEObject();
- EditPart part = DiagramEditPartsUtil.getEditPartFromView(view, lifelinePart);
- // the message part must start or finish on the lifeline (with the event)
- if (part instanceof ConnectionEditPart) {
- EditPart lifelineChild = null;
- if (event.equals(message.getSendEvent())) {
- lifelineChild = ((ConnectionEditPart) part).getSource();
- } else if (event.equals(message.getReceiveEvent())) {
- lifelineChild = ((ConnectionEditPart) part).getTarget();
- }
- LifelineEditPartCN parentLifeline = CommunicationUtil.getParentLifelinePart(lifelineChild);
- if (lifelinePart.equals(parentLifeline)) {
- return part;
- }
- }
- }
- }
- } else if (event instanceof ExecutionOccurrenceSpecification) {
- // get parts representing the execution linked with the event
- ExecutionSpecification execution = ((ExecutionOccurrenceSpecification) event).getExecution();
- if (execution == null) {
- return null;
- }
- Collection<Setting> settings = CacheAdapter.getInstance().getNonNavigableInverseReferences(execution);
- for (Setting ref : settings) {
- if (NotationPackage.eINSTANCE.getView_Element().equals(ref.getEStructuralFeature())) {
- View view = (View) ref.getEObject();
- EditPart part = DiagramEditPartsUtil.getEditPartFromView(view, lifelinePart);
- // the execution part must be on the lifeline
- EditPart lifelineChild = part;
- LifelineEditPartCN parentLifeline = CommunicationUtil.getParentLifelinePart(lifelineChild);
- if (lifelinePart.equals(parentLifeline)) {
- return part;
- }
- }
- }
- }
- return null;
- }
-
- /**
- * This methods verifies if two UML Lifelines are already connected
- *
- * @return
- * the list of messages between the two lifelines if Lifelines are connected
- * else it returns null
- */
-
- public static Set<Message> verifyUMLLifelinesConnected(Lifeline lifeline1, Lifeline lifeline2) {
- EList<InteractionFragment> lifeline1Events = lifeline1.getCoveredBys();
- EList<InteractionFragment> lifeline2Events = lifeline2.getCoveredBys();
- Set<Message> messages = null;
- for (InteractionFragment current1 : lifeline1Events) {
- MessageEnd me1 = (MessageEnd) current1;
- if (!(me1.getMessage() == null)) {
- for (InteractionFragment current2 : lifeline2Events) {
- MessageEnd me2 = (MessageEnd) current2;
- if (!(me2.getMessage() == null)) {
- if (me1.getMessage().equals(me2.getMessage())) {
- if (messages == null) {
- messages = new HashSet<Message>();
- messages.add(me1.getMessage());
- } else {
- messages.add(me1.getMessage());
- }
-
- }
- }
- }
- }
- }
- return messages;
- }
-
- /**
- * Verify if lifelines Ediparts are connected.
- *
- * @param lifeline1EditPart
- * the first lifeline edit part
- * @param lifeline2EditPart
- * the second lifeline edit part
- * @return the connection edit part if lifelines are connected, else it returns null
- */
- @SuppressWarnings({ "rawtypes" })
- public static ConnectionEditPart verifyIfLifelinesEPConnected(EditPart lifeline1EditPart, EditPart lifeline2EditPart) {
- List sourceConnectionslifeline1 = ((GraphicalEditPart) lifeline1EditPart).getSourceConnections();
- List targetConnectionslifeline2 = ((GraphicalEditPart) lifeline2EditPart).getTargetConnections();
- List sourceConnectionslifeline2 = ((GraphicalEditPart) lifeline2EditPart).getSourceConnections();
- List targetConnectionslifeline1 = ((GraphicalEditPart) lifeline1EditPart).getTargetConnections();
- if ((!sourceConnectionslifeline1.isEmpty()) && (!targetConnectionslifeline2.isEmpty())) {
-
- for (int i = 0; i < sourceConnectionslifeline1.size(); i++) {
- for (int j = 0; j < targetConnectionslifeline2.size(); j++) {
- ConnectionEditPart link1 = (ConnectionEditPart) sourceConnectionslifeline1.get(i);
- ConnectionEditPart link2 = (ConnectionEditPart) targetConnectionslifeline2.get(j);
- // System.err.println("+-> ConnectionEditPart link1:" + link1);
- if (link1.equals(link2)) {
- // System.out.println("Source and target have existent same connection");
- return link1;
- }
-
- }
- }
-
- } else if ((!sourceConnectionslifeline2.isEmpty()) && (!targetConnectionslifeline1.isEmpty())) {
-
- for (int i = 0; i < sourceConnectionslifeline2.size(); i++) {
- for (int j = 0; j < targetConnectionslifeline1.size(); j++) {
- ConnectionEditPart link1 = (ConnectionEditPart) sourceConnectionslifeline2.get(i);
- ConnectionEditPart link2 = (ConnectionEditPart) targetConnectionslifeline1.get(j);
- // System.err.println("+-> ConnectionEditPart link1:" + link1);
- if (link1.equals(link2)) {
- // System.out.println("Source and target have existent same connection");
- return link1;
- }
-
- }
- }
-
- }
- return null;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA
+ *
+ *
+ * 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
+ * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - adapted from sequence diagram
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN;
+import org.eclipse.uml2.common.util.CacheAdapter;
+import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
+import org.eclipse.uml2.uml.DurationConstraint;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
+import org.eclipse.uml2.uml.ExecutionSpecification;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.InteractionOperand;
+import org.eclipse.uml2.uml.IntervalConstraint;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageEnd;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.OccurrenceSpecification;
+import org.eclipse.uml2.uml.TimeConstraint;
+import org.eclipse.uml2.uml.TimeObservation;
+
+/**
+ *
+ * @author This is for special commands for communication diagram
+ *
+ */
+public class CommunicationUtil {
+
+ /**
+ * Find the container interaction fragment at the given location. The
+ * elements are drawn under the lifeline, but their model container is an
+ * interaction fragment. It can be of type Interaction or InteractionOperand
+ *
+ * @param location
+ * the location
+ * @param host
+ * the host edit part
+ * @return the interaction fragment or null
+ */
+ public static InteractionFragment findInteractionFragmentAt(Point location, EditPart host) {
+
+ if (host == null) {
+ return null;
+ }
+
+ List<IFigure> exclusionSet = new ArrayList<IFigure>();
+
+ InteractionFragment interactionFragment = null;
+ EditPart ep = host.getRoot().getViewer().findObjectAtExcluding(location, exclusionSet);
+ while (ep instanceof LifelineEditPartCN) {
+ exclusionSet.add(((GraphicalEditPart) ep).getFigure());
+ ep = host.getRoot().getViewer().findObjectAtExcluding(location, exclusionSet);
+ }
+ // Get the rootEditpart Content
+ if (ep != null && ep.getModel() instanceof View) {
+ EObject eObject = ViewUtil.resolveSemanticElement((View) ep.getModel());
+ if (eObject instanceof InteractionOperand || eObject instanceof Interaction) {
+ interactionFragment = (InteractionFragment) eObject;
+ }
+ }
+
+ return interactionFragment;
+ }
+
+
+
+ /**
+ * Complete an ICommand which destroys an DestructionEvent element to also destroy dependent time/duration constraint/observation linked with
+ * these ends
+ *
+ * @param deleteViewsCmd
+ * the command to complete
+ * @param editingDomain
+ * the editing domain
+ * @param destructionEventPart
+ * the execution specification edit part on which the request is called
+ * @return the deletion command deleteViewsCmd for convenience
+ */
+ public static CompoundCommand completeDeleteDestructionEventViewCommand(CompoundCommand deleteViewsCmd, TransactionalEditingDomain editingDomain, EditPart destructionEventPart) {
+ Object model = destructionEventPart.getModel();
+ if (model instanceof Node) {
+ EObject obj = ((Node) model).getElement();
+
+ if (obj instanceof DestructionOccurrenceSpecification) {
+ LifelineEditPartCN lifelinePart = getParentLifelinePart(destructionEventPart);
+ if (lifelinePart != null) {
+ for (Object lifelineChild : lifelinePart.getChildren()) {
+ if (lifelineChild instanceof IBorderItemEditPart) {
+ final IBorderItemEditPart timePart = (IBorderItemEditPart) lifelineChild;
+ // At most one destruction event. Only parts linked to it can not move for now.
+ boolean isNotLinked = CommunicationUtil.canTimeElementPartBeYMoved(timePart);
+ if (!isNotLinked) {
+ // time part is linked, delete the view
+ Command deleteTimeViewCommand = new ICommandProxy(new DeleteCommand(editingDomain, (View) timePart.getModel()));
+ deleteViewsCmd.add(deleteTimeViewCommand);
+ }
+ }
+ }
+ }
+ }
+ }
+ return deleteViewsCmd;
+ }
+
+ /**
+ * Know whether this time element part can be moved within the lifeline or not.
+ * Parts linked with a destruction event can not be moved since the destruction event is always at the end.
+ *
+ * @param timeElementPart
+ * the part representing a time/duration constraint/observation
+ * @return true if the part can be moved
+ */
+ public static boolean canTimeElementPartBeYMoved(IBorderItemEditPart timeElementPart) {
+ EObject timeElement = timeElementPart.resolveSemanticElement();
+ List<? extends Element> occurrences = Collections.emptyList();
+ if (timeElement instanceof TimeObservation) {
+ NamedElement occurence = ((TimeObservation) timeElement).getEvent();
+ occurrences = Collections.singletonList(occurence);
+ } else if (timeElement instanceof TimeConstraint || timeElement instanceof DurationConstraint) {
+ occurrences = ((IntervalConstraint) timeElement).getConstrainedElements();
+ }
+ // check whether one of the time occurrences correspond to a DestructionEvent
+ for (Element occurrence : occurrences) {
+ if (occurrence instanceof DestructionOccurrenceSpecification) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Return the lifeline edit part containing this part (directly or indirectly)
+ *
+ * @param nodeEditPart
+ * the contained edit part or itself
+ * @return lifeline edit part or null
+ */
+ public static LifelineEditPartCN getParentLifelinePart(EditPart nodeEditPart) {
+ EditPart parent = nodeEditPart;
+ while (parent != null) {
+ if (parent instanceof LifelineEditPartCN) {
+ return (LifelineEditPartCN) parent;
+ } else {
+ parent = parent.getParent();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get the edit part which starts or finishes with the event on the given lifeline part
+ *
+ * @param lifelinePart
+ * the lifeline edit part on which the event is located
+ * @param event
+ * the event
+ * @return the edit part of which an end is defined by event on the lifelinePart edit part
+ */
+ public static EditPart getLinkedEditPart(EditPart lifelinePart, OccurrenceSpecification event) {
+ if (event instanceof MessageOccurrenceSpecification) {
+ // get parts representing the message linked with the event
+ Message message = ((MessageOccurrenceSpecification) event).getMessage();
+ if (message == null) {
+ return null;
+ }
+ Collection<Setting> settings = CacheAdapter.getInstance().getNonNavigableInverseReferences(message);
+ for (Setting ref : settings) {
+ if (NotationPackage.eINSTANCE.getView_Element().equals(ref.getEStructuralFeature())) {
+ View view = (View) ref.getEObject();
+ EditPart part = DiagramEditPartsUtil.getEditPartFromView(view, lifelinePart);
+ // the message part must start or finish on the lifeline (with the event)
+ if (part instanceof ConnectionEditPart) {
+ EditPart lifelineChild = null;
+ if (event.equals(message.getSendEvent())) {
+ lifelineChild = ((ConnectionEditPart) part).getSource();
+ } else if (event.equals(message.getReceiveEvent())) {
+ lifelineChild = ((ConnectionEditPart) part).getTarget();
+ }
+ LifelineEditPartCN parentLifeline = CommunicationUtil.getParentLifelinePart(lifelineChild);
+ if (lifelinePart.equals(parentLifeline)) {
+ return part;
+ }
+ }
+ }
+ }
+ } else if (event instanceof ExecutionOccurrenceSpecification) {
+ // get parts representing the execution linked with the event
+ ExecutionSpecification execution = ((ExecutionOccurrenceSpecification) event).getExecution();
+ if (execution == null) {
+ return null;
+ }
+ Collection<Setting> settings = CacheAdapter.getInstance().getNonNavigableInverseReferences(execution);
+ for (Setting ref : settings) {
+ if (NotationPackage.eINSTANCE.getView_Element().equals(ref.getEStructuralFeature())) {
+ View view = (View) ref.getEObject();
+ EditPart part = DiagramEditPartsUtil.getEditPartFromView(view, lifelinePart);
+ // the execution part must be on the lifeline
+ EditPart lifelineChild = part;
+ LifelineEditPartCN parentLifeline = CommunicationUtil.getParentLifelinePart(lifelineChild);
+ if (lifelinePart.equals(parentLifeline)) {
+ return part;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * This methods verifies if two UML Lifelines are already connected
+ *
+ * @return
+ * the list of messages between the two lifelines if Lifelines are connected
+ * else it returns null
+ */
+
+ public static Set<Message> verifyUMLLifelinesConnected(Lifeline lifeline1, Lifeline lifeline2) {
+ EList<InteractionFragment> lifeline1Events = lifeline1.getCoveredBys();
+ EList<InteractionFragment> lifeline2Events = lifeline2.getCoveredBys();
+ Set<Message> messages = null;
+ for (InteractionFragment current1 : lifeline1Events) {
+ MessageEnd me1 = (MessageEnd) current1;
+ if (!(me1.getMessage() == null)) {
+ for (InteractionFragment current2 : lifeline2Events) {
+ MessageEnd me2 = (MessageEnd) current2;
+ if (!(me2.getMessage() == null)) {
+ if (me1.getMessage().equals(me2.getMessage())) {
+ if (messages == null) {
+ messages = new HashSet<Message>();
+ messages.add(me1.getMessage());
+ } else {
+ messages.add(me1.getMessage());
+ }
+
+ }
+ }
+ }
+ }
+ }
+ return messages;
+ }
+
+ /**
+ * Verify if lifelines Ediparts are connected.
+ *
+ * @param lifeline1EditPart
+ * the first lifeline edit part
+ * @param lifeline2EditPart
+ * the second lifeline edit part
+ * @return the connection edit part if lifelines are connected, else it returns null
+ */
+ @SuppressWarnings({ "rawtypes" })
+ public static ConnectionEditPart verifyIfLifelinesEPConnected(EditPart lifeline1EditPart, EditPart lifeline2EditPart) {
+ List sourceConnectionslifeline1 = ((GraphicalEditPart) lifeline1EditPart).getSourceConnections();
+ List targetConnectionslifeline2 = ((GraphicalEditPart) lifeline2EditPart).getTargetConnections();
+ List sourceConnectionslifeline2 = ((GraphicalEditPart) lifeline2EditPart).getSourceConnections();
+ List targetConnectionslifeline1 = ((GraphicalEditPart) lifeline1EditPart).getTargetConnections();
+ if ((!sourceConnectionslifeline1.isEmpty()) && (!targetConnectionslifeline2.isEmpty())) {
+
+ for (int i = 0; i < sourceConnectionslifeline1.size(); i++) {
+ for (int j = 0; j < targetConnectionslifeline2.size(); j++) {
+ ConnectionEditPart link1 = (ConnectionEditPart) sourceConnectionslifeline1.get(i);
+ ConnectionEditPart link2 = (ConnectionEditPart) targetConnectionslifeline2.get(j);
+ // System.err.println("+-> ConnectionEditPart link1:" + link1);
+ if (link1.equals(link2)) {
+ // System.out.println("Source and target have existent same connection");
+ return link1;
+ }
+
+ }
+ }
+
+ } else if ((!sourceConnectionslifeline2.isEmpty()) && (!targetConnectionslifeline1.isEmpty())) {
+
+ for (int i = 0; i < sourceConnectionslifeline2.size(); i++) {
+ for (int j = 0; j < targetConnectionslifeline1.size(); j++) {
+ ConnectionEditPart link1 = (ConnectionEditPart) sourceConnectionslifeline2.get(i);
+ ConnectionEditPart link2 = (ConnectionEditPart) targetConnectionslifeline1.get(j);
+ // System.err.println("+-> ConnectionEditPart link1:" + link1);
+ if (link1.equals(link2)) {
+ // System.out.println("Source and target have existent same connection");
+ return link1;
+ }
+
+ }
+ }
+
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/InconsistentMessageViewsHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/InconsistentMessageViewsHelper.java
index 9d9200553b4..1fdd3aa9bed 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/InconsistentMessageViewsHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/InconsistentMessageViewsHelper.java
@@ -1,253 +1,253 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Saadia Dhouib saadia.dhouib@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature.Setting;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.emf.core.util.CrossReferenceAdapter;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.gmf.runtime.notation.Connector;
-import org.eclipse.gmf.runtime.notation.DecorationNode;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.ModelEditPart;
-import org.eclipse.uml2.uml.Message;
-
-
-
-/**
- * The Class InconsistentMessageViewsHelper is intended to give methods to help searching for inconsistent
- * views of messages when they are deleted or re-oriented.
- *
- */
-public class InconsistentMessageViewsHelper {
-
- /**
- * Tests if the view is owned by the CommunicationDiagram.
- *
- * @param view
- * a view
- * @return true, if is owned by communication diagram <code>true</code> if the view is owned by the CompositeStructureDiagram, <code>false</code> if not
- */
- public static boolean isOwnedByCommunicationDiagram(View view) {
- EObject diagram = view.eContainer();
- while (!(diagram instanceof Diagram)) {
- diagram = diagram.eContainer();
- }
- String type = ((Diagram) diagram).getType();
- return type == ModelEditPart.MODEL_ID;
- }
-
-
- /**
- * Tests if the view is is the last label (ie. message) on the connection
- *
- * @param view
- * a view
- * @return true, if is last message on connection <code>true</code> if the view is is the last label (ie. message) on the connection, <code>false</code> if not
- */
-
- public static boolean isLastMessageOnConnection(View view) {
- // Verify if this view is the last label (ie. message) on the connection
- // if true remove the parent view (ie. the connector view)
- if (view instanceof DecorationNode) {
- View parentView = (View) view.eContainer();
- // ---------------------------------------------------------
- // help to debug
- // System.err.println("+-> parent View :" + parentView);
- // ---------------------------------------------------------
-
- // get children of the parent view
- @SuppressWarnings("unchecked")
- EList<View> children = parentView.getChildren();
-
- for (View child : children) {
- if ((child instanceof DecorationNode) && (child.getElement() instanceof Message)) {
-
- if (!child.getElement().equals(view.getElement())) {// ouups, there is another child which is different from this view!!!
- return false;
- }
- }
- }
- // This is the last message on the connection, return true.
- return true;
- }
-
- return false;
- }
-
- /**
- * Returns the {@link CrossReferenceAdapter} corresponding to the element to destroy.
- *
- * @param request
- * the request
- * @param destructee
- * the destroyed element
- * @return the cross reference adapter
- * the {@link CrossReferenceAdapter} corresponding to this element
- */
- public static CrossReferenceAdapter getCrossReferenceAdapter(IEditCommandRequest request, EObject destructee) {
-
- CrossReferenceAdapter crossReferenceAdapter = null;
- @SuppressWarnings("rawtypes")
- Map cacheMaps = (Map) request.getParameter("Cache_Maps");//$NON-NLS-1$ RequestCacheEntries.Cache_Maps
- if (cacheMaps != null) {
- crossReferenceAdapter = (CrossReferenceAdapter) cacheMaps.get("CrossRefAdapter");//$NON-NLS-1$ RequestCacheEntries.CrossRefAdapter
- }
-
- if (crossReferenceAdapter == null) {
- crossReferenceAdapter = CrossReferenceAdapter.getExistingCrossReferenceAdapter(destructee);
- if (crossReferenceAdapter == null) {
- TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(destructee);
- if (domain != null) {
- crossReferenceAdapter = CrossReferenceAdapter.getCrossReferenceAdapter(domain.getResourceSet());
- }
- }
- }
- return crossReferenceAdapter;
- }
-
- /**
- * This method looks for inconsistent views of connectors to delete in case the connector is
- * re-oriented.
- *
- *
- * @param viewsToDestroy
- * the set of views of messages to destroy
- *
- * @return the list of {@link View} of the connectors to delete
- */
- public static Set<View> addConnectorViewsToDestroy(Set<View> viewsToDestroy) {
- // for all the views to destroy, we have to classify them by their own connector,
- // then we have to verify for each connector that the set of messages (to destroy) on it are the only messages that he contains
- // if yes, we have to add the view of the connector to list of views to destroy
-
- // the set connectors that are concerned by the deleted to the messages views
- Set<View> connectors = null;
- Set<View> newViewsToDestroy = new HashSet<View>(viewsToDestroy);
- // for all the messages to delete, search for their parent connector
- Iterator<?> it = viewsToDestroy.iterator();
- while (it.hasNext()) {
- View msgView = (View) it.next();
- if ((msgView instanceof DecorationNode) && (msgView.getElement() instanceof Message)) {
- if (msgView.eContainer() instanceof Connector) {
- if (connectors == null) {
- connectors = new HashSet<View>();
- }
- connectors.add((View) msgView.eContainer());
- }
- }
- }
- // Now the connectors set contains all the connectors that may have to be deleted
- // we have to check which connector have to be deleted
- if (connectors != null) {
- // for each connector we have to search for the set of its labels views to be destroyed
-
- Iterator<?> it1 = connectors.iterator();
- while (it1.hasNext()) {
- View conView = (View) it1.next();
-
- // Construct the list of viewsOfLabelsToDestroy
- Set<View> viewsOfLabelsToDestroy = null;
- Iterator<?> it2 = viewsToDestroy.iterator();
- while (it2.hasNext()) {
- View msgView = (View) it2.next();
- if ((msgView instanceof DecorationNode) && (msgView.getElement() instanceof Message)) {
- if ((msgView.eContainer() instanceof Connector) && (msgView.eContainer().equals(conView))) {
- if (viewsOfLabelsToDestroy == null) {
- viewsOfLabelsToDestroy = new HashSet<View>();
- }
- viewsOfLabelsToDestroy.add(msgView);
- }
- }
- }
- // if the set of viewsOfLabelsToDestroy contains all the real children of the connector
- // then add the connector to the views to destroy
- @SuppressWarnings("unchecked")
- EList<View> conChildren = conView.getChildren();
- Set<View> comparisonResult = new HashSet<View>(conChildren.size());
- for (Iterator<?> i = conChildren.iterator(); i.hasNext();) {
- View element = (View) i.next();
- if ((element instanceof DecorationNode) && (element.getElement() instanceof Message)) {
- if (!viewsOfLabelsToDestroy.contains(element)) {
- comparisonResult.add(element);
- }
- }
- }
-
- if (comparisonResult.isEmpty()) {// the set of viewsOfLabelsToDestroy contains all the real children of the connector
- newViewsToDestroy.add(conView);
- }
- }
-
- }
- return newViewsToDestroy;
-
- }
-
- /**
- * This method looks for inconsistent views to delete in case the message is deleted or
- * the connector of the message is re-oriented.
- *
- * @param destructee
- * the modified message
- * @param request
- * the request to destroy a message or to re-orient a message
- *
- * @return the list of {@link View} to delete
- */
- public static Set<View> getMemberViewsToDestroy(Message destructee, IEditCommandRequest request) {
- Set<View> viewsToDestroy = new HashSet<View>();
- CrossReferenceAdapter crossReferenceAdapter = InconsistentMessageViewsHelper.getCrossReferenceAdapter(request, destructee);
- if (crossReferenceAdapter != null) {
-
- Collection<Setting> revRefs = crossReferenceAdapter.getNonNavigableInverseReferences(destructee);
- if (!revRefs.isEmpty()) {
- for (Setting current : revRefs) {
- // test if the view is linked with the removed message
- if (current.getEObject() instanceof View) {
- View view = (View) current.getEObject();
- // we remove the view only if they are owned by the CompositeStructureDiagram
- if (InconsistentMessageViewsHelper.isOwnedByCommunicationDiagram(view)) {
-
- viewsToDestroy.add(view);
- if (InconsistentMessageViewsHelper.isLastMessageOnConnection(view)) {
- // remove the connector
- // System.err.println("+-> the connector will be deleted : " + (View)view.eContainer());
- // System.err.println("+-> the parent of the connector is : " + (View)view.eContainer().eContainer());
- viewsToDestroy.add((View) view.eContainer());
- }
-
-
- }
- }
- }
-
- }
- }
-
-
- return viewsToDestroy;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Saadia Dhouib saadia.dhouib@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.emf.core.util.CrossReferenceAdapter;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.gmf.runtime.notation.Connector;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.ModelEditPart;
+import org.eclipse.uml2.uml.Message;
+
+
+
+/**
+ * The Class InconsistentMessageViewsHelper is intended to give methods to help searching for inconsistent
+ * views of messages when they are deleted or re-oriented.
+ *
+ */
+public class InconsistentMessageViewsHelper {
+
+ /**
+ * Tests if the view is owned by the CommunicationDiagram.
+ *
+ * @param view
+ * a view
+ * @return true, if is owned by communication diagram <code>true</code> if the view is owned by the CompositeStructureDiagram, <code>false</code> if not
+ */
+ public static boolean isOwnedByCommunicationDiagram(View view) {
+ EObject diagram = view.eContainer();
+ while (!(diagram instanceof Diagram)) {
+ diagram = diagram.eContainer();
+ }
+ String type = ((Diagram) diagram).getType();
+ return type == ModelEditPart.MODEL_ID;
+ }
+
+
+ /**
+ * Tests if the view is is the last label (ie. message) on the connection
+ *
+ * @param view
+ * a view
+ * @return true, if is last message on connection <code>true</code> if the view is is the last label (ie. message) on the connection, <code>false</code> if not
+ */
+
+ public static boolean isLastMessageOnConnection(View view) {
+ // Verify if this view is the last label (ie. message) on the connection
+ // if true remove the parent view (ie. the connector view)
+ if (view instanceof DecorationNode) {
+ View parentView = (View) view.eContainer();
+ // ---------------------------------------------------------
+ // help to debug
+ // System.err.println("+-> parent View :" + parentView);
+ // ---------------------------------------------------------
+
+ // get children of the parent view
+ @SuppressWarnings("unchecked")
+ EList<View> children = parentView.getChildren();
+
+ for (View child : children) {
+ if ((child instanceof DecorationNode) && (child.getElement() instanceof Message)) {
+
+ if (!child.getElement().equals(view.getElement())) {// ouups, there is another child which is different from this view!!!
+ return false;
+ }
+ }
+ }
+ // This is the last message on the connection, return true.
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns the {@link CrossReferenceAdapter} corresponding to the element to destroy.
+ *
+ * @param request
+ * the request
+ * @param destructee
+ * the destroyed element
+ * @return the cross reference adapter
+ * the {@link CrossReferenceAdapter} corresponding to this element
+ */
+ public static CrossReferenceAdapter getCrossReferenceAdapter(IEditCommandRequest request, EObject destructee) {
+
+ CrossReferenceAdapter crossReferenceAdapter = null;
+ @SuppressWarnings("rawtypes")
+ Map cacheMaps = (Map) request.getParameter("Cache_Maps");//$NON-NLS-1$ RequestCacheEntries.Cache_Maps
+ if (cacheMaps != null) {
+ crossReferenceAdapter = (CrossReferenceAdapter) cacheMaps.get("CrossRefAdapter");//$NON-NLS-1$ RequestCacheEntries.CrossRefAdapter
+ }
+
+ if (crossReferenceAdapter == null) {
+ crossReferenceAdapter = CrossReferenceAdapter.getExistingCrossReferenceAdapter(destructee);
+ if (crossReferenceAdapter == null) {
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(destructee);
+ if (domain != null) {
+ crossReferenceAdapter = CrossReferenceAdapter.getCrossReferenceAdapter(domain.getResourceSet());
+ }
+ }
+ }
+ return crossReferenceAdapter;
+ }
+
+ /**
+ * This method looks for inconsistent views of connectors to delete in case the connector is
+ * re-oriented.
+ *
+ *
+ * @param viewsToDestroy
+ * the set of views of messages to destroy
+ *
+ * @return the list of {@link View} of the connectors to delete
+ */
+ public static Set<View> addConnectorViewsToDestroy(Set<View> viewsToDestroy) {
+ // for all the views to destroy, we have to classify them by their own connector,
+ // then we have to verify for each connector that the set of messages (to destroy) on it are the only messages that he contains
+ // if yes, we have to add the view of the connector to list of views to destroy
+
+ // the set connectors that are concerned by the deleted to the messages views
+ Set<View> connectors = null;
+ Set<View> newViewsToDestroy = new HashSet<View>(viewsToDestroy);
+ // for all the messages to delete, search for their parent connector
+ Iterator<?> it = viewsToDestroy.iterator();
+ while (it.hasNext()) {
+ View msgView = (View) it.next();
+ if ((msgView instanceof DecorationNode) && (msgView.getElement() instanceof Message)) {
+ if (msgView.eContainer() instanceof Connector) {
+ if (connectors == null) {
+ connectors = new HashSet<View>();
+ }
+ connectors.add((View) msgView.eContainer());
+ }
+ }
+ }
+ // Now the connectors set contains all the connectors that may have to be deleted
+ // we have to check which connector have to be deleted
+ if (connectors != null) {
+ // for each connector we have to search for the set of its labels views to be destroyed
+
+ Iterator<?> it1 = connectors.iterator();
+ while (it1.hasNext()) {
+ View conView = (View) it1.next();
+
+ // Construct the list of viewsOfLabelsToDestroy
+ Set<View> viewsOfLabelsToDestroy = null;
+ Iterator<?> it2 = viewsToDestroy.iterator();
+ while (it2.hasNext()) {
+ View msgView = (View) it2.next();
+ if ((msgView instanceof DecorationNode) && (msgView.getElement() instanceof Message)) {
+ if ((msgView.eContainer() instanceof Connector) && (msgView.eContainer().equals(conView))) {
+ if (viewsOfLabelsToDestroy == null) {
+ viewsOfLabelsToDestroy = new HashSet<View>();
+ }
+ viewsOfLabelsToDestroy.add(msgView);
+ }
+ }
+ }
+ // if the set of viewsOfLabelsToDestroy contains all the real children of the connector
+ // then add the connector to the views to destroy
+ @SuppressWarnings("unchecked")
+ EList<View> conChildren = conView.getChildren();
+ Set<View> comparisonResult = new HashSet<View>(conChildren.size());
+ for (Iterator<?> i = conChildren.iterator(); i.hasNext();) {
+ View element = (View) i.next();
+ if ((element instanceof DecorationNode) && (element.getElement() instanceof Message)) {
+ if (!viewsOfLabelsToDestroy.contains(element)) {
+ comparisonResult.add(element);
+ }
+ }
+ }
+
+ if (comparisonResult.isEmpty()) {// the set of viewsOfLabelsToDestroy contains all the real children of the connector
+ newViewsToDestroy.add(conView);
+ }
+ }
+
+ }
+ return newViewsToDestroy;
+
+ }
+
+ /**
+ * This method looks for inconsistent views to delete in case the message is deleted or
+ * the connector of the message is re-oriented.
+ *
+ * @param destructee
+ * the modified message
+ * @param request
+ * the request to destroy a message or to re-orient a message
+ *
+ * @return the list of {@link View} to delete
+ */
+ public static Set<View> getMemberViewsToDestroy(Message destructee, IEditCommandRequest request) {
+ Set<View> viewsToDestroy = new HashSet<View>();
+ CrossReferenceAdapter crossReferenceAdapter = InconsistentMessageViewsHelper.getCrossReferenceAdapter(request, destructee);
+ if (crossReferenceAdapter != null) {
+
+ Collection<Setting> revRefs = crossReferenceAdapter.getNonNavigableInverseReferences(destructee);
+ if (!revRefs.isEmpty()) {
+ for (Setting current : revRefs) {
+ // test if the view is linked with the removed message
+ if (current.getEObject() instanceof View) {
+ View view = (View) current.getEObject();
+ // we remove the view only if they are owned by the CompositeStructureDiagram
+ if (InconsistentMessageViewsHelper.isOwnedByCommunicationDiagram(view)) {
+
+ viewsToDestroy.add(view);
+ if (InconsistentMessageViewsHelper.isLastMessageOnConnection(view)) {
+ // remove the connector
+ // System.err.println("+-> the connector will be deleted : " + (View)view.eContainer());
+ // System.err.println("+-> the parent of the connector is : " + (View)view.eContainer().eContainer());
+ viewsToDestroy.add((View) view.eContainer());
+ }
+
+
+ }
+ }
+ }
+
+ }
+ }
+
+
+ return viewsToDestroy;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/MessageDirection.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/MessageDirection.java
index bce7c77765f..725afecc586 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/MessageDirection.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/MessageDirection.java
@@ -1,41 +1,41 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * 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
- * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - adapted from sequence diagram
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
-
-
-/**
- * Enum for message direction (in or out)
- */
-public enum MessageDirection {
- /**
- * in direction, out direction
- */
- IN("in"), //$NON-NLS-1$
- OUT("out");
-
- private String name;
-
- private MessageDirection(String name) {
- this.name = name;
- }
-
- /**
- * Return the name of message direction
- *
- * @return The name
- */
- public String getName() {
- return name;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA
+ *
+ *
+ * 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
+ * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - adapted from sequence diagram
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
+
+
+/**
+ * Enum for message direction (in or out)
+ */
+public enum MessageDirection {
+ /**
+ * in direction, out direction
+ */
+ IN("in"), //$NON-NLS-1$
+ OUT("out");
+
+ private String name;
+
+ private MessageDirection(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Return the name of message direction
+ *
+ * @return The name
+ */
+ public String getName() {
+ return name;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/NotificationHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/NotificationHelper.java
index 1523c77dc83..d28c7af1291 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/NotificationHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/NotificationHelper.java
@@ -1,86 +1,86 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
-
- * Contributors:
- * Atos Origin - Initial API and implementation
- * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - adapted from sequence diagram
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl;
-
-/**
- *
- * This is a notification helper
- *
- */
-public class NotificationHelper {
-
- private final UIAdapterImpl modelListener;
-
- private final List<Notifier> listeners = new ArrayList<Notifier>();
-
- /**
- *
- * Constructor.
- *
- * @param modelListener
- */
- public NotificationHelper(UIAdapterImpl modelListener) {
- this.modelListener = modelListener;
- }
-
- /**
- * Add listener on a element
- *
- * @param element
- * The object to listen
- */
- public void listenObject(Notifier element) {
- // Only listen the object if it isn't yet listened
- if (element != null && !element.eAdapters().contains(modelListener)) {
- element.eAdapters().add(modelListener);
- listeners.add(element);
- }
- }
-
- /**
- * Remove listener on a element
- *
- * @param element
- * The object to unlisten
- */
- public void unlistenObject(Notifier element) {
- // Only listen the object if it isn't yet listened
- if (element != null && element.eAdapters().contains(modelListener)) {
- element.eAdapters().remove(modelListener);
- }
- listeners.remove(element);
- }
-
- /**
- * Remove all listeners
- */
- public void unlistenAll() {
- if (listeners.size() > 0) {
- for (Notifier listener : listeners) {
- if (listener != null && listener.eAdapters().contains(modelListener)) {
- listener.eAdapters().remove(modelListener);
- }
- }
- listeners.clear();
- }
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - adapted from sequence diagram
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl;
+
+/**
+ *
+ * This is a notification helper
+ *
+ */
+public class NotificationHelper {
+
+ private final UIAdapterImpl modelListener;
+
+ private final List<Notifier> listeners = new ArrayList<Notifier>();
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param modelListener
+ */
+ public NotificationHelper(UIAdapterImpl modelListener) {
+ this.modelListener = modelListener;
+ }
+
+ /**
+ * Add listener on a element
+ *
+ * @param element
+ * The object to listen
+ */
+ public void listenObject(Notifier element) {
+ // Only listen the object if it isn't yet listened
+ if (element != null && !element.eAdapters().contains(modelListener)) {
+ element.eAdapters().add(modelListener);
+ listeners.add(element);
+ }
+ }
+
+ /**
+ * Remove listener on a element
+ *
+ * @param element
+ * The object to unlisten
+ */
+ public void unlistenObject(Notifier element) {
+ // Only listen the object if it isn't yet listened
+ if (element != null && element.eAdapters().contains(modelListener)) {
+ element.eAdapters().remove(modelListener);
+ }
+ listeners.remove(element);
+ }
+
+ /**
+ * Remove all listeners
+ */
+ public void unlistenAll() {
+ if (listeners.size() > 0) {
+ for (Notifier listener : listeners) {
+ if (listener != null && listener.eAdapters().contains(modelListener)) {
+ listener.eAdapters().remove(modelListener);
+ }
+ }
+ listeners.clear();
+ }
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/RotationHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/RotationHelper.java
index 0c8a1a450ef..fa457732254 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/RotationHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/RotationHelper.java
@@ -1,295 +1,295 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Saadia Dhouib saadia.dhouib@cea.fr - Adapted from Composite Structure Diagram
- * Ansgar Radermacher ansgar.radermacher@cea.fr - Rotate via swt.graphics.Transform, bug 391729
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
-
-import java.awt.Color;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.Transparency;
-import java.awt.geom.AffineTransform;
-import java.awt.image.BufferedImage;
-import java.awt.image.ColorModel;
-import java.awt.image.DirectColorModel;
-import java.awt.image.IndexColorModel;
-import java.awt.image.WritableRaster;
-
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.PaletteData;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.graphics.Transform;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This is a helper for rotating SWT figures, it provides a method for computing
- * an rotation angle provided two points, and methods for rotating an SWT image.
- */
-public class RotationHelper {
-
- /**
- *
- * This method calculates the rotation clockwise angle w.r.t the source and
- * target connection anchor positions
- *
- * @param S
- * Source connection anchor
- * @param T
- * Target connection anchor
- * @return The rotation clockwise angle w.r.t the source and target
- * connection
- */
- public static double calculateRotAngle(Point S, Point T) {
- double dx = T.x - S.x;
- double dy = T.y - S.y;
- double angle = 0.0d;
-
- if ((dx > 0) && (dy < 0)) {
- angle = -Math.atan(Math.abs(dy) / Math.abs(dx));
- // System.out.print("(dx > 0) && (dy < 0)\n");
- } else if ((dx < 0) && (dy < 0)) {
- angle = -(Math.PI - Math.atan(Math.abs(dy) / Math.abs(dx)));
- // System.out.print("(dx < 0) && (dy < 0)\n");
- } else if ((dx < 0) && (dy > 0)) {
- angle = Math.PI - Math.atan(Math.abs(dy) / Math.abs(dx));
- // System.out.print("(dx < 0) && (dy > 0)\n");
- } else if ((dx > 0) && (dy > 0)) {
- angle = Math.atan(Math.abs(dy) / dx);
- // System.out.print("((dx > 0) && (dy > 0)\n");
- } else if ((dx == 0) && (dy < 0)) {
- angle = -Math.PI / 2;
- // System.out.print("((dx == 0) && (dy < 0))\n");
- } else if ((dx == 0) && (dy > 0)) {
- angle = Math.PI / 2;
- // System.out.print("((dx == 0) && (dy > 0))\n");
- } else if ((dy == 0) && (dx < 0)) {
- angle = -Math.PI;
- // System.out.print("((dy == 0) && (dx < 0))\n");
- }
-
- return Math.toDegrees(angle);
- }
-
- /**
- * rotates an SWTimage using swt.graphics.Transform.
- *
- * @param image
- * SWT image
- * @param degree
- * angle of rotation in degrees
- * @return SWT rotated image
- */
- public static Image rotateImage(Image image, double degree) {
- ImageData imageData = image.getImageData();
- int w = imageData.width;
- int h = imageData.height;
- float angle = (float) Math.toRadians(degree);
- float sinA = (float) Math.abs(Math.sin(angle));
- float cosA = (float) Math.abs(Math.cos(angle));
- int neww = (int) Math.floor(w * cosA + h * sinA);
- int newh = (int) Math.floor(h * cosA + w * sinA);
-
- Transform transform = new Transform(PlatformUI.getWorkbench().getDisplay());
- transform.translate(neww / 2, newh / 2); // new center
- transform.rotate((float) degree);
- transform.translate(-w / 2, -h / 2); // old center
-
- ImageData newImageData = new ImageData(neww, newh, imageData.depth, imageData.palette);
- // Use "white" as transparent pixel instead of real transparency. The latter would raise cross platform
- // issues, since the same image file leads to an image with alpha data on Linux (32 bit depth, 8 for alpha)
- // and one without alpha on windows (8 bit depth only).
- newImageData.transparentPixel = newImageData.palette.getPixel(new RGB(
- Color.white.getRed(),
- Color.white.getGreen(),
- Color.white.getBlue()));
- final Image newImage = new Image(PlatformUI.getWorkbench().getDisplay(), newImageData);
- GC gc = new GC(newImage);
- gc.fillRectangle(0, 0, neww, newh);
- gc.setTransform(transform);
- gc.drawImage(image, 0, 0);
-
- gc.dispose();
-
- return newImage;
- }
-
-
-
- /**
- * rotates an AWT image using awt.geom.AffineTransform.
- *
- * @param image
- * awt image
- * @param degree
- * angle of rotation in degrees
- * @return swt rotated image
- */
- @Deprecated
- public static ImageData tiltBis(java.awt.Image image, double degree) {
- int w = image.getWidth(null);
- int h = image.getHeight(null);
- double angle = Math.toRadians(degree);
- double sin = Math.abs(Math.sin(angle));
- double cos = Math.abs(Math.cos(angle));
- int neww = (int) Math.floor(w * cos + h * sin);
- int newh = (int) Math.floor(h * cos + w * sin);
-
- AffineTransform at = new AffineTransform();
-
- // at.scale((w + 0.0) / (neww + 0.0), (h + 0.0) / (newh + 0.0));
- at.translate((neww - w) / 2, (newh - h) / 2);
-
- at.rotate(angle, w / 2, h / 2);
-
- BufferedImage b = new BufferedImage(neww, newh, Transparency.TRANSLUCENT);
- Graphics2D g = b.createGraphics();
- g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR);
- g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
- g.drawImage(image, at, null);
- g.dispose();
- return convertToSWT(b);
- }
-
-
-
- /**
- * Rotates an SWT image by converting it to AWT first.
- *
- * @param img
- * the SWT img
- * @param degree
- * the degree
- * @return the rotated image
- */
- @Deprecated
- public static Image rotateImageBis(Image img, double degree) {
-
- ImageData imageData = img.getImageData();
- BufferedImage bufImg = convertToAWT(imageData);
- // double angle = Math.toRadians(degree);
- // return tilt(bufImg, angle);
- ImageData imageDataNew = tiltBis(bufImg, degree);
- Image imageNew = new Image(PlatformUI.getWorkbench().getDisplay(), imageDataNew);
- return imageNew;
- }
-
- /**
- * convert an AWT BufferedImage to SWT ImageData.
- *
- * @param bufferedImage
- * the buffered image
- * @return converted ImageData
- */
- @Deprecated
- public static ImageData convertToSWT(BufferedImage bufferedImage) {
- if (bufferedImage.getColorModel() instanceof DirectColorModel) {
- DirectColorModel colorModel = (DirectColorModel) bufferedImage.getColorModel();
- PaletteData palette = new PaletteData(colorModel.getRedMask(), colorModel.getGreenMask(), colorModel.getBlueMask());
- ImageData data = new ImageData(bufferedImage.getWidth(), bufferedImage.getHeight(), colorModel.getPixelSize(), palette);
- for (int y = 0; y < data.height; y++) {
- for (int x = 0; x < data.width; x++) {
- int rgb = bufferedImage.getRGB(x, y);
- int pixel = palette.getPixel(new RGB((rgb >> 16) & 0xFF, (rgb >> 8) & 0xFF, rgb & 0xFF));
- data.setPixel(x, y, pixel);
- if (colorModel.hasAlpha()) {
- data.setAlpha(x, y, (rgb >> 24) & 0xFF);
- }
- }
- }
- return data;
- } else if (bufferedImage.getColorModel() instanceof IndexColorModel) {
- IndexColorModel colorModel = (IndexColorModel) bufferedImage.getColorModel();
- int size = colorModel.getMapSize();
- byte[] reds = new byte[size];
- byte[] greens = new byte[size];
- byte[] blues = new byte[size];
- colorModel.getReds(reds);
- colorModel.getGreens(greens);
- colorModel.getBlues(blues);
- RGB[] rgbs = new RGB[size];
- for (int i = 0; i < rgbs.length; i++) {
- rgbs[i] = new RGB(reds[i] & 0xFF, greens[i] & 0xFF, blues[i] & 0xFF);
- }
- PaletteData palette = new PaletteData(rgbs);
- ImageData data = new ImageData(bufferedImage.getWidth(), bufferedImage.getHeight(), colorModel.getPixelSize(), palette);
- data.transparentPixel = colorModel.getTransparentPixel();
- WritableRaster raster = bufferedImage.getRaster();
- int[] pixelArray = new int[1];
- for (int y = 0; y < data.height; y++) {
- for (int x = 0; x < data.width; x++) {
- raster.getPixel(x, y, pixelArray);
- data.setPixel(x, y, pixelArray[0]);
- }
- }
- return data;
- }
- return null;
- }
-
- /**
- * Converts an SWT image to AWT
- * TODO: This function does not work on MacOS and Linux machines
- *
- * @param data
- * SWT ImageData
- * @return AWT BufferdImage
- */
- @Deprecated
- public static BufferedImage convertToAWT(ImageData data) {
- ColorModel colorModel = null;
- PaletteData palette = data.palette;
- if (palette.isDirect) {
- colorModel = new DirectColorModel(data.depth, palette.redMask, palette.greenMask, palette.blueMask);
- BufferedImage bufferedImage = new BufferedImage(colorModel, colorModel.createCompatibleWritableRaster(data.width, data.height), false, null);
- for (int y = 0; y < data.height; y++) {
- for (int x = 0; x < data.width; x++) {
- int pixel = data.getPixel(x, y);
- RGB rgb = palette.getRGB(pixel);
- bufferedImage.setRGB(x, y, rgb.red << 16 | rgb.green << 8 | rgb.blue);
- }
- }
- return bufferedImage;
- } else {
- RGB[] rgbs = palette.getRGBs();
- byte[] red = new byte[rgbs.length];
- byte[] green = new byte[rgbs.length];
- byte[] blue = new byte[rgbs.length];
- for (int i = 0; i < rgbs.length; i++) {
- RGB rgb = rgbs[i];
- red[i] = (byte) rgb.red;
- green[i] = (byte) rgb.green;
- blue[i] = (byte) rgb.blue;
- }
- if (data.transparentPixel != -1) {
- colorModel = new IndexColorModel(data.depth, rgbs.length, red, green, blue, data.transparentPixel);
- } else {
- colorModel = new IndexColorModel(data.depth, rgbs.length, red, green, blue);
- }
- BufferedImage bufferedImage = new BufferedImage(colorModel, colorModel.createCompatibleWritableRaster(data.width, data.height), false, null);
- WritableRaster raster = bufferedImage.getRaster();
- int[] pixelArray = new int[1];
- for (int y = 0; y < data.height; y++) {
- for (int x = 0; x < data.width; x++) {
- int pixel = data.getPixel(x, y);
- pixelArray[0] = pixel;
- raster.setPixel(x, y, pixelArray);
- }
- }
- return bufferedImage;
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Saadia Dhouib saadia.dhouib@cea.fr - Adapted from Composite Structure Diagram
+ * Ansgar Radermacher ansgar.radermacher@cea.fr - Rotate via swt.graphics.Transform, bug 391729
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.Transparency;
+import java.awt.geom.AffineTransform;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.DirectColorModel;
+import java.awt.image.IndexColorModel;
+import java.awt.image.WritableRaster;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.PaletteData;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.Transform;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * This is a helper for rotating SWT figures, it provides a method for computing
+ * an rotation angle provided two points, and methods for rotating an SWT image.
+ */
+public class RotationHelper {
+
+ /**
+ *
+ * This method calculates the rotation clockwise angle w.r.t the source and
+ * target connection anchor positions
+ *
+ * @param S
+ * Source connection anchor
+ * @param T
+ * Target connection anchor
+ * @return The rotation clockwise angle w.r.t the source and target
+ * connection
+ */
+ public static double calculateRotAngle(Point S, Point T) {
+ double dx = T.x - S.x;
+ double dy = T.y - S.y;
+ double angle = 0.0d;
+
+ if ((dx > 0) && (dy < 0)) {
+ angle = -Math.atan(Math.abs(dy) / Math.abs(dx));
+ // System.out.print("(dx > 0) && (dy < 0)\n");
+ } else if ((dx < 0) && (dy < 0)) {
+ angle = -(Math.PI - Math.atan(Math.abs(dy) / Math.abs(dx)));
+ // System.out.print("(dx < 0) && (dy < 0)\n");
+ } else if ((dx < 0) && (dy > 0)) {
+ angle = Math.PI - Math.atan(Math.abs(dy) / Math.abs(dx));
+ // System.out.print("(dx < 0) && (dy > 0)\n");
+ } else if ((dx > 0) && (dy > 0)) {
+ angle = Math.atan(Math.abs(dy) / dx);
+ // System.out.print("((dx > 0) && (dy > 0)\n");
+ } else if ((dx == 0) && (dy < 0)) {
+ angle = -Math.PI / 2;
+ // System.out.print("((dx == 0) && (dy < 0))\n");
+ } else if ((dx == 0) && (dy > 0)) {
+ angle = Math.PI / 2;
+ // System.out.print("((dx == 0) && (dy > 0))\n");
+ } else if ((dy == 0) && (dx < 0)) {
+ angle = -Math.PI;
+ // System.out.print("((dy == 0) && (dx < 0))\n");
+ }
+
+ return Math.toDegrees(angle);
+ }
+
+ /**
+ * rotates an SWTimage using swt.graphics.Transform.
+ *
+ * @param image
+ * SWT image
+ * @param degree
+ * angle of rotation in degrees
+ * @return SWT rotated image
+ */
+ public static Image rotateImage(Image image, double degree) {
+ ImageData imageData = image.getImageData();
+ int w = imageData.width;
+ int h = imageData.height;
+ float angle = (float) Math.toRadians(degree);
+ float sinA = (float) Math.abs(Math.sin(angle));
+ float cosA = (float) Math.abs(Math.cos(angle));
+ int neww = (int) Math.floor(w * cosA + h * sinA);
+ int newh = (int) Math.floor(h * cosA + w * sinA);
+
+ Transform transform = new Transform(PlatformUI.getWorkbench().getDisplay());
+ transform.translate(neww / 2, newh / 2); // new center
+ transform.rotate((float) degree);
+ transform.translate(-w / 2, -h / 2); // old center
+
+ ImageData newImageData = new ImageData(neww, newh, imageData.depth, imageData.palette);
+ // Use "white" as transparent pixel instead of real transparency. The latter would raise cross platform
+ // issues, since the same image file leads to an image with alpha data on Linux (32 bit depth, 8 for alpha)
+ // and one without alpha on windows (8 bit depth only).
+ newImageData.transparentPixel = newImageData.palette.getPixel(new RGB(
+ Color.white.getRed(),
+ Color.white.getGreen(),
+ Color.white.getBlue()));
+ final Image newImage = new Image(PlatformUI.getWorkbench().getDisplay(), newImageData);
+ GC gc = new GC(newImage);
+ gc.fillRectangle(0, 0, neww, newh);
+ gc.setTransform(transform);
+ gc.drawImage(image, 0, 0);
+
+ gc.dispose();
+
+ return newImage;
+ }
+
+
+
+ /**
+ * rotates an AWT image using awt.geom.AffineTransform.
+ *
+ * @param image
+ * awt image
+ * @param degree
+ * angle of rotation in degrees
+ * @return swt rotated image
+ */
+ @Deprecated
+ public static ImageData tiltBis(java.awt.Image image, double degree) {
+ int w = image.getWidth(null);
+ int h = image.getHeight(null);
+ double angle = Math.toRadians(degree);
+ double sin = Math.abs(Math.sin(angle));
+ double cos = Math.abs(Math.cos(angle));
+ int neww = (int) Math.floor(w * cos + h * sin);
+ int newh = (int) Math.floor(h * cos + w * sin);
+
+ AffineTransform at = new AffineTransform();
+
+ // at.scale((w + 0.0) / (neww + 0.0), (h + 0.0) / (newh + 0.0));
+ at.translate((neww - w) / 2, (newh - h) / 2);
+
+ at.rotate(angle, w / 2, h / 2);
+
+ BufferedImage b = new BufferedImage(neww, newh, Transparency.TRANSLUCENT);
+ Graphics2D g = b.createGraphics();
+ g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR);
+ g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+ g.drawImage(image, at, null);
+ g.dispose();
+ return convertToSWT(b);
+ }
+
+
+
+ /**
+ * Rotates an SWT image by converting it to AWT first.
+ *
+ * @param img
+ * the SWT img
+ * @param degree
+ * the degree
+ * @return the rotated image
+ */
+ @Deprecated
+ public static Image rotateImageBis(Image img, double degree) {
+
+ ImageData imageData = img.getImageData();
+ BufferedImage bufImg = convertToAWT(imageData);
+ // double angle = Math.toRadians(degree);
+ // return tilt(bufImg, angle);
+ ImageData imageDataNew = tiltBis(bufImg, degree);
+ Image imageNew = new Image(PlatformUI.getWorkbench().getDisplay(), imageDataNew);
+ return imageNew;
+ }
+
+ /**
+ * convert an AWT BufferedImage to SWT ImageData.
+ *
+ * @param bufferedImage
+ * the buffered image
+ * @return converted ImageData
+ */
+ @Deprecated
+ public static ImageData convertToSWT(BufferedImage bufferedImage) {
+ if (bufferedImage.getColorModel() instanceof DirectColorModel) {
+ DirectColorModel colorModel = (DirectColorModel) bufferedImage.getColorModel();
+ PaletteData palette = new PaletteData(colorModel.getRedMask(), colorModel.getGreenMask(), colorModel.getBlueMask());
+ ImageData data = new ImageData(bufferedImage.getWidth(), bufferedImage.getHeight(), colorModel.getPixelSize(), palette);
+ for (int y = 0; y < data.height; y++) {
+ for (int x = 0; x < data.width; x++) {
+ int rgb = bufferedImage.getRGB(x, y);
+ int pixel = palette.getPixel(new RGB((rgb >> 16) & 0xFF, (rgb >> 8) & 0xFF, rgb & 0xFF));
+ data.setPixel(x, y, pixel);
+ if (colorModel.hasAlpha()) {
+ data.setAlpha(x, y, (rgb >> 24) & 0xFF);
+ }
+ }
+ }
+ return data;
+ } else if (bufferedImage.getColorModel() instanceof IndexColorModel) {
+ IndexColorModel colorModel = (IndexColorModel) bufferedImage.getColorModel();
+ int size = colorModel.getMapSize();
+ byte[] reds = new byte[size];
+ byte[] greens = new byte[size];
+ byte[] blues = new byte[size];
+ colorModel.getReds(reds);
+ colorModel.getGreens(greens);
+ colorModel.getBlues(blues);
+ RGB[] rgbs = new RGB[size];
+ for (int i = 0; i < rgbs.length; i++) {
+ rgbs[i] = new RGB(reds[i] & 0xFF, greens[i] & 0xFF, blues[i] & 0xFF);
+ }
+ PaletteData palette = new PaletteData(rgbs);
+ ImageData data = new ImageData(bufferedImage.getWidth(), bufferedImage.getHeight(), colorModel.getPixelSize(), palette);
+ data.transparentPixel = colorModel.getTransparentPixel();
+ WritableRaster raster = bufferedImage.getRaster();
+ int[] pixelArray = new int[1];
+ for (int y = 0; y < data.height; y++) {
+ for (int x = 0; x < data.width; x++) {
+ raster.getPixel(x, y, pixelArray);
+ data.setPixel(x, y, pixelArray[0]);
+ }
+ }
+ return data;
+ }
+ return null;
+ }
+
+ /**
+ * Converts an SWT image to AWT
+ * TODO: This function does not work on MacOS and Linux machines
+ *
+ * @param data
+ * SWT ImageData
+ * @return AWT BufferdImage
+ */
+ @Deprecated
+ public static BufferedImage convertToAWT(ImageData data) {
+ ColorModel colorModel = null;
+ PaletteData palette = data.palette;
+ if (palette.isDirect) {
+ colorModel = new DirectColorModel(data.depth, palette.redMask, palette.greenMask, palette.blueMask);
+ BufferedImage bufferedImage = new BufferedImage(colorModel, colorModel.createCompatibleWritableRaster(data.width, data.height), false, null);
+ for (int y = 0; y < data.height; y++) {
+ for (int x = 0; x < data.width; x++) {
+ int pixel = data.getPixel(x, y);
+ RGB rgb = palette.getRGB(pixel);
+ bufferedImage.setRGB(x, y, rgb.red << 16 | rgb.green << 8 | rgb.blue);
+ }
+ }
+ return bufferedImage;
+ } else {
+ RGB[] rgbs = palette.getRGBs();
+ byte[] red = new byte[rgbs.length];
+ byte[] green = new byte[rgbs.length];
+ byte[] blue = new byte[rgbs.length];
+ for (int i = 0; i < rgbs.length; i++) {
+ RGB rgb = rgbs[i];
+ red[i] = (byte) rgb.red;
+ green[i] = (byte) rgb.green;
+ blue[i] = (byte) rgb.blue;
+ }
+ if (data.transparentPixel != -1) {
+ colorModel = new IndexColorModel(data.depth, rgbs.length, red, green, blue, data.transparentPixel);
+ } else {
+ colorModel = new IndexColorModel(data.depth, rgbs.length, red, green, blue);
+ }
+ BufferedImage bufferedImage = new BufferedImage(colorModel, colorModel.createCompatibleWritableRaster(data.width, data.height), false, null);
+ WritableRaster raster = bufferedImage.getRaster();
+ int[] pixelArray = new int[1];
+ for (int y = 0; y < data.height; y++) {
+ for (int x = 0; x < data.width; x++) {
+ int pixel = data.getPixel(x, y);
+ pixelArray[0] = pixel;
+ raster.setPixel(x, y, pixelArray);
+ }
+ }
+ return bufferedImage;
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/TimeObservationHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/TimeObservationHelper.java
index a79fa9dcc8c..0e67fe401b0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/TimeObservationHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/helper/TimeObservationHelper.java
@@ -1,141 +1,141 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - adapted from composite diagram
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPartViewer;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest.ConnectionViewDescriptor;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.commands.CommonDeferredCreateConnectionViewCommand;
-import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
-import org.eclipse.papyrus.uml.diagram.common.helper.AssociationHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
-import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.TimeObservation;
-
-/**
- * This class handles {@link TimeObservation} drop in diagram.
- * Derived from {@link AssociationHelper}
- */
-public class TimeObservationHelper extends ElementHelper {
-
- /**
- * Instantiates a new TimeObservation helper.
- *
- * @param editDomain
- * the edit domain
- */
- public TimeObservationHelper(TransactionalEditingDomain editDomain) {
- this.editDomain = editDomain;
- }
-
- /**
- * Drop TimeObservation.
- *
- * @param timeObservation
- * the semantic element
- * @param viewer
- * the viewer
- * @param diagramPreferencesHint
- * the diagram preferences hint
- * @param location
- * the location of the drop
- * @param containerView
- * the container view that will contain the associationClass views
- *
- * @return the command
- */
- public Command dropTimeObservation(TimeObservation timeObservation, EditPartViewer viewer, PreferencesHint diagramPreferencesHint, Point location, View containerView) {
- CompositeCommand cc = new CompositeCommand("dropTimeObservation"); //$NON-NLS-1$
-
- // 0. Obtain the events
- NamedElement endToConnect = timeObservation.getEvent();
- GraphicalEditPart endEditPart = null;
-
- // we have an event
- if (endToConnect != null) {
- // look for if an EditPart exist for this element
- Collection<?> editPartSet = viewer.getEditPartRegistry().values();
- Iterator<?> editPartIterator = editPartSet.iterator();
-
- while (editPartIterator.hasNext() && endEditPart == null) {
-
- EditPart currentEditPart = (EditPart) editPartIterator.next();
- if (currentEditPart instanceof GraphicalEditPart && endToConnect.equals(((GraphicalEditPart) currentEditPart).resolveSemanticElement())) {
- /**
- * Warning : TimeObservationEditPart, TimeObservationStereotypeLabelEditPart and
- * TimeObservationNameEditPart are equal : This is the object of this 2nd IF!!!
- */
- if (!(currentEditPart instanceof CompartmentEditPart) && !(currentEditPart instanceof LabelEditPart)) {
- endEditPart = (GraphicalEditPart) currentEditPart;
- }
- }
- }
- }
-
- // 2. creation of the node TimeObservation
- IAdaptable elementAdapter = new EObjectAdapter(timeObservation);
- ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, ((IHintedType) UMLElementTypes.TimeObservation_Shape).getSemanticHint(), ViewUtil.APPEND, true, diagramPreferencesHint);
- CreateCommand nodeCreationCommand = new CreateCommand(getEditingDomain(), descriptor, (containerView));
- cc.compose(nodeCreationCommand);
-
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), location); //$NON-NLS-1$
- cc.compose(setBoundsCommand);
-
- if (endEditPart != null) {
- IAdaptable sourceEventAdapter = null;
- IAdaptable targetEventAdapter = null;
-
- // obtain the node figure
- sourceEventAdapter = (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue();
-
- // used in the creation command of the event
- ConnectionViewDescriptor dashedLineViewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.TimeObservation_EventEdge, ((IHintedType) UMLElementTypes.TimeObservation_EventEdge).getSemanticHint(), diagramPreferencesHint);
-
- // 3. creation of the dashed line between the associationClass link
-
- targetEventAdapter = new SemanticAdapter(null, endEditPart.getModel());
- CommonDeferredCreateConnectionViewCommand dashedLineCmd = new CommonDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.TimeObservation_EventEdge).getSemanticHint(), (sourceEventAdapter), (targetEventAdapter),
- viewer, diagramPreferencesHint, dashedLineViewDescriptor, null);
- dashedLineCmd.setElement(timeObservation);
- cc.compose(dashedLineCmd);
-
- }
-
- return new ICommandProxy(cc);
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - adapted from composite diagram
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.helper;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest.ConnectionViewDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.commands.CommonDeferredCreateConnectionViewCommand;
+import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.uml.diagram.common.helper.AssociationHelper;
+import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
+import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.TimeObservation;
+
+/**
+ * This class handles {@link TimeObservation} drop in diagram.
+ * Derived from {@link AssociationHelper}
+ */
+public class TimeObservationHelper extends ElementHelper {
+
+ /**
+ * Instantiates a new TimeObservation helper.
+ *
+ * @param editDomain
+ * the edit domain
+ */
+ public TimeObservationHelper(TransactionalEditingDomain editDomain) {
+ this.editDomain = editDomain;
+ }
+
+ /**
+ * Drop TimeObservation.
+ *
+ * @param timeObservation
+ * the semantic element
+ * @param viewer
+ * the viewer
+ * @param diagramPreferencesHint
+ * the diagram preferences hint
+ * @param location
+ * the location of the drop
+ * @param containerView
+ * the container view that will contain the associationClass views
+ *
+ * @return the command
+ */
+ public Command dropTimeObservation(TimeObservation timeObservation, EditPartViewer viewer, PreferencesHint diagramPreferencesHint, Point location, View containerView) {
+ CompositeCommand cc = new CompositeCommand("dropTimeObservation"); //$NON-NLS-1$
+
+ // 0. Obtain the events
+ NamedElement endToConnect = timeObservation.getEvent();
+ GraphicalEditPart endEditPart = null;
+
+ // we have an event
+ if (endToConnect != null) {
+ // look for if an EditPart exist for this element
+ Collection<?> editPartSet = viewer.getEditPartRegistry().values();
+ Iterator<?> editPartIterator = editPartSet.iterator();
+
+ while (editPartIterator.hasNext() && endEditPart == null) {
+
+ EditPart currentEditPart = (EditPart) editPartIterator.next();
+ if (currentEditPart instanceof GraphicalEditPart && endToConnect.equals(((GraphicalEditPart) currentEditPart).resolveSemanticElement())) {
+ /**
+ * Warning : TimeObservationEditPart, TimeObservationStereotypeLabelEditPart and
+ * TimeObservationNameEditPart are equal : This is the object of this 2nd IF!!!
+ */
+ if (!(currentEditPart instanceof CompartmentEditPart) && !(currentEditPart instanceof LabelEditPart)) {
+ endEditPart = (GraphicalEditPart) currentEditPart;
+ }
+ }
+ }
+ }
+
+ // 2. creation of the node TimeObservation
+ IAdaptable elementAdapter = new EObjectAdapter(timeObservation);
+ ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, ((IHintedType) UMLElementTypes.TimeObservation_Shape).getSemanticHint(), ViewUtil.APPEND, true, diagramPreferencesHint);
+ CreateCommand nodeCreationCommand = new CreateCommand(getEditingDomain(), descriptor, (containerView));
+ cc.compose(nodeCreationCommand);
+
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), location); //$NON-NLS-1$
+ cc.compose(setBoundsCommand);
+
+ if (endEditPart != null) {
+ IAdaptable sourceEventAdapter = null;
+ IAdaptable targetEventAdapter = null;
+
+ // obtain the node figure
+ sourceEventAdapter = (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue();
+
+ // used in the creation command of the event
+ ConnectionViewDescriptor dashedLineViewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.TimeObservation_EventEdge, ((IHintedType) UMLElementTypes.TimeObservation_EventEdge).getSemanticHint(), diagramPreferencesHint);
+
+ // 3. creation of the dashed line between the associationClass link
+
+ targetEventAdapter = new SemanticAdapter(null, endEditPart.getModel());
+ CommonDeferredCreateConnectionViewCommand dashedLineCmd = new CommonDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.TimeObservation_EventEdge).getSemanticHint(), (sourceEventAdapter), (targetEventAdapter),
+ viewer, diagramPreferencesHint, dashedLineViewDescriptor, null);
+ dashedLineCmd.setElement(timeObservation);
+ cc.compose(dashedLineCmd);
+
+ }
+
+ return new ICommandProxy(cc);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/messages/Messages.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/messages/Messages.java
index 2e28aa97f5c..18a6cf76427 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/messages/Messages.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/messages/Messages.java
@@ -1,59 +1,59 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Saadia Dhouib saadia.dhouib@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication.custom.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * The Class Messages.
- * @since 3.0
- */
-public class Messages extends NLS {
-
- /** The Constant BUNDLE_NAME. */
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.diagram.communication.custom.messages.messages"; //$NON-NLS-1$
-
- /**
- *
- */
- public static String CommandHelper_PropertySelection;
-
- /**
- *
- */
- public static String CommandHelper_SelectProperty;
-
- /**
- *
- */
- public static String CommandHelper_SelectSignature;
-
- /**
- *
- */
- public static String CommandHelper_signatureslection;
-
- /** The Message parser. */
- public static String MessageParser_undefined;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- /**
- * Instantiates a new messages.
- */
- private Messages() {
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Saadia Dhouib saadia.dhouib@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * The Class Messages.
+ * @since 3.0
+ */
+public class Messages extends NLS {
+
+ /** The Constant BUNDLE_NAME. */
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.diagram.communication.custom.messages.messages"; //$NON-NLS-1$
+
+ /**
+ *
+ */
+ public static String CommandHelper_PropertySelection;
+
+ /**
+ *
+ */
+ public static String CommandHelper_SelectProperty;
+
+ /**
+ *
+ */
+ public static String CommandHelper_SelectSignature;
+
+ /**
+ *
+ */
+ public static String CommandHelper_signatureslection;
+
+ /** The Message parser. */
+ public static String MessageParser_undefined;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ /**
+ * Instantiates a new messages.
+ */
+ private Messages() {
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/messages/messages.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/messages/messages.properties
index 74976ef7b15..b99ae1d7d9f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/messages/messages.properties
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/messages/messages.properties
@@ -1,9 +1,9 @@
-MessageParser_undefined=<UNDEFINED>
-CommandHelper_PropertySelection=Property Selection
-CommandHelper_SelectProperty=Select a property (* = any string, ? = any char):
-CommandHelper_SelectSignature=Select a signature (* = any string, ? = any char):
-CommandHelper_signatureslection=Signature Selection
-MessageInverseOrientation_setconnectionends=set connection ends
-MessageInverseOrientation_setconnectionanchors=set connection anchors
-MessageLabelInverseOrientation_setconnectionends=set connection ends
-MessageLabelInverseOrientation_setconnectionanchors=set connection anchors
+MessageParser_undefined=<UNDEFINED>
+CommandHelper_PropertySelection=Property Selection
+CommandHelper_SelectProperty=Select a property (* = any string, ? = any char):
+CommandHelper_SelectSignature=Select a signature (* = any string, ? = any char):
+CommandHelper_signatureslection=Signature Selection
+MessageInverseOrientation_setconnectionends=set connection ends
+MessageInverseOrientation_setconnectionanchors=set connection anchors
+MessageLabelInverseOrientation_setconnectionends=set connection ends
+MessageLabelInverseOrientation_setconnectionanchors=set connection anchors
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconciler_1_2_0.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconciler_1_2_0.java
index 3b8622284f8..316bf3b18ac 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconciler_1_2_0.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/migration/CommunicationReconciler_1_2_0.java
@@ -1,153 +1,153 @@
-/*****************************************************************************
- * Copyright (c) 2010, 2015 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Florian Noyrit (CEA) florian.noyrit@cea.fr - Initial API and Implementation
- * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - reconciler to add floating label
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication.custom.migration;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
-
-/**
- * Class Diagram Reconciler from 1.1.0 to 1.2.0
- * @since 3.0
- */
-public class CommunicationReconciler_1_2_0 extends DiagramReconciler {
-
- @Override
- public ICommand getReconcileCommand(Diagram diagram) {
- CompositeCommand cc = new CompositeCommand("Migrate diagram from 1.1.0 to 1.2.0");
- cc.add(new ChangeVisualIDsCommand(diagram));
- return cc;
- }
-
- protected class ChangeVisualIDsCommand extends AbstractCommand {
-
- protected final Diagram diagram;
-
- public ChangeVisualIDsCommand(Diagram diagram) {
- super("Change the diagram's visual ids from 1.1.0 to 1.2.0");
- this.diagram = diagram;
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- TreeIterator<EObject> allContentIterator = diagram.eAllContents();
-
- while (allContentIterator.hasNext()) {
- EObject eObject = allContentIterator.next();
- if (eObject instanceof View) {
- View view = (View) eObject;
- view.setType(getNewVisualID(view.getType()));
- }
- }
-
- return CommandResult.newOKCommandResult();
- }
-
- @Override
- public boolean canUndo() {
- return false;
- }
-
- @Override
- public boolean canRedo() {
- return false;
- }
-
- @Override
- protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- throw new ExecutionException("Should not be called, canRedo false");
- }
-
- @Override
- protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- throw new ExecutionException("Should not be called, canUndo false");
- }
- }
-
- public static String getNewVisualID(String oldVisualID) {
- switch (oldVisualID) {
- case "1000":
- return "Package_CommunicationDiagram";
- case "8001":
- return "Lifeline_Shape";
- case "5002":
- return "Lifeline_NameLabel";
- case "6014":
- return "Lifeline_FloatingNameLabel";
- case "8004":
- return "Constraint_Shape";
- case "5064":
- return "Constraint_NameLabel";
- case "5160":
- return "Constraint_BodyLabel";
- case "8005":
- return "Comment_Shape";
- case "5150":
- return "Comment_BodyLabel";
- case "8006":
- return "TimeObservation_Shape";
- case "5153":
- return "TimeObservation_NameLabel";
- case "5154":
- return "TimeObservation_StereotypeLabel";
- case "8007":
- return "DurationObservation_Shape";
- case "5155":
- return "DurationObservation_NameLabel";
- case "5156":
- return "DurationObservation_StereotypeLabel";
- case "8002":
- return "Interaction_Shape";
- case "5001":
- return "Interaction_NameLabel";
- case "6013":
- return "Interaction_FloatingNameLabel";
- case "8016":
- return "Diagram_ShortcutShape";
- case "0":
- return "Diagram_NameLabel";
- case "8009":
- return "Path_Edge";
- case "6001":
- return "Path_MessageLabel";
- case "6012":
- return "Path_StereotypeLabel";
- case "8010":
- return "Comment_AnnotatedElementEdge";
- case "8011":
- return "Constraint_ConstrainedElementEdge";
- case "8012":
- return "DurationObservation_EventEdge";
- case "8013":
- return "TimeObservation_EventEdge";
- case "7001":
- return "Interaction_SubfragmentCompartment";
- default:
- return defaultGetNewVisualID(oldVisualID);
- }
- }
-
- private static String defaultGetNewVisualID(String oldVisualID) {
- return oldVisualID;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010, 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Noyrit (CEA) florian.noyrit@cea.fr - Initial API and Implementation
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - reconciler to add floating label
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.migration;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
+
+/**
+ * Class Diagram Reconciler from 1.1.0 to 1.2.0
+ * @since 3.0
+ */
+public class CommunicationReconciler_1_2_0 extends DiagramReconciler {
+
+ @Override
+ public ICommand getReconcileCommand(Diagram diagram) {
+ CompositeCommand cc = new CompositeCommand("Migrate diagram from 1.1.0 to 1.2.0");
+ cc.add(new ChangeVisualIDsCommand(diagram));
+ return cc;
+ }
+
+ protected class ChangeVisualIDsCommand extends AbstractCommand {
+
+ protected final Diagram diagram;
+
+ public ChangeVisualIDsCommand(Diagram diagram) {
+ super("Change the diagram's visual ids from 1.1.0 to 1.2.0");
+ this.diagram = diagram;
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ TreeIterator<EObject> allContentIterator = diagram.eAllContents();
+
+ while (allContentIterator.hasNext()) {
+ EObject eObject = allContentIterator.next();
+ if (eObject instanceof View) {
+ View view = (View) eObject;
+ view.setType(getNewVisualID(view.getType()));
+ }
+ }
+
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ public boolean canUndo() {
+ return false;
+ }
+
+ @Override
+ public boolean canRedo() {
+ return false;
+ }
+
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ throw new ExecutionException("Should not be called, canRedo false");
+ }
+
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ throw new ExecutionException("Should not be called, canUndo false");
+ }
+ }
+
+ public static String getNewVisualID(String oldVisualID) {
+ switch (oldVisualID) {
+ case "1000":
+ return "Package_CommunicationDiagram";
+ case "8001":
+ return "Lifeline_Shape";
+ case "5002":
+ return "Lifeline_NameLabel";
+ case "6014":
+ return "Lifeline_FloatingNameLabel";
+ case "8004":
+ return "Constraint_Shape";
+ case "5064":
+ return "Constraint_NameLabel";
+ case "5160":
+ return "Constraint_BodyLabel";
+ case "8005":
+ return "Comment_Shape";
+ case "5150":
+ return "Comment_BodyLabel";
+ case "8006":
+ return "TimeObservation_Shape";
+ case "5153":
+ return "TimeObservation_NameLabel";
+ case "5154":
+ return "TimeObservation_StereotypeLabel";
+ case "8007":
+ return "DurationObservation_Shape";
+ case "5155":
+ return "DurationObservation_NameLabel";
+ case "5156":
+ return "DurationObservation_StereotypeLabel";
+ case "8002":
+ return "Interaction_Shape";
+ case "5001":
+ return "Interaction_NameLabel";
+ case "6013":
+ return "Interaction_FloatingNameLabel";
+ case "8016":
+ return "Diagram_ShortcutShape";
+ case "0":
+ return "Diagram_NameLabel";
+ case "8009":
+ return "Path_Edge";
+ case "6001":
+ return "Path_MessageLabel";
+ case "6012":
+ return "Path_StereotypeLabel";
+ case "8010":
+ return "Comment_AnnotatedElementEdge";
+ case "8011":
+ return "Constraint_ConstrainedElementEdge";
+ case "8012":
+ return "DurationObservation_EventEdge";
+ case "8013":
+ return "TimeObservation_EventEdge";
+ case "7001":
+ return "Interaction_SubfragmentCompartment";
+ default:
+ return defaultGetNewVisualID(oldVisualID);
+ }
+ }
+
+ private static String defaultGetNewVisualID(String oldVisualID) {
+ return oldVisualID;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/parts/InteractionCompartmentDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/parts/InteractionCompartmentDiagramUpdater.java
index 34c18bb868b..a00a5ae072c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/parts/InteractionCompartmentDiagramUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/parts/InteractionCompartmentDiagramUpdater.java
@@ -1,143 +1,143 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.communication.custom.parts;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.part.ICustomDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.CommentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.ConstraintEditPartCN;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationEditPartCN;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.TimeObservationEditPartCN;
-import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.communication.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.PackageableElement;
-
-/**
- * @since 3.0
- */
-public class InteractionCompartmentDiagramUpdater implements ICustomDiagramUpdater<UMLNodeDescriptor> {
-
- /**
- * <pre>
- * The original generated method of {@link UMLDiagramUpdater} class is kept commented below.
- * {@inheritDoc}
- * </pre>
- */
- public List<UMLNodeDescriptor> getSemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- Interaction modelElement = (Interaction) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getLifelines().iterator(); it.hasNext();) {
- Lifeline childElement = (Lifeline) it.next();
- String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (LifelineEditPartCN.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
- String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (CommentEditPartCN.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
- String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (ConstraintEditPartCN.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- // Added ".getNearestPackage()"
- for (Iterator<?> it = modelElement.getNearestPackage().getPackagedElements().iterator(); it.hasNext();) {
- PackageableElement childElement = (PackageableElement) it.next();
- String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (TimeObservationEditPartCN.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (DurationObservationEditPartCN.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- // ----------------Original code-----------------
- //
- // if(false == view.eContainer() instanceof View) {
- // return Collections.emptyList();
- // }
- // View containerView = (View)view.eContainer();
- // if(!containerView.isSetElement()) {
- // return Collections.emptyList();
- // }
- // Interaction modelElement = (Interaction)containerView.getElement();
- // LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- // for(Iterator<?> it = modelElement.getLifelines().iterator(); it.hasNext();) {
- // Lifeline childElement = (Lifeline)it.next();
- // int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- // if(visualID == LifelineEditPartCN.VISUAL_ID) {
- // result.add(new UMLNodeDescriptor(childElement, visualID));
- // continue;
- // }
- // }
- // for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
- // Comment childElement = (Comment)it.next();
- // int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- // if(visualID == CommentEditPartCN.VISUAL_ID) {
- // result.add(new UMLNodeDescriptor(childElement, visualID));
- // continue;
- // }
- // }
- // for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
- // Constraint childElement = (Constraint)it.next();
- // int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- // if(visualID == ConstraintEditPartCN.VISUAL_ID) {
- // result.add(new UMLNodeDescriptor(childElement, visualID));
- // continue;
- // }
- // }
- // for(Iterator<?> it = modelElement.getPackagedElements().iterator(); it.hasNext();) {
- // PackageableElement childElement = (PackageableElement)it.next();
- // int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- // if(visualID == TimeObservationEditPartCN.VISUAL_ID) {
- // result.add(new UMLNodeDescriptor(childElement, visualID));
- // continue;
- // }
- // if(visualID == DurationObservationEditPartCN.VISUAL_ID) {
- // result.add(new UMLNodeDescriptor(childElement, visualID));
- // continue;
- // }
- // }
- // return result;
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.communication.custom.parts;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.part.ICustomDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationEditPartCN;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.TimeObservationEditPartCN;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLNodeDescriptor;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.PackageableElement;
+
+/**
+ * @since 3.0
+ */
+public class InteractionCompartmentDiagramUpdater implements ICustomDiagramUpdater<UMLNodeDescriptor> {
+
+ /**
+ * <pre>
+ * The original generated method of {@link UMLDiagramUpdater} class is kept commented below.
+ * {@inheritDoc}
+ * </pre>
+ */
+ public List<UMLNodeDescriptor> getSemanticChildren(View view) {
+ if (false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View) view.eContainer();
+ if (!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Interaction modelElement = (Interaction) containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for (Iterator<?> it = modelElement.getLifelines().iterator(); it.hasNext();) {
+ Lifeline childElement = (Lifeline) it.next();
+ String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (LifelineEditPartCN.VISUAL_ID.equals(visualID)) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ Comment childElement = (Comment) it.next();
+ String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (CommentEditPartCN.VISUAL_ID.equals(visualID)) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint) it.next();
+ String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (ConstraintEditPartCN.VISUAL_ID.equals(visualID)) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ // Added ".getNearestPackage()"
+ for (Iterator<?> it = modelElement.getNearestPackage().getPackagedElements().iterator(); it.hasNext();) {
+ PackageableElement childElement = (PackageableElement) it.next();
+ String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (TimeObservationEditPartCN.VISUAL_ID.equals(visualID)) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (DurationObservationEditPartCN.VISUAL_ID.equals(visualID)) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ // ----------------Original code-----------------
+ //
+ // if(false == view.eContainer() instanceof View) {
+ // return Collections.emptyList();
+ // }
+ // View containerView = (View)view.eContainer();
+ // if(!containerView.isSetElement()) {
+ // return Collections.emptyList();
+ // }
+ // Interaction modelElement = (Interaction)containerView.getElement();
+ // LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ // for(Iterator<?> it = modelElement.getLifelines().iterator(); it.hasNext();) {
+ // Lifeline childElement = (Lifeline)it.next();
+ // int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ // if(visualID == LifelineEditPartCN.VISUAL_ID) {
+ // result.add(new UMLNodeDescriptor(childElement, visualID));
+ // continue;
+ // }
+ // }
+ // for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
+ // Comment childElement = (Comment)it.next();
+ // int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ // if(visualID == CommentEditPartCN.VISUAL_ID) {
+ // result.add(new UMLNodeDescriptor(childElement, visualID));
+ // continue;
+ // }
+ // }
+ // for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
+ // Constraint childElement = (Constraint)it.next();
+ // int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ // if(visualID == ConstraintEditPartCN.VISUAL_ID) {
+ // result.add(new UMLNodeDescriptor(childElement, visualID));
+ // continue;
+ // }
+ // }
+ // for(Iterator<?> it = modelElement.getPackagedElements().iterator(); it.hasNext();) {
+ // PackageableElement childElement = (PackageableElement)it.next();
+ // int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ // if(visualID == TimeObservationEditPartCN.VISUAL_ID) {
+ // result.add(new UMLNodeDescriptor(childElement, visualID));
+ // continue;
+ // }
+ // if(visualID == DurationObservationEditPartCN.VISUAL_ID) {
+ // result.add(new UMLNodeDescriptor(childElement, visualID));
+ // continue;
+ // }
+ // }
+ // return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/providers/CustomUMLEditPartProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/providers/CustomUMLEditPartProvider.java
index da6014f9a2f..4d871793bb6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/providers/CustomUMLEditPartProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/providers/CustomUMLEditPartProvider.java
@@ -1,32 +1,32 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Adapted code from the class diagram
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication.custom.providers;
-
-import org.eclipse.papyrus.uml.diagram.communication.custom.factory.CustomUMLeditPartFactory;
-
-/**
- * Custom EditPartProvider, to use our own UMLEditPartFactory
- */
-public class CustomUMLEditPartProvider extends org.eclipse.papyrus.uml.diagram.communication.providers.UMLEditPartProvider {
-
- /**
- *
- * Constructor.
- *
- */
- public CustomUMLEditPartProvider() {
- setFactory(new CustomUMLeditPartFactory());
- setAllowCaching(true);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Adapted code from the class diagram
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.providers;
+
+import org.eclipse.papyrus.uml.diagram.communication.custom.factory.CustomUMLeditPartFactory;
+
+/**
+ * Custom EditPartProvider, to use our own UMLEditPartFactory
+ */
+public class CustomUMLEditPartProvider extends org.eclipse.papyrus.uml.diagram.communication.providers.UMLEditPartProvider {
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public CustomUMLEditPartProvider() {
+ setFactory(new CustomUMLeditPartFactory());
+ setAllowCaching(true);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/icons/alt_launcher.xpm b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/icons/alt_launcher.xpm
index b0c139e0633..0ff90332a72 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/icons/alt_launcher.xpm
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/icons/alt_launcher.xpm
@@ -1,307 +1,307 @@
-/* XPM */
-static char * icon48_xpm[] = {
-"48 48 256 2",
-" c #4B4B3B3B9090",
-". c #0D0D0E0E5454",
-"X c #11110E0E5B5B",
-"o c #17170F0F6363",
-"O c #1D1D13136969",
-"+ c #212114146C6C",
-"@ c #252514147171",
-"# c #282811116C6C",
-"$ c #26260D0D6363",
-"% c #22220B0B5E5E",
-"& c #1C1C0B0B5A5A",
-"* c #1C1C0B0B5252",
-"= c #1B1B05055353",
-"- c #161606064D4D",
-"; c #161605054949",
-": c #111104044848",
-"> c #131304044545",
-", c #131305054242",
-"< c #141410105E5E",
-"1 c #2C2C15157373",
-"2 c #2B2B1B1B7575",
-"3 c #343416167272",
-"4 c #313113136E6E",
-"5 c #222209095757",
-"6 c #1B1B06064D4D",
-"7 c #15150B0B4242",
-"8 c #13130C0C5555",
-"9 c #2E2E1B1B7878",
-"0 c #33331F1F7C7C",
-"q c #343418187878",
-"w c #3B3B1C1C7575",
-"e c #2E2E10106767",
-"r c #1B1B07074747",
-"t c #18180B0B4646",
-"y c #151513136262",
-"u c #1A1A15156464",
-"i c #34341F1F7777",
-"p c #40401E1E8080",
-"a c #42421B1B7A7A",
-"s c #3B3B15157474",
-"d c #2B2B0B0B5B5B",
-"f c #222207075252",
-"g c #373727277A7A",
-"h c #474724248484",
-"j c #393915156E6E",
-"k c #373711116A6A",
-"l c #343413136363",
-"z c #232319196E6E",
-"x c #292919197070",
-"c c #3C3C2C2C8282",
-"v c #444431318585",
-"b c #494934348A8A",
-"n c #505026268A8A",
-"m c #3D3D1B1B6E6E",
-"M c #31310E0E5C5C",
-"N c #2B2B0D0D5353",
-"B c #222207074A4A",
-"V c #52523C3C9292",
-"C c #58583C3C9494",
-"Z c #5D5D44449797",
-"A c #5C5C2E2E9292",
-"S c #676733339595",
-"D c #424228287575",
-"F c #29290A0A4F4F",
-"G c #6C6C4A4A9E9E",
-"H c #72725454A7A7",
-"J c #8C8C6D6DB2B2",
-"K c #343424246E6E",
-"L c #3A3A23236A6A",
-"P c #3A3A1C1C6767",
-"I c #24240A0A4B4B",
-"U c #151518186161",
-"Y c #76766F6FA5A5",
-"T c #ADAD9191CCCC",
-"R c #98988989D3D3",
-"E c #45453B3B8686",
-"W c #3C3C35357979",
-"Q c #363631317575",
-"! c #32322D2D6B6B",
-"~ c #323229296363",
-"^ c #30301F1F6262",
-"/ c #323218185E5E",
-"( c #272707074B4B",
-") c #202028286C6C",
-"_ c #1E1E1D1D6868",
-"` c #9A9A8282BBBB",
-"' c #C8C8B3B3D3D3",
-"] c #B3B3AFAFE7E7",
-"[ c #84847272C6C6",
-"{ c #58585757A3A3",
-"} c #3F3F3C3C8A8A",
-"| c #3B3B3A3A8484",
-" . c #414139397D7D",
-".. c #3D3D39397A7A",
-"X. c #37372E2E6E6E",
-"o. c #2C2C21215A5A",
-"O. c #2E2E1B1B5B5B",
-"+. c #F5F5EFEFF5F5",
-"@. c #656566669A9A",
-"#. c #47474B4B8E8E",
-"$. c #3C3C44447B7B",
-"%. c #444442428080",
-"&. c #45453E3E8181",
-"*. c #40403C3C8181",
-"=. c #3D3D33337474",
-"-. c #3B3B30306E6E",
-";. c #38382D2D6969",
-":. c #303026265D5D",
-">. c #2C2C15155A5A",
-",. c #1F1F1C1C7070",
-"<. c #25251E1E7171",
-"1. c #59595C5C9191",
-"2. c #4D4D53538989",
-"3. c #4C4C49498484",
-"4. c #484845458585",
-"5. c #494941418585",
-"6. c #494940408181",
-"7. c #2F2F1C1C5353",
-"8. c #2B2B28287676",
-"9. c #323231317F7F",
-"0. c #545452528B8B",
-"q. c #51514E4E8989",
-"w. c #4E4E4B4B8C8C",
-"e. c #4C4C47478686",
-"r. c #46463D3D7E7E",
-"t. c #434336367A7A",
-"y. c #2B2B13135555",
-"u. c #47473D3D8D8D",
-"i. c #575757578E8E",
-"p. c #48483E3E7F7F",
-"a. c #46463A3A7D7D",
-"s. c #424235357575",
-"d. c #404034347171",
-"f. c #BFBFCBCBFAFA",
-"g. c #B8B8A8A8DDDD",
-"h. c #5E5E60609292",
-"j. c #565655558C8C",
-"k. c #4B4B44448282",
-"l. c #454539397B7B",
-"z. c #434338387878",
-"x. c #3F3F32326D6D",
-"c. c #3D3D30306969",
-"v. c #3A3A2E2E6363",
-"b. c #36362A2A5C5C",
-"n. c #343424245555",
-"m. c #30301E1E4D4D",
-"M. c #49493C3C8282",
-"N. c #5E5E4F4F8C8C",
-"B. c #56563B3B8B8B",
-"V. c #545407078585",
-"C. c #424234347272",
-"Z. c #9797A4A4F7F7",
-"A. c #444436367676",
-"S. c #7D7D7979D5D5",
-"D. c #464640408A8A",
-"F. c #44444B4B8282",
-"G. c #414107077777",
-"H. c #71716161C1C1",
-"J. c #303039397979",
-"K. c #8E8E8E8EE6E6",
-"L. c #404033338B8B",
-"P. c #4A4A45458C8C",
-"I. c #46463A3A8080",
-"U. c #363629295454",
-"Y. c #303022224848",
-"T. c #424237377575",
-"R. c #2E2E1D1D6363",
-"E. c #79798383EAEA",
-"W. c #74747B7BE4E4",
-"Q. c #6D6D7676D6D6",
-"!. c #6A6A7171CECE",
-"~. c #66666969C6C6",
-"^. c #62626565BCBC",
-"/. c #5F5F6060B5B5",
-"(. c #5B5B5B5BACAC",
-"). c #535353539898",
-"_. c #4F4F4F4FA4A4",
-"`. c #54544D4DA4A4",
-"'. c #323204046B6B",
-"]. c #303035357979",
-"[. c #313122224343",
-"{. c #5A5A5B5BB7B7",
-"}. c #484846468080",
-"|. c #454541417575",
-" X c #4B4B31318282",
-".X c #47473C3C8484",
-"XX c #3E3E35356E6E",
-"oX c #2F2F26264040",
-"OX c #2B2B23233A3A",
-"+X c #262619195C5C",
-"@X c #252515155A5A",
-"#X c #55555151B3B3",
-"$X c #3C3C2D2D5D5D",
-"%X c #39392F2F5656",
-"&X c #37372D2D5050",
-"*X c #25251F1F3030",
-"=X c #24241D1D4343",
-"-X c #202013135656",
-";X c #41413B3B6C6C",
-":X c #444442429696",
-">X c #212100005E5E",
-",X c #444436367272",
-"<X c #444436366F6F",
-"1X c #424236366868",
-"2X c #3F3F34346161",
-"3X c #3C3C32325A5A",
-"4X c #34342A2A4A4A",
-"5X c #21211B1B2121",
-"6X c #22221C1C6363",
-"7X c #2D2D01015E5E",
-"8X c #20201B1B2525",
-"9X c #49492F2F7B7B",
-"0X c #434334346C6C",
-"qX c #323229294545",
-"wX c #1C1C10104F4F",
-"eX c #222217176363",
-"rX c #37371E1E6B6B",
-"tX c #424232326E6E",
-"yX c #444433336969",
-"uX c #424233336565",
-"iX c #1E1E1A1A1E1E",
-"pX c #161601014C4C",
-"aX c #1C1C11115454",
-"sX c #252503035B5B",
-"dX c #414131316A6A",
-"fX c #22221F1F7878",
-"gX c #272724246767",
-"hX c #1D1D16165E5E",
-"jX c #131305055151",
-"kX c #40402F2F6464",
-"lX c #111107074E4E",
-"zX c #0C0C05054B4B",
-"xX c #22221E1E5757",
-"cX c #1A1A0D0D4D4D",
-"vX c #16160B0B4D4D",
-"bX c #060604044747",
-"nX c #040403034343",
-"mX c #3B3B27276565",
-"MX c #0E0E03034141",
-"NX c #111106064A4A",
-"BX c #0E0E04044646",
-"VX c #111105053B3B",
-"CX c #0D0D01013A3A",
-"ZX c #030305053F3F",
-"AX c #0F0F0F0F4C4C",
-"SX c #020207073B3B",
-"DX c #0D0D03034646",
-"FX c #0B0B02023F3F",
-"GX c #0D0D02023434",
-"HX c #0A0A0E0E4444",
-"JX c #161614145252",
-"KX c #0B0B04044646",
-"LX c #0A0A03034444",
-"PX c #1D1D21215757",
-"IX c #090910104040",
-"UX c #18181E1E5353",
-" ",
-" . . . . X X o o o o O + + @ @ @ @ @ @ @ # # # # # # $ $ % % & & & & * = - - - ; : > > , , , ",
-" . . X X < < o o O O + @ 1 2 2 1 1 1 1 1 1 1 1 3 4 # # $ $ $ % % % 5 = = 6 6 - ; ; > > , , 7 ",
-" . 8 < < < o O O + @ @ 2 9 9 0 0 q q q q q q q w 3 4 4 e e $ $ $ $ % 5 = = 6 6 6 ; ; > > r t ",
-" . X < y u O O + @ 1 2 i 0 0 p p p p p p p a a p a s 3 4 4 e e e e d 5 5 f f 6 6 6 ; ; r r t ",
-" X < y u O + + @ 2 9 0 g p p h h h h h h h p h h a a s s j k k j l d d 5 5 f f 6 6 r r r r r ",
-" X < y O z x x 9 0 g c v b n n n n n n n n n n n h a a s s j j m l M d d N f f B B B B r r r ",
-" < y u + z 2 0 c c b V C Z C C A A A A A S S S n h D w w m m m m k l M d d N f F F F B r r r ",
-" < y O z z 9 c b V Z G H H H G S G G J J H V v c g g K K K K L P l l l M M N N N N I B B r r ",
-" U u + z x i v C H Y J J J J H J T R H V E W W Q Q Q Q ! ! ! ~ ^ ^ / / M M M M M N ( B B r r ",
-" ) _ z x 9 g b Z Y ` ' ' ' T T ] [ { } | .........W W Q Q X.! ~ ~ o.O./ / / / N F ( B B B r ",
-" ) ) z x i c V G J ' +.+.+.+.] [ @.#.$.%.%.%.&.*. . .....W =.-.X.;.~ :.o.O.^ >.N F ( B B B B ",
-" ) ,.<.2 g v C H J ' +.+.+.+.T Y 1.2.3.4.4.4.5.6.&.&. . ...W =.=.-.;.~ :.o.7.>.N F F ( B I I ",
-" ) ,.<.8.9.b C H J T +.+.+.' J @.1.0.q.q.w.e.4.5.6.&.r. . .t.W =.=.-.;.~ :.o.7.y.N F ( ( I I ",
-" 8.8.8.9.| u.C G J T +.+.' ` Y @.1.i.0.q.q.e.e.5.6.p.r.a. .t.t.s.d.d.-.;.~ :.7.7.y.F F ( I I ",
-" 9.c c c v b A S H ' f.g.` Y @.h.1.i.j.0.q.q.e.k.6.p.r.a.l.t.z.s.s.d.x.c.v.b.n.m.7.N F F F I ",
-" <.g M.N.B.B.n V.J f.R J @.h.h.1.i.i.j.j.0.q.3.k.6.p.r.a.l.l.z.s.C.d.x.x.c.v.b.n.m.y.N F F F ",
-" + x i v B.Z Z G g.Z.[ @.2.i.i.j.j.j.j.j.0.q.3.k.6.p.p.a.l.l.A.s.C.C.d.x.c.v.b.n.m.7.y.N N y. ",
-" O # 3 w p n Z ` f.S.H D.F.q.0.0.0.0.j.0.q.q.3.k.6.p.r.a.a.l.A.s.s.C.d.x.x.c.v.b.n.m.y.y.y.y. ",
-" O # 4 s a G.V.T Z.H.V J.%.e.w.q.0.0.0.0.q.q.e.k.6.p.r.a.a.l.z.A.s.C.d.d.x.c.v.b.n.m.7.>.y.y. ",
-" O # 4 s w G.A f.K.H L...4.P.w.w.w.q.q.q.q.e.e.5.6.M.I.I.a.a.l.z.A.s.d.d.x.c.v.v.U.Y.7.O.>.y. ",
-" $ # 4 3 s G.G f.S.Z 9.*.D.P.P.w.w.w.w.w.e.e.5.5.M.M.I.I.a.a.l.z.T.s.d.d.x.x.c.v.U.Y.m.R.>.>. ",
-" E.E.W.W.W.W.E.Z.E.W.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.!.!.!.!.!.~.~.~.~.~.~.^.^.^.^.^./././.(.{ { )._.`._. ",
-" + # 3 w s '.` f.H.V ].*.D.P.P.P.P.P.P.P.5.5.5.M.M.M.I.I.a.l.z.z.T.T.s.d.d.x.c.v.U.Y.[.^ O.>. ",
-" ~.~.~.~.~.~.K.Z.S.~.{.^.^.^.^.^.^.^.^././././././.(.(.(.(.(.(.{ { { { { ).).).w.w.}.|.P.u.} ",
-" .I.6. X X XT f.H.b ].*.E D.D.D.D.5.5..X.XM.M.I.I.a.a.l.l.z.z.T.T.T.d.XXx.c.v.b.U.oXOXR.+X@X ",
-" E.E.E.W.W.W.K.Z.E.W.Q.Q.Q.Q.Q.Q.Q.Q.!.!.!.!.!.!.~.~.~.~.~.~.^.^.^.^.^./././.(.{ { ).).#X_._. ",
-" & % $ e '.= H f.H.b 8.W *.E E E .X.X.XI.I.I.I.a.a.l.l.z.z.T.T.T.C.XXXXc.v.$X%X&XY.*X=X2 @X-X ",
-" {.{.{.{.{.#X~.Z.W.~.{.{./././././././././.(.(.(.(.(.(.(.{ { { { { { ).).).w.w.3.}.;X%.:X} } ",
-" & & % $ e >XV.f.S.C K X.W t. . .l.l.t.t.t.t.A.A.A.,X,X,X,X,X<X;X1X1X2X3X%X&X4XoX*X5Xo.6X-X-X ",
-" & & % $ $ >X7X` Z.Z D ! =.=.s.t.t.t.A.A.s.A.,X,X,X,X<X<X<X<X;X1X2X2X3X%X&X4XoXOX8X5X<.@X-X-X ",
-" 8 & & $ e K 9XJ f.^. XK X.=.=.s.s.s.s.s.C.C.C.C.<X0X0X0X1X1X1X2X2X3X%X&X4XqXOX*X8X=X<.-X-XwX ",
-" 8 & eXK k.@.M. Xg.E.B.rX~ -.d.d.C.C.C.C.C.tX0X0X0XyXyX1X1XuX2X2X3X%X&X4XqXoXOX8XiX6XeX-X-XwX ",
-" 6XQ h.Y N.K e pXB.f./.9Xo.;.-.x.d.tXtXtXtXtX0X0XyXyXyXuXuX2X2X3X%X&X4XqXoXOX*XiX=X_ aX-XaXwX ",
-" Y Y .R.@X% sX= 7XT Z.V P :.;.c.x.x.x.tXdXdXdXyXyXuXuX2X2X3X3X%X&X4XqXoXOX*X8X*XfXaXaXaXwXwX ",
-" gXhX& * & 5 5 sXjXa ] S.9X/ ~ v.c.dXdXdXdXdXuXuXuXkX2X2X3X%X%X&X4XqXoXOX*X8XiX<.hXwXwXaXwXwX ",
-" 8 lXlXjX= * 5 5 = zX9X] H.D 7.b.v.v.kXc.kXkXkXkXkX2X$X3X%X&X&X4XqXoXOX*X8XiXxXhXwXcXcXwXwXwX ",
-" zXzXlXlXjX= = f f sXD Y ] ~.D 7.n.b.v.v.kXkXkXkX$X$X%X%X&X4XqXoXoXOX*X8X5XgXu cXvXvXcXcXwXwX ",
-" bXbXzXlXlX- = * @XX.h.e D T S.D n.m.b.$X$X$X$X$X%X%X&X&X4XqXoXOX*X8X8X*X<.hXvX; ; vXvXvXcXwX ",
-" nXbXzXzXlXlX- -XX.Y R.pXpXP J K.Z mXm.n.U.U.U.U.U.4X4XY.oXOX*X8X8X8X=X,.aXvX; > > > t t t cX ",
-" nXbXbXzXzXlXaXXXY +Xf = f = 7XtXR R mXn.Y.[.[.[.[.OX*X*X8X5X*X=X,.u vXvX; > > MXMX, 7 t t ",
-" nXnXnXbXzXvX-.Y +XcX6 6 = = = d L B.G H `.X.:.7.m.=X=X=X=X=X6X,.u cXvXNX: BX> MXVXCXVX7 7 7 ",
-" ZXZXnXbXAXgX@.+XvX; - - - - * @XR.>.sX>.R.i 0 x eXeXeXeXO hXaXcXvXNX: BXMXMXMXVXCXCXCXVX7 7 ",
-" SXZXZXAXgXN.aXNX: : NXNXNX- * +X+X* 6 6 6 * * * * * * * vXvX- NX: DXBXMXMXFXCXCXCXCXGXVXVX7 ",
-" SXSXHXgX0.JXKXLXKXKXDX: : NX* @X-X- - - - - - - - - - - NX: DXDXDXMXMXFXFXCXCXCXCXGXGXGXVXVX ",
-" SXHXPX3.JXnXnXnXnXbXLXKXKXNXaX-XvX: : NX: : : : : : : BXDXDXLXMXMXFXFXCXCXCXCXGXGXGXGXGXGXGX ",
-" IXUX$.AXZXZXZXZXnXnXnXLXLXNXJXvXBXDXBXBXBXBXDXDXDXDXLXDXLXLXFXFXFXFXCXCXCXCXGXGXGXGXGXGXGXGX ",
-" "};
+/* XPM */
+static char * icon48_xpm[] = {
+"48 48 256 2",
+" c #4B4B3B3B9090",
+". c #0D0D0E0E5454",
+"X c #11110E0E5B5B",
+"o c #17170F0F6363",
+"O c #1D1D13136969",
+"+ c #212114146C6C",
+"@ c #252514147171",
+"# c #282811116C6C",
+"$ c #26260D0D6363",
+"% c #22220B0B5E5E",
+"& c #1C1C0B0B5A5A",
+"* c #1C1C0B0B5252",
+"= c #1B1B05055353",
+"- c #161606064D4D",
+"; c #161605054949",
+": c #111104044848",
+"> c #131304044545",
+", c #131305054242",
+"< c #141410105E5E",
+"1 c #2C2C15157373",
+"2 c #2B2B1B1B7575",
+"3 c #343416167272",
+"4 c #313113136E6E",
+"5 c #222209095757",
+"6 c #1B1B06064D4D",
+"7 c #15150B0B4242",
+"8 c #13130C0C5555",
+"9 c #2E2E1B1B7878",
+"0 c #33331F1F7C7C",
+"q c #343418187878",
+"w c #3B3B1C1C7575",
+"e c #2E2E10106767",
+"r c #1B1B07074747",
+"t c #18180B0B4646",
+"y c #151513136262",
+"u c #1A1A15156464",
+"i c #34341F1F7777",
+"p c #40401E1E8080",
+"a c #42421B1B7A7A",
+"s c #3B3B15157474",
+"d c #2B2B0B0B5B5B",
+"f c #222207075252",
+"g c #373727277A7A",
+"h c #474724248484",
+"j c #393915156E6E",
+"k c #373711116A6A",
+"l c #343413136363",
+"z c #232319196E6E",
+"x c #292919197070",
+"c c #3C3C2C2C8282",
+"v c #444431318585",
+"b c #494934348A8A",
+"n c #505026268A8A",
+"m c #3D3D1B1B6E6E",
+"M c #31310E0E5C5C",
+"N c #2B2B0D0D5353",
+"B c #222207074A4A",
+"V c #52523C3C9292",
+"C c #58583C3C9494",
+"Z c #5D5D44449797",
+"A c #5C5C2E2E9292",
+"S c #676733339595",
+"D c #424228287575",
+"F c #29290A0A4F4F",
+"G c #6C6C4A4A9E9E",
+"H c #72725454A7A7",
+"J c #8C8C6D6DB2B2",
+"K c #343424246E6E",
+"L c #3A3A23236A6A",
+"P c #3A3A1C1C6767",
+"I c #24240A0A4B4B",
+"U c #151518186161",
+"Y c #76766F6FA5A5",
+"T c #ADAD9191CCCC",
+"R c #98988989D3D3",
+"E c #45453B3B8686",
+"W c #3C3C35357979",
+"Q c #363631317575",
+"! c #32322D2D6B6B",
+"~ c #323229296363",
+"^ c #30301F1F6262",
+"/ c #323218185E5E",
+"( c #272707074B4B",
+") c #202028286C6C",
+"_ c #1E1E1D1D6868",
+"` c #9A9A8282BBBB",
+"' c #C8C8B3B3D3D3",
+"] c #B3B3AFAFE7E7",
+"[ c #84847272C6C6",
+"{ c #58585757A3A3",
+"} c #3F3F3C3C8A8A",
+"| c #3B3B3A3A8484",
+" . c #414139397D7D",
+".. c #3D3D39397A7A",
+"X. c #37372E2E6E6E",
+"o. c #2C2C21215A5A",
+"O. c #2E2E1B1B5B5B",
+"+. c #F5F5EFEFF5F5",
+"@. c #656566669A9A",
+"#. c #47474B4B8E8E",
+"$. c #3C3C44447B7B",
+"%. c #444442428080",
+"&. c #45453E3E8181",
+"*. c #40403C3C8181",
+"=. c #3D3D33337474",
+"-. c #3B3B30306E6E",
+";. c #38382D2D6969",
+":. c #303026265D5D",
+">. c #2C2C15155A5A",
+",. c #1F1F1C1C7070",
+"<. c #25251E1E7171",
+"1. c #59595C5C9191",
+"2. c #4D4D53538989",
+"3. c #4C4C49498484",
+"4. c #484845458585",
+"5. c #494941418585",
+"6. c #494940408181",
+"7. c #2F2F1C1C5353",
+"8. c #2B2B28287676",
+"9. c #323231317F7F",
+"0. c #545452528B8B",
+"q. c #51514E4E8989",
+"w. c #4E4E4B4B8C8C",
+"e. c #4C4C47478686",
+"r. c #46463D3D7E7E",
+"t. c #434336367A7A",
+"y. c #2B2B13135555",
+"u. c #47473D3D8D8D",
+"i. c #575757578E8E",
+"p. c #48483E3E7F7F",
+"a. c #46463A3A7D7D",
+"s. c #424235357575",
+"d. c #404034347171",
+"f. c #BFBFCBCBFAFA",
+"g. c #B8B8A8A8DDDD",
+"h. c #5E5E60609292",
+"j. c #565655558C8C",
+"k. c #4B4B44448282",
+"l. c #454539397B7B",
+"z. c #434338387878",
+"x. c #3F3F32326D6D",
+"c. c #3D3D30306969",
+"v. c #3A3A2E2E6363",
+"b. c #36362A2A5C5C",
+"n. c #343424245555",
+"m. c #30301E1E4D4D",
+"M. c #49493C3C8282",
+"N. c #5E5E4F4F8C8C",
+"B. c #56563B3B8B8B",
+"V. c #545407078585",
+"C. c #424234347272",
+"Z. c #9797A4A4F7F7",
+"A. c #444436367676",
+"S. c #7D7D7979D5D5",
+"D. c #464640408A8A",
+"F. c #44444B4B8282",
+"G. c #414107077777",
+"H. c #71716161C1C1",
+"J. c #303039397979",
+"K. c #8E8E8E8EE6E6",
+"L. c #404033338B8B",
+"P. c #4A4A45458C8C",
+"I. c #46463A3A8080",
+"U. c #363629295454",
+"Y. c #303022224848",
+"T. c #424237377575",
+"R. c #2E2E1D1D6363",
+"E. c #79798383EAEA",
+"W. c #74747B7BE4E4",
+"Q. c #6D6D7676D6D6",
+"!. c #6A6A7171CECE",
+"~. c #66666969C6C6",
+"^. c #62626565BCBC",
+"/. c #5F5F6060B5B5",
+"(. c #5B5B5B5BACAC",
+"). c #535353539898",
+"_. c #4F4F4F4FA4A4",
+"`. c #54544D4DA4A4",
+"'. c #323204046B6B",
+"]. c #303035357979",
+"[. c #313122224343",
+"{. c #5A5A5B5BB7B7",
+"}. c #484846468080",
+"|. c #454541417575",
+" X c #4B4B31318282",
+".X c #47473C3C8484",
+"XX c #3E3E35356E6E",
+"oX c #2F2F26264040",
+"OX c #2B2B23233A3A",
+"+X c #262619195C5C",
+"@X c #252515155A5A",
+"#X c #55555151B3B3",
+"$X c #3C3C2D2D5D5D",
+"%X c #39392F2F5656",
+"&X c #37372D2D5050",
+"*X c #25251F1F3030",
+"=X c #24241D1D4343",
+"-X c #202013135656",
+";X c #41413B3B6C6C",
+":X c #444442429696",
+">X c #212100005E5E",
+",X c #444436367272",
+"<X c #444436366F6F",
+"1X c #424236366868",
+"2X c #3F3F34346161",
+"3X c #3C3C32325A5A",
+"4X c #34342A2A4A4A",
+"5X c #21211B1B2121",
+"6X c #22221C1C6363",
+"7X c #2D2D01015E5E",
+"8X c #20201B1B2525",
+"9X c #49492F2F7B7B",
+"0X c #434334346C6C",
+"qX c #323229294545",
+"wX c #1C1C10104F4F",
+"eX c #222217176363",
+"rX c #37371E1E6B6B",
+"tX c #424232326E6E",
+"yX c #444433336969",
+"uX c #424233336565",
+"iX c #1E1E1A1A1E1E",
+"pX c #161601014C4C",
+"aX c #1C1C11115454",
+"sX c #252503035B5B",
+"dX c #414131316A6A",
+"fX c #22221F1F7878",
+"gX c #272724246767",
+"hX c #1D1D16165E5E",
+"jX c #131305055151",
+"kX c #40402F2F6464",
+"lX c #111107074E4E",
+"zX c #0C0C05054B4B",
+"xX c #22221E1E5757",
+"cX c #1A1A0D0D4D4D",
+"vX c #16160B0B4D4D",
+"bX c #060604044747",
+"nX c #040403034343",
+"mX c #3B3B27276565",
+"MX c #0E0E03034141",
+"NX c #111106064A4A",
+"BX c #0E0E04044646",
+"VX c #111105053B3B",
+"CX c #0D0D01013A3A",
+"ZX c #030305053F3F",
+"AX c #0F0F0F0F4C4C",
+"SX c #020207073B3B",
+"DX c #0D0D03034646",
+"FX c #0B0B02023F3F",
+"GX c #0D0D02023434",
+"HX c #0A0A0E0E4444",
+"JX c #161614145252",
+"KX c #0B0B04044646",
+"LX c #0A0A03034444",
+"PX c #1D1D21215757",
+"IX c #090910104040",
+"UX c #18181E1E5353",
+" ",
+" . . . . X X o o o o O + + @ @ @ @ @ @ @ # # # # # # $ $ % % & & & & * = - - - ; : > > , , , ",
+" . . X X < < o o O O + @ 1 2 2 1 1 1 1 1 1 1 1 3 4 # # $ $ $ % % % 5 = = 6 6 - ; ; > > , , 7 ",
+" . 8 < < < o O O + @ @ 2 9 9 0 0 q q q q q q q w 3 4 4 e e $ $ $ $ % 5 = = 6 6 6 ; ; > > r t ",
+" . X < y u O O + @ 1 2 i 0 0 p p p p p p p a a p a s 3 4 4 e e e e d 5 5 f f 6 6 6 ; ; r r t ",
+" X < y u O + + @ 2 9 0 g p p h h h h h h h p h h a a s s j k k j l d d 5 5 f f 6 6 r r r r r ",
+" X < y O z x x 9 0 g c v b n n n n n n n n n n n h a a s s j j m l M d d N f f B B B B r r r ",
+" < y u + z 2 0 c c b V C Z C C A A A A A S S S n h D w w m m m m k l M d d N f F F F B r r r ",
+" < y O z z 9 c b V Z G H H H G S G G J J H V v c g g K K K K L P l l l M M N N N N I B B r r ",
+" U u + z x i v C H Y J J J J H J T R H V E W W Q Q Q Q ! ! ! ~ ^ ^ / / M M M M M N ( B B r r ",
+" ) _ z x 9 g b Z Y ` ' ' ' T T ] [ { } | .........W W Q Q X.! ~ ~ o.O./ / / / N F ( B B B r ",
+" ) ) z x i c V G J ' +.+.+.+.] [ @.#.$.%.%.%.&.*. . .....W =.-.X.;.~ :.o.O.^ >.N F ( B B B B ",
+" ) ,.<.2 g v C H J ' +.+.+.+.T Y 1.2.3.4.4.4.5.6.&.&. . ...W =.=.-.;.~ :.o.7.>.N F F ( B I I ",
+" ) ,.<.8.9.b C H J T +.+.+.' J @.1.0.q.q.w.e.4.5.6.&.r. . .t.W =.=.-.;.~ :.o.7.y.N F ( ( I I ",
+" 8.8.8.9.| u.C G J T +.+.' ` Y @.1.i.0.q.q.e.e.5.6.p.r.a. .t.t.s.d.d.-.;.~ :.7.7.y.F F ( I I ",
+" 9.c c c v b A S H ' f.g.` Y @.h.1.i.j.0.q.q.e.k.6.p.r.a.l.t.z.s.s.d.x.c.v.b.n.m.7.N F F F I ",
+" <.g M.N.B.B.n V.J f.R J @.h.h.1.i.i.j.j.0.q.3.k.6.p.r.a.l.l.z.s.C.d.x.x.c.v.b.n.m.y.N F F F ",
+" + x i v B.Z Z G g.Z.[ @.2.i.i.j.j.j.j.j.0.q.3.k.6.p.p.a.l.l.A.s.C.C.d.x.c.v.b.n.m.7.y.N N y. ",
+" O # 3 w p n Z ` f.S.H D.F.q.0.0.0.0.j.0.q.q.3.k.6.p.r.a.a.l.A.s.s.C.d.x.x.c.v.b.n.m.y.y.y.y. ",
+" O # 4 s a G.V.T Z.H.V J.%.e.w.q.0.0.0.0.q.q.e.k.6.p.r.a.a.l.z.A.s.C.d.d.x.c.v.b.n.m.7.>.y.y. ",
+" O # 4 s w G.A f.K.H L...4.P.w.w.w.q.q.q.q.e.e.5.6.M.I.I.a.a.l.z.A.s.d.d.x.c.v.v.U.Y.7.O.>.y. ",
+" $ # 4 3 s G.G f.S.Z 9.*.D.P.P.w.w.w.w.w.e.e.5.5.M.M.I.I.a.a.l.z.T.s.d.d.x.x.c.v.U.Y.m.R.>.>. ",
+" E.E.W.W.W.W.E.Z.E.W.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.!.!.!.!.!.~.~.~.~.~.~.^.^.^.^.^./././.(.{ { )._.`._. ",
+" + # 3 w s '.` f.H.V ].*.D.P.P.P.P.P.P.P.5.5.5.M.M.M.I.I.a.l.z.z.T.T.s.d.d.x.c.v.U.Y.[.^ O.>. ",
+" ~.~.~.~.~.~.K.Z.S.~.{.^.^.^.^.^.^.^.^././././././.(.(.(.(.(.(.{ { { { { ).).).w.w.}.|.P.u.} ",
+" .I.6. X X XT f.H.b ].*.E D.D.D.D.5.5..X.XM.M.I.I.a.a.l.l.z.z.T.T.T.d.XXx.c.v.b.U.oXOXR.+X@X ",
+" E.E.E.W.W.W.K.Z.E.W.Q.Q.Q.Q.Q.Q.Q.Q.!.!.!.!.!.!.~.~.~.~.~.~.^.^.^.^.^./././.(.{ { ).).#X_._. ",
+" & % $ e '.= H f.H.b 8.W *.E E E .X.X.XI.I.I.I.a.a.l.l.z.z.T.T.T.C.XXXXc.v.$X%X&XY.*X=X2 @X-X ",
+" {.{.{.{.{.#X~.Z.W.~.{.{./././././././././.(.(.(.(.(.(.(.{ { { { { { ).).).w.w.3.}.;X%.:X} } ",
+" & & % $ e >XV.f.S.C K X.W t. . .l.l.t.t.t.t.A.A.A.,X,X,X,X,X<X;X1X1X2X3X%X&X4XoX*X5Xo.6X-X-X ",
+" & & % $ $ >X7X` Z.Z D ! =.=.s.t.t.t.A.A.s.A.,X,X,X,X<X<X<X<X;X1X2X2X3X%X&X4XoXOX8X5X<.@X-X-X ",
+" 8 & & $ e K 9XJ f.^. XK X.=.=.s.s.s.s.s.C.C.C.C.<X0X0X0X1X1X1X2X2X3X%X&X4XqXOX*X8X=X<.-X-XwX ",
+" 8 & eXK k.@.M. Xg.E.B.rX~ -.d.d.C.C.C.C.C.tX0X0X0XyXyX1X1XuX2X2X3X%X&X4XqXoXOX8XiX6XeX-X-XwX ",
+" 6XQ h.Y N.K e pXB.f./.9Xo.;.-.x.d.tXtXtXtXtX0X0XyXyXyXuXuX2X2X3X%X&X4XqXoXOX*XiX=X_ aX-XaXwX ",
+" Y Y .R.@X% sX= 7XT Z.V P :.;.c.x.x.x.tXdXdXdXyXyXuXuX2X2X3X3X%X&X4XqXoXOX*X8X*XfXaXaXaXwXwX ",
+" gXhX& * & 5 5 sXjXa ] S.9X/ ~ v.c.dXdXdXdXdXuXuXuXkX2X2X3X%X%X&X4XqXoXOX*X8XiX<.hXwXwXaXwXwX ",
+" 8 lXlXjX= * 5 5 = zX9X] H.D 7.b.v.v.kXc.kXkXkXkXkX2X$X3X%X&X&X4XqXoXOX*X8XiXxXhXwXcXcXwXwXwX ",
+" zXzXlXlXjX= = f f sXD Y ] ~.D 7.n.b.v.v.kXkXkXkX$X$X%X%X&X4XqXoXoXOX*X8X5XgXu cXvXvXcXcXwXwX ",
+" bXbXzXlXlX- = * @XX.h.e D T S.D n.m.b.$X$X$X$X$X%X%X&X&X4XqXoXOX*X8X8X*X<.hXvX; ; vXvXvXcXwX ",
+" nXbXzXzXlXlX- -XX.Y R.pXpXP J K.Z mXm.n.U.U.U.U.U.4X4XY.oXOX*X8X8X8X=X,.aXvX; > > > t t t cX ",
+" nXbXbXzXzXlXaXXXY +Xf = f = 7XtXR R mXn.Y.[.[.[.[.OX*X*X8X5X*X=X,.u vXvX; > > MXMX, 7 t t ",
+" nXnXnXbXzXvX-.Y +XcX6 6 = = = d L B.G H `.X.:.7.m.=X=X=X=X=X6X,.u cXvXNX: BX> MXVXCXVX7 7 7 ",
+" ZXZXnXbXAXgX@.+XvX; - - - - * @XR.>.sX>.R.i 0 x eXeXeXeXO hXaXcXvXNX: BXMXMXMXVXCXCXCXVX7 7 ",
+" SXZXZXAXgXN.aXNX: : NXNXNX- * +X+X* 6 6 6 * * * * * * * vXvX- NX: DXBXMXMXFXCXCXCXCXGXVXVX7 ",
+" SXSXHXgX0.JXKXLXKXKXDX: : NX* @X-X- - - - - - - - - - - NX: DXDXDXMXMXFXFXCXCXCXCXGXGXGXVXVX ",
+" SXHXPX3.JXnXnXnXnXbXLXKXKXNXaX-XvX: : NX: : : : : : : BXDXDXLXMXMXFXFXCXCXCXCXGXGXGXGXGXGXGX ",
+" IXUX$.AXZXZXZXZXnXnXnXLXLXNXJXvXBXDXBXBXBXBXDXDXDXDXLXDXLXLXFXFXFXFXCXCXCXCXGXGXGXGXGXGXGXGX ",
+" "};
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/PapyrusUMLCommunicationDiagram.paletteconfiguration b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/PapyrusUMLCommunicationDiagram.paletteconfiguration
index bb8dd6612a0..d49de072887 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/PapyrusUMLCommunicationDiagram.paletteconfiguration
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/PapyrusUMLCommunicationDiagram.paletteconfiguration
@@ -1,113 +1,113 @@
-<?xml version="1.0" encoding="ASCII"?>
-<?gmfgen generated="true"?>
-<paletteconfiguration:PaletteConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8"
- xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2"
- id="org.eclipse.papyrus.uml.diagram.communication.paletteconfiguration"
- label="org.eclipse.papyrus.uml.diagram.communication Palette"
- description="This is the palette of org.eclipse.papyrus.uml.diagram.communication">
- <drawerConfigurations
- id="communication.group.nodes"
- label="Nodes"
- description="Nodes">
- <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration"
- id="communication.tool.lifeline"
- label="Lifeline"
- description="Create a Lifeline">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Lifeline.gif"/>
- <elementDescriptors>
- <elementType
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Lifeline_Shape"/>
- </elementDescriptors>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration"
- id="communication.tool.comment"
- label="Comment"
- description="Create new Comment">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Comment.gif"/>
- <elementDescriptors>
- <elementType
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Comment_Shape"/>
- </elementDescriptors>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration"
- id="communication.tool.constraint"
- label="Constraint"
- description="Create a constraint">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Constraint.gif"/>
- <elementDescriptors>
- <elementType
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Constraint_Shape"/>
- </elementDescriptors>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration"
- id="communication.tool.durationobservation"
- label="Duration Observation"
- description="Create a Duration Observation on a Message">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/DurationObservation.gif"/>
- <elementDescriptors>
- <elementType
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.DurationObservation_Shape"/>
- </elementDescriptors>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration"
- id="communication.tool.timeobservation"
- label="Time Observation"
- description="Create a Time Observation">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/TimeObservation.gif"/>
- <elementDescriptors>
- <elementType
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.TimeObservation_Shape"/>
- </elementDescriptors>
- </ownedConfigurations>
- </drawerConfigurations>
- <drawerConfigurations
- id="createEdges2Group"
- label="Edges"
- description="Edges tools">
- <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration"
- id="createMessageCreateCreationTool"
- label="Message"
- description="MessageCreate" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Message_createMessage.gif"/>
- <elementDescriptors>
- <elementType
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- href="platform:/plugin/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.elementtypesconfigurations#org.eclipse.papyrus.uml.communication.Path_Edge"/>
- </elementDescriptors>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration"
- id="createLink13CreationTool"
- label="Link"
- description="Creation of a link for comment, constraint, TimeObservation, DurationObservation" kind="ConnectionTool">
- <icon pluginID="org.eclipse.papyrus.uml.diagram.communication" iconPath="icons/obj16/Link.gif"/>
- <elementDescriptors>
- <elementType
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Comment_AnnotatedElementEdge"/>
- </elementDescriptors>
- <elementDescriptors>
- <elementType
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Constraint_ConstrainedElementEdge"/>
- </elementDescriptors>
- <elementDescriptors>
- <elementType
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.DurationObservation_EventEdge"/>
- </elementDescriptors>
- <elementDescriptors>
- <elementType
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.TimeObservation_EventEdge"/>
- </elementDescriptors>
- </ownedConfigurations>
- </drawerConfigurations>
-</paletteconfiguration:PaletteConfiguration>
+<?xml version="1.0" encoding="ASCII"?>
+<?gmfgen generated="true"?>
+<paletteconfiguration:PaletteConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8"
+ xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2"
+ id="org.eclipse.papyrus.uml.diagram.communication.paletteconfiguration"
+ label="org.eclipse.papyrus.uml.diagram.communication Palette"
+ description="This is the palette of org.eclipse.papyrus.uml.diagram.communication">
+ <drawerConfigurations
+ id="communication.group.nodes"
+ label="Nodes"
+ description="Nodes">
+ <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration"
+ id="communication.tool.lifeline"
+ label="Lifeline"
+ description="Create a Lifeline">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Lifeline.gif"/>
+ <elementDescriptors>
+ <elementType
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Lifeline_Shape"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration"
+ id="communication.tool.comment"
+ label="Comment"
+ description="Create new Comment">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Comment.gif"/>
+ <elementDescriptors>
+ <elementType
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Comment_Shape"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration"
+ id="communication.tool.constraint"
+ label="Constraint"
+ description="Create a constraint">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Constraint.gif"/>
+ <elementDescriptors>
+ <elementType
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Constraint_Shape"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration"
+ id="communication.tool.durationobservation"
+ label="Duration Observation"
+ description="Create a Duration Observation on a Message">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/DurationObservation.gif"/>
+ <elementDescriptors>
+ <elementType
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.DurationObservation_Shape"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration"
+ id="communication.tool.timeobservation"
+ label="Time Observation"
+ description="Create a Time Observation">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/TimeObservation.gif"/>
+ <elementDescriptors>
+ <elementType
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.TimeObservation_Shape"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+ <drawerConfigurations
+ id="createEdges2Group"
+ label="Edges"
+ description="Edges tools">
+ <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration"
+ id="createMessageCreateCreationTool"
+ label="Message"
+ description="MessageCreate" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Message_createMessage.gif"/>
+ <elementDescriptors>
+ <elementType
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ href="platform:/plugin/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.elementtypesconfigurations#org.eclipse.papyrus.uml.communication.Path_Edge"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration"
+ id="createLink13CreationTool"
+ label="Link"
+ description="Creation of a link for comment, constraint, TimeObservation, DurationObservation" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.papyrus.uml.diagram.communication" iconPath="icons/obj16/Link.gif"/>
+ <elementDescriptors>
+ <elementType
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Comment_AnnotatedElementEdge"/>
+ </elementDescriptors>
+ <elementDescriptors>
+ <elementType
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Constraint_ConstrainedElementEdge"/>
+ </elementDescriptors>
+ <elementDescriptors>
+ <elementType
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.DurationObservation_EventEdge"/>
+ </elementDescriptors>
+ <elementDescriptors>
+ <elementType
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.TimeObservation_EventEdge"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+</paletteconfiguration:PaletteConfiguration>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.elementtypesconfigurations b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.elementtypesconfigurations
index 2cabccaced2..d44ad03c6e9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.elementtypesconfigurations
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.elementtypesconfigurations
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="ASCII"?>
-<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmi:id="_rWI4YHPzEeSnGJwaJWHCSg" description="" identifier="org.eclipse.papyrus.uml.diagram.communication.elementTypeSet" name="PapyrusUMLCommunicationDiagram" metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.uml.communication.Path_Edge" identifier="org.eclipse.papyrus.uml.communication.Path_Edge" name="Path_Edge" hint="Path_Edge">
- <specializedTypes xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Message_AsynchEdge"/>
- </elementTypeConfigurations>
-</elementtypesconfigurations:ElementTypeSetConfiguration>
+<?xml version="1.0" encoding="ASCII"?>
+<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmi:id="_rWI4YHPzEeSnGJwaJWHCSg" description="" identifier="org.eclipse.papyrus.uml.diagram.communication.elementTypeSet" name="PapyrusUMLCommunicationDiagram" metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.uml.communication.Path_Edge" identifier="org.eclipse.papyrus.uml.communication.Path_Edge" name="Path_Edge" hint="Path_Edge">
+ <specializedTypes xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Message_AsynchEdge"/>
+ </elementTypeConfigurations>
+</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml
index e39e7e87fc8..5aa6d3ac512 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml
@@ -377,6 +377,6 @@
diagramType="PapyrusUMLCommunicationDiagram">
</visualTypeProvider>
</extension>
-
-
+
+
</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/pom.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/pom.xml
index 2afb933a0e5..ea46e7f3cc6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/pom.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/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-diagrams</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <artifactId>org.eclipse.papyrus.uml.diagram.communication</artifactId>
- <version>3.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-diagrams</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.diagram.communication</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/OpenDiagramEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/OpenDiagramEditPolicy.java
index 46b9c74bdd4..4bf251641f0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/OpenDiagramEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/edit/policies/OpenDiagramEditPolicy.java
@@ -1,194 +1,194 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.communication.edit.policies;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Iterator;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.ui.URIEditorInput;
-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.util.EcoreUtil;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.OpenEditPolicy;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.Style;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.communication.edit.parts.ModelEditPart;
-import org.eclipse.papyrus.uml.diagram.communication.part.Messages;
-import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorUtil;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * @generated
- */
-public class OpenDiagramEditPolicy extends OpenEditPolicy {
-
- /**
- * @generated
- */
- protected Command getOpenCommand(Request request) {
- EditPart targetEditPart = getTargetEditPart(request);
- if (false == targetEditPart.getModel() instanceof View) {
- return null;
- }
- View view = (View) targetEditPart.getModel();
- Style link = view.getStyle(NotationPackage.eINSTANCE.getHintedDiagramLinkStyle());
- if (false == link instanceof HintedDiagramLinkStyle) {
- return null;
- }
- return new ICommandProxy(new OpenDiagramCommand((HintedDiagramLinkStyle) link));
- }
-
- /**
- * @generated
- */
- private static class OpenDiagramCommand extends AbstractTransactionalCommand {
-
- /**
- * @generated
- */
- private final HintedDiagramLinkStyle diagramFacet;
-
- /**
- * @generated
- */
- OpenDiagramCommand(HintedDiagramLinkStyle linkStyle) {
- // editing domain is taken for original diagram,
- // if we open diagram from another file, we should use another editing domain
- super(TransactionUtil.getEditingDomain(linkStyle), Messages.CommandName_OpenDiagram, null);
- diagramFacet = linkStyle;
- }
-
- // FIXME canExecute if !(readOnly && getDiagramToOpen == null), i.e. open works on ro diagrams only when there's associated diagram already
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
- try {
- Diagram diagram = getDiagramToOpen();
- if (diagram == null) {
- diagram = intializeNewDiagram();
- }
- URI uri = EcoreUtil.getURI(diagram);
- String editorName = uri.lastSegment() + '#' + diagram.eResource().getContents().indexOf(diagram);
- IEditorInput editorInput = new URIEditorInput(uri, editorName);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- page.openEditor(editorInput, getEditorID());
- return CommandResult.newOKCommandResult();
- } catch (Exception ex) {
- throw new ExecutionException("Can't open diagram", ex);
- }
- }
-
- /**
- * @generated
- */
- protected Diagram getDiagramToOpen() {
- return diagramFacet.getDiagramLink();
- }
-
- /**
- * @generated
- */
- protected Diagram intializeNewDiagram() throws ExecutionException {
- Diagram d = ViewService.createDiagram(getDiagramDomainElement(), getDiagramKind(), getPreferencesHint());
- if (d == null) {
- throw new ExecutionException("Can't create diagram of '" + getDiagramKind() + "' kind");
- }
- diagramFacet.setDiagramLink(d);
- assert diagramFacet.eResource() != null;
- diagramFacet.eResource().getContents().add(d);
- EObject container = diagramFacet.eContainer();
- while (container instanceof View) {
- ((View) container).persist();
- container = container.eContainer();
- }
- try {
- new WorkspaceModifyOperation() {
- protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
- try {
- for (Iterator<?> it = diagramFacet.eResource().getResourceSet().getResources().iterator(); it.hasNext();) {
- Resource nextResource = (Resource) it.next();
- if (nextResource.isLoaded() && !getEditingDomain().isReadOnly(nextResource)) {
- nextResource.save(UMLDiagramEditorUtil.getSaveOptions());
- }
- }
- } catch (IOException ex) {
- throw new InvocationTargetException(ex, "Save operation failed");
- }
- }
- }.run(null);
- } catch (InvocationTargetException e) {
- throw new ExecutionException("Can't create diagram of '" + getDiagramKind() + "' kind", e);
- } catch (InterruptedException e) {
- throw new ExecutionException("Can't create diagram of '" + getDiagramKind() + "' kind", e);
- }
- return d;
- }
-
- /**
- * @generated
- */
- protected EObject getDiagramDomainElement() {
- // use same element as associated with EP
- return ((View) diagramFacet.eContainer()).getElement();
- }
-
- /**
- * @generated
- */
- protected PreferencesHint getPreferencesHint() {
- // XXX prefhint from target diagram's editor?
- return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
- }
-
- /**
- * @generated
- */
- protected String getDiagramKind() {
- return ModelEditPart.MODEL_ID;
- }
-
- /**
- * @generated
- */
- protected String getEditorID() {
- return UMLDiagramEditor.ID;
- }
-
- }
-
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.communication.edit.policies;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Iterator;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.ui.URIEditorInput;
+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.util.EcoreUtil;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.OpenEditPolicy;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.ModelEditPart;
+import org.eclipse.papyrus.uml.diagram.communication.part.Messages;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditor;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorUtil;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+/**
+ * @generated
+ */
+public class OpenDiagramEditPolicy extends OpenEditPolicy {
+
+ /**
+ * @generated
+ */
+ protected Command getOpenCommand(Request request) {
+ EditPart targetEditPart = getTargetEditPart(request);
+ if (false == targetEditPart.getModel() instanceof View) {
+ return null;
+ }
+ View view = (View) targetEditPart.getModel();
+ Style link = view.getStyle(NotationPackage.eINSTANCE.getHintedDiagramLinkStyle());
+ if (false == link instanceof HintedDiagramLinkStyle) {
+ return null;
+ }
+ return new ICommandProxy(new OpenDiagramCommand((HintedDiagramLinkStyle) link));
+ }
+
+ /**
+ * @generated
+ */
+ private static class OpenDiagramCommand extends AbstractTransactionalCommand {
+
+ /**
+ * @generated
+ */
+ private final HintedDiagramLinkStyle diagramFacet;
+
+ /**
+ * @generated
+ */
+ OpenDiagramCommand(HintedDiagramLinkStyle linkStyle) {
+ // editing domain is taken for original diagram,
+ // if we open diagram from another file, we should use another editing domain
+ super(TransactionUtil.getEditingDomain(linkStyle), Messages.CommandName_OpenDiagram, null);
+ diagramFacet = linkStyle;
+ }
+
+ // FIXME canExecute if !(readOnly && getDiagramToOpen == null), i.e. open works on ro diagrams only when there's associated diagram already
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ try {
+ Diagram diagram = getDiagramToOpen();
+ if (diagram == null) {
+ diagram = intializeNewDiagram();
+ }
+ URI uri = EcoreUtil.getURI(diagram);
+ String editorName = uri.lastSegment() + '#' + diagram.eResource().getContents().indexOf(diagram);
+ IEditorInput editorInput = new URIEditorInput(uri, editorName);
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ page.openEditor(editorInput, getEditorID());
+ return CommandResult.newOKCommandResult();
+ } catch (Exception ex) {
+ throw new ExecutionException("Can't open diagram", ex);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Diagram getDiagramToOpen() {
+ return diagramFacet.getDiagramLink();
+ }
+
+ /**
+ * @generated
+ */
+ protected Diagram intializeNewDiagram() throws ExecutionException {
+ Diagram d = ViewService.createDiagram(getDiagramDomainElement(), getDiagramKind(), getPreferencesHint());
+ if (d == null) {
+ throw new ExecutionException("Can't create diagram of '" + getDiagramKind() + "' kind");
+ }
+ diagramFacet.setDiagramLink(d);
+ assert diagramFacet.eResource() != null;
+ diagramFacet.eResource().getContents().add(d);
+ EObject container = diagramFacet.eContainer();
+ while (container instanceof View) {
+ ((View) container).persist();
+ container = container.eContainer();
+ }
+ try {
+ new WorkspaceModifyOperation() {
+ protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
+ try {
+ for (Iterator<?> it = diagramFacet.eResource().getResourceSet().getResources().iterator(); it.hasNext();) {
+ Resource nextResource = (Resource) it.next();
+ if (nextResource.isLoaded() && !getEditingDomain().isReadOnly(nextResource)) {
+ nextResource.save(UMLDiagramEditorUtil.getSaveOptions());
+ }
+ }
+ } catch (IOException ex) {
+ throw new InvocationTargetException(ex, "Save operation failed");
+ }
+ }
+ }.run(null);
+ } catch (InvocationTargetException e) {
+ throw new ExecutionException("Can't create diagram of '" + getDiagramKind() + "' kind", e);
+ } catch (InterruptedException e) {
+ throw new ExecutionException("Can't create diagram of '" + getDiagramKind() + "' kind", e);
+ }
+ return d;
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getDiagramDomainElement() {
+ // use same element as associated with EP
+ return ((View) diagramFacet.eContainer()).getElement();
+ }
+
+ /**
+ * @generated
+ */
+ protected PreferencesHint getPreferencesHint() {
+ // XXX prefhint from target diagram's editor?
+ return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
+ }
+
+ /**
+ * @generated
+ */
+ protected String getDiagramKind() {
+ return ModelEditPart.MODEL_ID;
+ }
+
+ /**
+ * @generated
+ */
+ protected String getEditorID() {
+ return UMLDiagramEditor.ID;
+ }
+
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLPaletteFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLPaletteFactory.java
index 512afb82f55..07a0826cca8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLPaletteFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/part/UMLPaletteFactory.java
@@ -1,179 +1,179 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.communication.part;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.gef.Tool;
-import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeConnectionTool;
-import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeCreationTool;
-import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class UMLPaletteFactory extends PaletteFactory.Adapter {
- //RS: New Palette generation
-
- //Generates the ID for the tool elements
- //Generate the tool factory (if(ID) createtool...)
- /**
- * @generated
- */
- private final static String COMMUNICATION_TOOL_LIFELINE = "communication.tool.lifeline";//$NON-NLS-1$
- /**
- * @generated
- */
- private final static String COMMUNICATION_TOOL_COMMENT = "communication.tool.comment";//$NON-NLS-1$
- /**
- * @generated
- */
- private final static String COMMUNICATION_TOOL_CONSTRAINT = "communication.tool.constraint";//$NON-NLS-1$
- /**
- * @generated
- */
- private final static String COMMUNICATION_TOOL_DURATIONOBSERVATION = "communication.tool.durationobservation";//$NON-NLS-1$
- /**
- * @generated
- */
- private final static String COMMUNICATION_TOOL_TIMEOBSERVATION = "communication.tool.timeobservation";//$NON-NLS-1$
- /**
- * @generated
- */
- private final static String CREATEMESSAGECREATECREATIONTOOL = "createMessageCreateCreationTool";//$NON-NLS-1$
- /**
- * @generated
- */
- private final static String CREATELINK13CREATIONTOOL = "createLink13CreationTool";//$NON-NLS-1$
-
- /**
- * @generated
- */
- public UMLPaletteFactory() {
-
- }
-
- /**
- * @generated
- */
- public Tool createTool(String toolId) {
- if (toolId.equals(COMMUNICATION_TOOL_LIFELINE)) {
- return createLifelineComCreationTool();
- }
- if (toolId.equals(COMMUNICATION_TOOL_COMMENT)) {
- return createComment7CreationTool();
- }
- if (toolId.equals(COMMUNICATION_TOOL_CONSTRAINT)) {
- return createConstraint5CreationTool();
- }
- if (toolId.equals(COMMUNICATION_TOOL_DURATIONOBSERVATION)) {
- return createDurationObservation4CreationTool();
- }
- if (toolId.equals(COMMUNICATION_TOOL_TIMEOBSERVATION)) {
- return createTimeObservation6CreationTool();
- }
- if (toolId.equals(CREATEMESSAGECREATECREATIONTOOL)) {
- return createMessageCreateCreationTool();
- }
- if (toolId.equals(CREATELINK13CREATIONTOOL)) {
- return createLink13CreationTool();
- }
- // default return: null
- return null;
- }
-
- /**
- * @generated
- */
- public Object getTemplate(String templateId) {
-
- // default return: null
- return null;
- }
-
- /**
- * @generated
- */
- private Tool createLifelineComCreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Lifeline_Shape);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createComment7CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Comment_Shape);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createConstraint5CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Constraint_Shape);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createDurationObservation4CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.DurationObservation_Shape);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createTimeObservation6CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.TimeObservation_Shape);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createMessageCreateCreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Path_Edge);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createLink13CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.Comment_AnnotatedElementEdge);
- types.add(UMLElementTypes.Constraint_ConstrainedElementEdge);
- types.add(UMLElementTypes.DurationObservation_EventEdge);
- types.add(UMLElementTypes.TimeObservation_EventEdge);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.communication.part;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.Tool;
+import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeConnectionTool;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeCreationTool;
+import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class UMLPaletteFactory extends PaletteFactory.Adapter {
+ //RS: New Palette generation
+
+ //Generates the ID for the tool elements
+ //Generate the tool factory (if(ID) createtool...)
+ /**
+ * @generated
+ */
+ private final static String COMMUNICATION_TOOL_LIFELINE = "communication.tool.lifeline";//$NON-NLS-1$
+ /**
+ * @generated
+ */
+ private final static String COMMUNICATION_TOOL_COMMENT = "communication.tool.comment";//$NON-NLS-1$
+ /**
+ * @generated
+ */
+ private final static String COMMUNICATION_TOOL_CONSTRAINT = "communication.tool.constraint";//$NON-NLS-1$
+ /**
+ * @generated
+ */
+ private final static String COMMUNICATION_TOOL_DURATIONOBSERVATION = "communication.tool.durationobservation";//$NON-NLS-1$
+ /**
+ * @generated
+ */
+ private final static String COMMUNICATION_TOOL_TIMEOBSERVATION = "communication.tool.timeobservation";//$NON-NLS-1$
+ /**
+ * @generated
+ */
+ private final static String CREATEMESSAGECREATECREATIONTOOL = "createMessageCreateCreationTool";//$NON-NLS-1$
+ /**
+ * @generated
+ */
+ private final static String CREATELINK13CREATIONTOOL = "createLink13CreationTool";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public UMLPaletteFactory() {
+
+ }
+
+ /**
+ * @generated
+ */
+ public Tool createTool(String toolId) {
+ if (toolId.equals(COMMUNICATION_TOOL_LIFELINE)) {
+ return createLifelineComCreationTool();
+ }
+ if (toolId.equals(COMMUNICATION_TOOL_COMMENT)) {
+ return createComment7CreationTool();
+ }
+ if (toolId.equals(COMMUNICATION_TOOL_CONSTRAINT)) {
+ return createConstraint5CreationTool();
+ }
+ if (toolId.equals(COMMUNICATION_TOOL_DURATIONOBSERVATION)) {
+ return createDurationObservation4CreationTool();
+ }
+ if (toolId.equals(COMMUNICATION_TOOL_TIMEOBSERVATION)) {
+ return createTimeObservation6CreationTool();
+ }
+ if (toolId.equals(CREATEMESSAGECREATECREATIONTOOL)) {
+ return createMessageCreateCreationTool();
+ }
+ if (toolId.equals(CREATELINK13CREATIONTOOL)) {
+ return createLink13CreationTool();
+ }
+ // default return: null
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ public Object getTemplate(String templateId) {
+
+ // default return: null
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createLifelineComCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Lifeline_Shape);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createComment7CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Comment_Shape);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createConstraint5CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Constraint_Shape);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createDurationObservation4CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.DurationObservation_Shape);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createTimeObservation6CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.TimeObservation_Shape);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createMessageCreateCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Path_Edge);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createLink13CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.Comment_AnnotatedElementEdge);
+ types.add(UMLElementTypes.Constraint_ConstrainedElementEdge);
+ types.add(UMLElementTypes.DurationObservation_EventEdge);
+ types.add(UMLElementTypes.TimeObservation_EventEdge);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+}

Back to the top