Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2010-07-29 13:52:18 +0000
committervlorenzo2010-07-29 13:52:18 +0000
commit6518fb5dcb65ad67d4e627e62e0aeec791362d90 (patch)
tree5669de2ec1f6d10cacf858bec0ade4b8aad3cff1 /plugins
parent441efdf1d0ccffa40805373d687c045afae04fb2 (diff)
downloadorg.eclipse.papyrus-6518fb5dcb65ad67d4e627e62e0aeec791362d90.tar.gz
org.eclipse.papyrus-6518fb5dcb65ad67d4e627e62e0aeec791362d90.tar.xz
org.eclipse.papyrus-6518fb5dcb65ad67d4e627e62e0aeec791362d90.zip
NEW - bug 315309: [Profile diagram] Not possible to add meta-class to diagram, if meta-class is already imported
https://bugs.eclipse.org/bugs/show_bug.cgi?id=315309 NEW - bug 317433: [Profile Diagram][Undo] Undo after "Delete from Model" for Metaclass https://bugs.eclipse.org/bugs/show_bug.cgi?id=317433 NEW - bug 318280: [Profile Diagram] Dropped metaclass doesn't have the tag <<metaclass>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=318280 NEW - bug 318665: [Profile Diagram] Delete From Model doesn't work on Extension https://bugs.eclipse.org/bugs/show_bug.cgi?id=318665 NEW - bug 320630: [Profile Diagram] Add PrimitiveType to the palette https://bugs.eclipse.org/bugs/show_bug.cgi?id=320630 NEW - bug 321110: [Profile Diagram] Delete From Model on Metaclass https://bugs.eclipse.org/bugs/show_bug.cgi?id=321110 + set the plugin version to 0.7.1
Diffstat (limited to 'plugins')
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/META-INF/MANIFEST.MF2
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/commands/CustomMetaClassCreateCommand.java16
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/commands/CustomSemanticCreateCommand.java106
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/commands/SetStereotypeVisibleOnMetaclassCommand.java94
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/helper/ExtensionHelper.java40
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/helper/MetaclassHelper.java46
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/messages/Messages.java9
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/messages/messages.properties5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/ExtensionCustomNameEditPolicy.java26
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/ProfileDiagramDragDropEditPolicy.java32
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/itemsemantic/CustomExtensionItemSemanticEditPolicy.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicy.java69
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicyCN.java68
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/ui/dialog/ChooseSetMetaclassDialog.java178
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/ui/dialog/Messages.java36
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/ui/dialog/messages.properties4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/messages.properties4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/model/profilediagram.gmfgen266
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/plugin.properties11
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/plugin.xml44
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationBranchCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationBranchReorientCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationNodeCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationReorientCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ClassOperationCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ClassPropertyCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentAnnotatedElementCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentAnnotatedElementReorientCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentCreateCommandCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentEditPartCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintConstrainedElementCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintConstrainedElementReorientCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintCreateCommandCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypeCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypeCreateCommandCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyBranchCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyBranchReorientCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyNodeCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyReorientCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ElementImportCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ElementImportReorientCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/EnumerationCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/EnumerationCreateCommandCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ExtensionCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ExtensionReorientCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/GeneralizationCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/GeneralizationReorientCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/MetaclassCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/MetaclassCreateCommandCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ModelCreateCommandCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ModelCreateCommandTN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageCreateCommandCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageImportCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageImportReorientCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java139
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java139
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileApplicationCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileApplicationReorientCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileCreateCommandCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileCreateCommandTN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/StereotypeCreateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/StereotypeCreateCommandCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/AssociationEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ClassOperationEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ClassPropertyEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/CommentEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/CommentEditHelperCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ConstraintEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ConstraintEditHelperCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DataTypeEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DataTypeOperationEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DataTypePropertyEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DependencyEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ElementImportEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/EnumerationEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/EnumerationLiteralEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ExtensionEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/GeneralizationEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/MetaclassEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ModelEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PackageEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PackageEditHelperCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PackageImportEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PrimitiveTypeEditHelper.java22
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ProfileApplicationEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ProfileDiagramEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ProfileEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ShortCutDiagramEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/StereotypeEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/UMLBaseEditHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AppliedStereotypeElementImportEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationAppliedStereotypeEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationBranchEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationBranchRoleEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationMultiplicityTargetLabelEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationNameEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationNodeEditPart.java73
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationRoleSourceLabelEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ClassOperationEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ClassPropertyEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentAnnotatedElementEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentBodyEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentBodyEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentEditPart.java21
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentEditPartCN.java21
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintBodyEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintBondyEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintConstrainedElementEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintEditPart.java43
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintEditPartCN.java43
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintNameEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintNameEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeEditPart.java73
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeEditPartCN.java73
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeNameEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeNameEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeOperationEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypePropertyEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyAppliedStereotypeEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyBranchEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyNameEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyNodeEditPart.java35
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DiagramNameEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ElementImportAliasEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ElementImportEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEditPart.java73
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEditPartCN.java73
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationLiteralEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationNameEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationNameEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ExtensionEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/GeneralizationAppliedStereotypeEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/GeneralizationEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassEditPart.java73
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassEditPartCN.java73
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassNameEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassNameEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelEditPartCN.java45
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelEditPartTN.java45
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelNameEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelNameEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartTN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MultiDependencyLabelEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageEditPart.java45
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageEditPartCN.java45
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageImportAppliedStereotypeEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageImportEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageNameEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageNameEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeEditPart.java905
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java905
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeNameEditPart.java804
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeNameEditPartCN.java804
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileApplicationEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileDiagramEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileEditPartCN.java45
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileEditPartTN.java45
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileNameEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileNameEditPartTN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartTN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ShortCutDiagramEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeEditPart.java73
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeEditPartCN.java73
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeNameEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeNameEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPart.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPartCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/UMLEditPartFactory.java25
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java28
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java28
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java70
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ClassOperationItemSemanticEditPolicy.java29
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ClassPropertyItemSemanticEditPolicy.java29
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/CommentEditPartItemSemanticEditPolicy.java54
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/CommentItemSemanticEditPolicyCN.java54
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java67
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java67
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java67
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java67
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeOperationItemSemanticEditPolicy.java29
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypePropertyItemSemanticEditPolicy.java29
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DependencyBranchItemSemanticEditPolicy.java28
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DependencyItemSemanticEditPolicy.java28
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DependencyNodeItemSemanticEditPolicy.java62
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ElementImportItemSemanticEditPolicy.java28
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java67
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java67
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationLiteralItemSemanticEditPolicy.java29
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java28
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/GeneralizationItemSemanticEditPolicy.java28
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java71
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java71
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java164
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java158
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java23
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java23
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackageImportItemSemanticEditPolicy.java28
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java148
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java154
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java17
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java17
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java213
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java213
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileApplicationItemSemanticEditPolicy.java28
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java17
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java161
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java161
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java17
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java17
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java29
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java68
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java68
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/UMLTextNonResizableEditPolicy.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/UMLTextSelectionEditPolicy.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLAbstractNavigatorItem.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLDomainNavigatorContentProvider.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLDomainNavigatorItem.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLDomainNavigatorLabelProvider.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorActionProvider.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorContentProvider.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorGroup.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorItem.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorLabelProvider.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorLinkHelper.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorSorter.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/parsers/AbstractParser.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/parsers/MessageFormatParser.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/DiagramEditorContextMenuProvider.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/LoadResourceAction.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/Messages.java23
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/ModelElementSelectionPage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLCreationWizard.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLCreationWizardPage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramActionBarContributor.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramContentInitializer.java39
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramEditor.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramEditorPlugin.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramEditorUtil.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramUpdateCommand.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramUpdater.java172
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDocumentProvider.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLInitDiagramFileAction.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLLinkDescriptor.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLMatchingStrategy.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLNewDiagramFileWizard.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLNodeDescriptor.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLPaletteFactory.java35
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLUriEditorInputTester.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLVisualIDRegistry.java125
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/AssociationPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ClassOperationPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ClassPropertyPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/CommentCNPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/CommentPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ConstraintCNPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ConstraintPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DataTypeOperationPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DataTypePreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DataTypePropertyPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DependencyPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramAppearancePreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramConnectionsPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramGeneralPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramPreferenceInitializer.java16
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramPrintingPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramRulersAndGridPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ElementImportPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/EnumerationCNPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/EnumerationLiteralPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/EnumerationPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ExtensionPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/GeneralizationPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/MetaclassPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ModelPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PackageCNPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PackageImportPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PackagePreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PrimitiveTypePreferencePage.java64
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ProfileApplicationPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ProfileCNPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ProfilePreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ShortCutDiagramPreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/StereotypePreferencePage.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/ElementInitializers.java52
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLEditPartProvider.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLElementTypes.java37
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLIconProvider.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLModelingAssistantProvider.java70
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLParserProvider.java47
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLViewProvider.java78
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/sheet/UMLPropertySection.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/sheet/UMLSheetLabelProvider.java13
327 files changed, 10886 insertions, 1517 deletions
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/META-INF/MANIFEST.MF b/plugins/uml/org.eclipse.papyrus.diagram.profile/META-INF/MANIFEST.MF
index 8ff2bccba4f..a0b41e3c522 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/META-INF/MANIFEST.MF
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.papyrus.diagram.profile; singleton:=true
-Bundle-Version: 0.7.0.qualifier
+Bundle-Version: 0.7.1.qualifier
Bundle-Activator: org.eclipse.papyrus.diagram.profile.part.UMLDiagramEditorPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/commands/CustomMetaClassCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/commands/CustomMetaClassCreateCommand.java
index af3acd7c979..b6df109968e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/commands/CustomMetaClassCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/commands/CustomMetaClassCreateCommand.java
@@ -23,13 +23,11 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.notation.Location;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.NotationFactory;
@@ -41,7 +39,6 @@ import org.eclipse.papyrus.diagram.profile.providers.UMLViewProvider;
import org.eclipse.papyrus.umlutils.ui.VisualInformationPapyrusConstant;
import org.eclipse.papyrus.umlutils.ui.helper.AppliedStereotypeHelper;
import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
/**
* A custom creation view command for the metaclass that creates a <code>View</code>.
@@ -49,9 +46,6 @@ import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
public class CustomMetaClassCreateCommand extends org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand {
- /** height of a title package, approximatively */
- final static private int HEIGHT_TITLE_PACKAGE = 35;
-
/** the height between two added metaclasses */
final static private int HEIGHT_BETWEEN_TWO_METACLASS = 80;
@@ -115,15 +109,7 @@ public class CustomMetaClassCreateCommand extends org.eclipse.gmf.runtime.diagra
UMLViewProvider viewProvider = new UMLViewProvider();
-
- Iterator adapterIterator = myViewDescriptor.getRequestAdapters().iterator();
- //-------------pour test
- //creation of the node!
- Iterator adapterIterator2 = myViewDescriptor.getRequestAdapters().iterator();
- CreateElementRequestAdapter adapter2;
- adapter2 = (CreateElementRequestAdapter)adapterIterator2.next();
- CreateElementRequest req = (CreateElementRequest)adapter2.getAdapter(CreateElementRequest.class);
- EObject container = req.getContainer();
+ Iterator<?> adapterIterator = myViewDescriptor.getRequestAdapters().iterator();
//creation of the nodes!
while(adapterIterator.hasNext()) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/commands/CustomSemanticCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/commands/CustomSemanticCreateCommand.java
index db351e91012..2182b0c9713 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/commands/CustomSemanticCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/commands/CustomSemanticCreateCommand.java
@@ -21,19 +21,31 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.papyrus.diagram.common.Activator;
import org.eclipse.papyrus.diagram.profile.custom.messages.Messages;
import org.eclipse.papyrus.diagram.profile.custom.requests.CustomCreateElementRequestAdapter;
import org.eclipse.papyrus.diagram.profile.custom.ui.dialog.ChooseSetMetaclassDialog;
import org.eclipse.papyrus.profile.ImageManager;
+import org.eclipse.papyrus.ui.toolbox.LookForElement;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.ElementImport;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.PackageableElement;
import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* this command allows to import metaclasses in a profile
@@ -51,7 +63,7 @@ public class CustomSemanticCreateCommand extends org.eclipse.gmf.runtime.diagram
/**
* the added metaclasses
*/
- private ArrayList<Object> addedMetaclasses;
+ private ArrayList<?> addedMetaclasses;
/**
* the profile
@@ -59,7 +71,6 @@ public class CustomSemanticCreateCommand extends org.eclipse.gmf.runtime.diagram
private Profile profile;
-
/**
* the request is here to allow the creation of the requestAdapterList
*
@@ -69,7 +80,7 @@ public class CustomSemanticCreateCommand extends org.eclipse.gmf.runtime.diagram
*/
public CustomSemanticCreateCommand(CustomCreateElementRequestAdapter requestAdapter, Command realSemanticCommand, Profile profile) {
// /!\ warning
- // the first arg is here to be conform with the metaclass's constructor. It isn't used!
+ // the first argument is here to be conform with the metaclass's constructor. It isn't used!
super(new CreateElementRequestAdapter(requestAdapter.getRequest(0)), realSemanticCommand);
this.profile = profile;
this.customRequestAdapter = requestAdapter;
@@ -79,7 +90,7 @@ public class CustomSemanticCreateCommand extends org.eclipse.gmf.runtime.diagram
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- CommandResult result = null;
+ CommandResult result = CommandResult.newCancelledCommandResult();
ChooseSetMetaclassDialog cmcd = new ChooseSetMetaclassDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), profile);
// opening of a message box indicating profile application
@@ -98,40 +109,77 @@ public class CustomSemanticCreateCommand extends org.eclipse.gmf.runtime.diagram
message.close();
- if(cmcd.getReturnCode() != IStatus.OK) {
-
- result = CommandResult.newCancelledCommandResult();
-
+ if(cmcd.getReturnCode() == IStatus.OK) {
+ this.addedMetaclasses = cmcd.getSelectedElements();
+ result = applyModification();
+ }
+ return result;
- } else {
+ }
+ /**
+ * Apply the modifications to the Profile : import required metaclasses
+ *
+ * @return
+ * the command result
+ */
+ private CommandResult applyModification() {
+ CommandResult result = null;
+ CompoundCommand addingCommand = new CompoundCommand();
+ //----Obtain the actual imported metaclasses
+ EList<?> metaclassSet = profile.getReferencedMetaclasses();
+
+ //we add the new metaclasses
+ for(int i = 0; i < addedMetaclasses.size(); i++) {
+ //we need to import the metaclass
+ if(!metaclassSet.contains(addedMetaclasses.get(i))) {
+ //we create an ElementImport for the new metaclass
+ ElementImport ei = UMLFactory.eINSTANCE.createElementImport();
+ //we create the class
+
+
+ ei.setImportedElement((PackageableElement)addedMetaclasses.get(i));
+ ei.setAlias(((NamedElement)addedMetaclasses.get(i)).getName());
+ // addedMetaclasses.add(addedMetaclasses.get(i));
+ ElementImport added = ei;
+
+ //we need make the import only if it doesn't exist yet!
+ EList<ElementImport> list = profile.getElementImports();
+
+ //We search if this metaclass is imported yet
+ //ListIterator<ElementImport> iterator = list.listIterator();
+ for(int iter = 0; iter < list.size(); iter++) {
+ if(list.get(iter) != null) {
+ if(list.get(iter).getImportedElement() != null) {
+ if(ei.getImportedElement().getQualifiedName().equals(list.get(iter).getImportedElement().getQualifiedName())) {
+ added = list.get(iter);//iterator.previous();
+ break;
+ }
+ }
+ }
+ }
- addedMetaclasses = cmcd.getAddedMetaclasses();
+ //we add the metaclass in metaclassReference
+ SetRequest setRequest = new SetRequest(profile, UMLPackage.eINSTANCE.getProfile_MetaclassReference(), added);
+ SetValueCommand setValueCommand = new SetValueCommand(setRequest);
+ if(setValueCommand != null && setValueCommand.canExecute()) {
+ addingCommand.add(new ICommandProxy(setValueCommand));
+ }
- if(addedMetaclasses.size() == 0) {
- //Nothing to to after this command
- result = CommandResult.newCancelledCommandResult();
} else {
-
- for(int i = 0; i < cmcd.getAddedMetaclasses().size(); i++) {
- this.customRequestAdapter.setNewElement((EObject)cmcd.getAddedMetaclasses().get(i));
- }
+ //the metaclass is already imported, nothing to do here!
+ }
+ this.customRequestAdapter.setNewElement((EObject)addedMetaclasses.get(i));
+ }
+ if(addingCommand != null && addingCommand.canExecute()) {
+ try {
+ LookForElement.getCommandStack().execute(addingCommand);
result = CommandResult.newOKCommandResult(this.customRequestAdapter);
+ } catch (Exception e) {
+ Activator.log.error(e);
}
-
}
-
return result;
-
}
- /**
- *
- * @return the list of the added Metaclasses
- */
- public ArrayList<Object> getAddedMetaclasses() {
- return addedMetaclasses;
- }
-
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/commands/SetStereotypeVisibleOnMetaclassCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/commands/SetStereotypeVisibleOnMetaclassCommand.java
new file mode 100644
index 00000000000..f58a96c37b7
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/commands/SetStereotypeVisibleOnMetaclassCommand.java
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.custom.commands;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.umlutils.ui.VisualInformationPapyrusConstant;
+import org.eclipse.papyrus.umlutils.ui.helper.AppliedStereotypeHelper;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ElementImport;
+
+/**
+ *
+ * This command is used to set visible the Stereotype <<Metaclass>> on a metaclass after a drop.
+ *
+ * We call this command when we can't call directly AppliedStereotypeHelper.getAddAppliedStereotypeCommand, because the view is not yet created!
+ *
+ */
+public class SetStereotypeVisibleOnMetaclassCommand extends AbstractTransactionalCommand {
+
+ /** the semantic link */
+ private Element semanticLink;
+
+ /** the view descriptor */
+ private CreateViewRequest.ViewDescriptor cmdResult = null;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * the {@link TransactionalEditingDomain}
+ * @param label
+ * the label for the command
+ * @param affectedFiles
+ * the affected files
+ * @param semanticLink
+ * the link
+ * @param descriptor
+ * the view descriptor for the metaclass
+ */
+ public SetStereotypeVisibleOnMetaclassCommand(TransactionalEditingDomain domain, String label, List<?> affectedFiles, Element semanticLink, CreateViewRequest.ViewDescriptor descriptor) {
+ super(domain, label, affectedFiles);
+ this.semanticLink = semanticLink;
+ this.cmdResult = descriptor;
+ }
+
+ /**
+ *
+ * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor,
+ * org.eclipse.core.runtime.IAdaptable)
+ *
+ * @param monitor
+ * @param info
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if(semanticLink instanceof ElementImport) {
+ Class metaclass = (Class)((ElementImport)semanticLink).getImportedElement();
+ View node = (View)(this.cmdResult).getAdapter(View.class);
+ Element UMLelement = metaclass;
+ String stereotypeName = UMLelement.getAppliedStereotypes().get(0).getQualifiedName();
+ Command command = AppliedStereotypeHelper.getAddAppliedStereotypeCommand(getEditingDomain(), node, stereotypeName, VisualInformationPapyrusConstant.STEREOTYPE_TEXT_HORIZONTAL_PRESENTATION);
+ if(command.canExecute()) {
+ command.execute();
+ }
+ }
+ return CommandResult.newOKCommandResult();
+ }
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/helper/ExtensionHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/helper/ExtensionHelper.java
index a8969a40b7b..a2683947bb7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/helper/ExtensionHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/helper/ExtensionHelper.java
@@ -19,6 +19,7 @@ import java.util.List;
import org.eclipse.emf.common.command.IdentityCommand;
import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.commands.Command;
@@ -29,20 +30,24 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.core.editor.CoreMultiDiagramEditor;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGEFCommandWrapper;
import org.eclipse.papyrus.diagram.common.helper.ElementHelper;
import org.eclipse.papyrus.diagram.common.helper.NamedElementHelper;
import org.eclipse.papyrus.diagram.common.util.DiagramEditPartsUtil;
import org.eclipse.papyrus.diagram.common.util.MDTUtil;
+import org.eclipse.papyrus.diagram.common.util.Util;
import org.eclipse.papyrus.diagram.profile.custom.policies.ExtensionCustomNameEditPolicy;
import org.eclipse.papyrus.diagram.profile.edit.parts.ExtensionEditPart;
import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.AggregationKind;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Extension;
import org.eclipse.uml2.uml.ExtensionEnd;
+import org.eclipse.uml2.uml.Profile;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Stereotype;
import org.eclipse.uml2.uml.Type;
@@ -79,34 +84,43 @@ public class ExtensionHelper extends ElementHelper {
static public Command getDestroyExtensionCommand(Class metaclass) {
CompoundCommand cc = new CompoundCommand("Destroy Extension"); //$NON-NLS-1$
- /**
+
+ /* get all the profile and sub-profile for the diagram */
+ CoreMultiDiagramEditor editor = (CoreMultiDiagramEditor)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ DiagramEditPart rootProfileEP = editor.getDiagramEditPart();
+ Profile rootProfile = (Profile)((View)rootProfileEP.getModel()).getElement();
+ List<?> profileList = Util.getInstancesFilteredByType(rootProfile, rootProfile.getClass(), null);
+
+ /*
* get all the extension of the metaclass
- * /!\ some of them comes from the metamodel UML
+ * /!\ some of them comes from the UML MetaModel
*/
-
EList<Extension> extensionList = metaclass.getExtensions();
- /**
- * get the extension to destroy
+ /*
+ * get the extensions to destroy
*
- * All the user's extension have this name : Extension_xxx
+ * All the user's extension are owned by the rootProfile or a sub-profile
*/
+
ArrayList<Extension> extensionsToDestroy = new ArrayList<Extension>();
for(Extension extension : extensionList) {
- if(extension.getName().contains(ExtensionHelper.EXTENSION)) {
+ EObject containerExt = extension.eContainer();
+ //test if it's a user extension or a metamodel extension
+ if(profileList.contains(containerExt) || containerExt == rootProfile) {
extensionsToDestroy.add(extension);
-
}
+
}
- /**
+ /*
* Destroy the property in the stereotypes
*/
for(int iterExt = 0; iterExt < extensionsToDestroy.size(); iterExt++) {
cc.add(StereotypeHelper.getRemovePropertyCommand(extensionsToDestroy.get(iterExt)));
}
- /**
+ /*
* Destroy the extensions
*/
for(Extension extension : extensionsToDestroy) {
@@ -116,7 +130,7 @@ public class ExtensionHelper extends ElementHelper {
}
if(cc.isEmpty()) {
- //this command do nothing!
+ //this command does nothing!
cc.add(new EMFtoGEFCommandWrapper(new IdentityCommand()));
}
return cc;
@@ -137,7 +151,7 @@ public class ExtensionHelper extends ElementHelper {
EditPolicy policy = null;
//find the ExtensionEditPart
- List view = DiagramEditPartsUtil.getEObjectViews(link);
+ List<?> view = DiagramEditPartsUtil.getEObjectViews(link);
if(!view.isEmpty()) {
IEditorPart editor = MDTUtil.getActiveEditor();
DiagramEditPart diagram = ((PapyrusMultiDiagramEditor)editor).getDiagramEditPart();
@@ -200,7 +214,7 @@ public class ExtensionHelper extends ElementHelper {
oldName = oldName.substring(deducedName.length());
try {
Integer test = Integer.parseInt(oldName);
- //if there is not exception, the name didn't edited by the user
+ //if there is not exception, the name has not been edited by the user
link.setName(getExtensionName((Element)link.eContainer(), newSource, (Class)targetType));
} catch (NumberFormatException e) {
//do nothing
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/helper/MetaclassHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/helper/MetaclassHelper.java
index d95b3179dff..696c6963802 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/helper/MetaclassHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/helper/MetaclassHelper.java
@@ -16,8 +16,6 @@
package org.eclipse.papyrus.diagram.profile.custom.helper;
-import java.util.List;
-
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.EditPart;
@@ -28,13 +26,13 @@ import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.Shape;
import org.eclipse.papyrus.diagram.common.helper.ElementHelper;
-import org.eclipse.papyrus.diagram.common.util.DiagramEditPartsUtil;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileDiagramEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfilePackageableElementCompartmentEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfilePackageableElementCompartmentEditPartTN;
import org.eclipse.uml2.uml.ElementImport;
+import org.eclipse.uml2.uml.Extension;
+import org.eclipse.uml2.uml.ExtensionEnd;
import org.eclipse.uml2.uml.Profile;
/**
@@ -78,12 +76,24 @@ public class MetaclassHelper extends ElementHelper {
return parentProfile;
}
+ /**
+ * Returns the command to destroy the metaclass view and the associated {@link ElementImport}.
+ *
+ * @param metaclass
+ * the metaclass to destroy
+ * @param parentProfile
+ * the parent Profile
+ * @return
+ * the command to destroy the metaclass view, the corresponding {@link ElementImport}, the {@link Extension}, the {@link ExtensionEnd} and
+ * the associated properties
+ *
+ */
static public Command getDestroyMetaclassCommand(org.eclipse.uml2.uml.Class metaclass, EObject parentProfile) {
CompoundCommand cc = new CompoundCommand("Destroy Metaclass"); //$NON-NLS-1$
String qName = metaclass.getQualifiedName();
- /**
+ /*
* get the root profile
*/
@@ -93,26 +103,7 @@ public class MetaclassHelper extends ElementHelper {
parentProfile = parentProfile.eContainer();
}
- /**
- * All EditPart for the metaclass to destroy
- */
- List<Shape> allMetaclassEP = DiagramEditPartsUtil.getEObjectViews(metaclass);
- cc.add(ExtensionHelper.getDestroyExtensionCommand(metaclass));
-
- /**
- * Destroy the metaclass's views!
- */
- for(int iterEP = 0; iterEP < allMetaclassEP.size(); iterEP++) {
- DestroyElementRequest destroyImportedElementRequest = new DestroyElementRequest(allMetaclassEP.get(iterEP), false);
- DestroyElementCommand destroyImportedElementCommand = new DestroyElementCommand(destroyImportedElementRequest);
- if(destroyImportedElementCommand != null && destroyImportedElementCommand.canExecute()) {
- cc.add(new ICommandProxy(destroyImportedElementCommand));
- }
-
- }
-
-
- /**
+ /*
* Destroy the ElementImport
*/
EList<ElementImport> importedElements = ((Profile)rootProfile).getElementImports();
@@ -127,6 +118,11 @@ public class MetaclassHelper extends ElementHelper {
}
}
+ /*
+ * Destroy the extensions
+ */
+ cc.add(ExtensionHelper.getDestroyExtensionCommand(metaclass));
+
return cc;
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/messages/Messages.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/messages/Messages.java
index 5a56f14d6bd..a6916760cb8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/messages/Messages.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/messages/Messages.java
@@ -24,6 +24,15 @@ public class Messages extends NLS {
public static String CustomSemanticCreateCommand_MetaclassImport0;
public static String CustomSemanticCreateCommand_FetchingMetaclasses;
+
+ public static String ChooseSetMetaclassDialog_Metaclasses;
+
+ public static String ChooseSetMetaclassDialog_ImportedMetaclasses;
+
+ public static String ChooseSetMetaclassDialog_Metaclass;
+
+ public static String ChooseSetMetaclassDialog_Information;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/messages/messages.properties b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/messages/messages.properties
index 3cfefdb83ca..0f18c197b75 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/messages/messages.properties
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/messages/messages.properties
@@ -1,2 +1,7 @@
CustomSemanticCreateCommand_MetaclassImport0=Metaclass Import
CustomSemanticCreateCommand_FetchingMetaclasses=Fetching metaclasses...
+ChooseSetMetaclassDialog_Metaclasses=Metaclasses:
+ChooseSetMetaclassDialog_ImportedMetaclasses=Imported meta-classes:
+ChooseSetMetaclassDialog_Metaclass=Metaclass
+ChooseSetMetaclassDialog_Information=Information
+
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/ExtensionCustomNameEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/ExtensionCustomNameEditPolicy.java
index c0b831c8dff..29078bbf34a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/ExtensionCustomNameEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/ExtensionCustomNameEditPolicy.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.core.utils.EditorUtils;
import org.eclipse.papyrus.diagram.common.Activator;
import org.eclipse.papyrus.diagram.profile.custom.helper.ExtensionHelper;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Extension;
import org.eclipse.uml2.uml.ExtensionEnd;
import org.eclipse.uml2.uml.Stereotype;
@@ -53,6 +54,18 @@ public class ExtensionCustomNameEditPolicy extends AbstractEditPolicy implements
/** stores the host associated semantic element */
protected EObject hostSemanticElement;
+ /**
+ * This field contains the name of the extension.
+ * It is not modified when the user edit the extension name, so this field is used to know if we can
+ * modify the extension name or not when we edit the stereotype name.
+ */
+ protected String systemExtensionName;
+
+ /**
+ *
+ * Constructor.
+ *
+ */
public ExtensionCustomNameEditPolicy() {
super();
}
@@ -70,6 +83,7 @@ public class ExtensionCustomNameEditPolicy extends AbstractEditPolicy implements
if(hostSemanticElement instanceof Extension) {
Stereotype stereotype = ((Extension)hostSemanticElement).getStereotype();
getDiagramEventBroker().addNotificationListener(stereotype, this);
+ this.systemExtensionName = ((Extension)hostSemanticElement).getName();
}
}
@@ -124,6 +138,8 @@ public class ExtensionCustomNameEditPolicy extends AbstractEditPolicy implements
Display.getCurrent().asyncExec(new Runnable() {
+
+
public void run() {
String oldName = ((Extension)hostSemanticElement).getName();
String deducedName = ExtensionHelper.deduceExtensionNameFromProperties(((Extension)hostSemanticElement));
@@ -131,20 +147,22 @@ public class ExtensionCustomNameEditPolicy extends AbstractEditPolicy implements
CompositeCommand cc = new CompositeCommand("Change Extension Name"); //$NON-NLS-1$
Extension ext = ((Extension)hostSemanticElement);
Stereotype ste = ((Extension)hostSemanticElement).getStereotype();
- String newName = ExtensionHelper.EXTENSION + ste.getName();
+ String newExtEndName = ExtensionHelper.EXTENSION + ste.getName();
//Command to change the Extension's name
//only if the used doesn't have modify its name
- if(oldName.equals(deducedName)) {
- SetRequest setRequestExt = new SetRequest(domain, ext, UMLPackage.eINSTANCE.getNamedElement_Name(), newName);
+ String newExtensionName = ExtensionHelper.getExtensionName((Element)hostSemanticElement, ((Extension)hostSemanticElement).getStereotype(), ((Extension)hostSemanticElement).getMetaclass());
+ if(systemExtensionName.equals(((Extension)hostSemanticElement).getName())) {
+ SetRequest setRequestExt = new SetRequest(domain, ext, UMLPackage.eINSTANCE.getNamedElement_Name(), newExtensionName);
SetValueCommand setValueCommandExt = new SetValueCommand(setRequestExt);
cc.add(setValueCommandExt);
+ systemExtensionName = newExtensionName;
}
//command to change the ExtensionEnd's name
//There is only ONE ExtensionEnd
ExtensionEnd extEnd = (ExtensionEnd)((Extension)hostSemanticElement).getOwnedEnds().get(0);
- SetRequest setRequestExtEnd = new SetRequest(domain, extEnd, UMLPackage.eINSTANCE.getNamedElement_Name(), newName.replaceFirst("E", "e")); //$NON-NLS-1$ //$NON-NLS-2$
+ SetRequest setRequestExtEnd = new SetRequest(domain, extEnd, UMLPackage.eINSTANCE.getNamedElement_Name(), newExtEndName.replaceFirst("E", "e")); //$NON-NLS-1$ //$NON-NLS-2$
SetValueCommand setValueCommandExtEnd = new SetValueCommand(setRequestExtEnd);
cc.add(setValueCommandExtEnd);
((IGraphicalEditPart)getHost()).getDiagramEditDomain().getDiagramCommandStack().execute(new ICommandProxy(cc));
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/ProfileDiagramDragDropEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/ProfileDiagramDragDropEditPolicy.java
index 7b94bd0e437..79b9ba6885c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/ProfileDiagramDragDropEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/ProfileDiagramDragDropEditPolicy.java
@@ -51,6 +51,7 @@ import org.eclipse.papyrus.diagram.common.commands.CommonDeferredCreateConnectio
import org.eclipse.papyrus.diagram.common.commands.SemanticAdapter;
import org.eclipse.papyrus.diagram.common.editpolicies.CommonDiagramDragDropEditPolicy;
import org.eclipse.papyrus.diagram.common.util.DiagramEditPartsUtil;
+import org.eclipse.papyrus.diagram.profile.custom.commands.SetStereotypeVisibleOnMetaclassCommand;
import org.eclipse.papyrus.diagram.profile.custom.helper.ClassLinkMappingHelper;
import org.eclipse.papyrus.diagram.profile.custom.helper.MultiAssociationHelper;
import org.eclipse.papyrus.diagram.profile.custom.helper.MultiDependencyHelper;
@@ -342,16 +343,39 @@ public class ProfileDiagramDragDropEditPolicy extends CommonDiagramDragDropEditP
* get the host's model
*/
- Object model = getHost().getModel();
+ CompositeCommand cc = new CompositeCommand("Drop"); //$NON-NLS-1$
+ IAdaptable elementAdapter = new EObjectAdapter(metaclass);
+ ViewDescriptor descriptor;
+
+ //we create the view command
if(containerView.get(0).equals(getHost().getModel())) {//we are on the diagram
- return new ICommandProxy(getDefaultDropNodeCommand(MetaclassEditPart.VISUAL_ID, dropRequest.getLocation(), metaclass));
+ descriptor = new ViewDescriptor(elementAdapter, Node.class, ((IHintedType)getUMLElementType(MetaclassEditPart.VISUAL_ID)).getSemanticHint(), ViewUtil.APPEND, false, getDiagramPreferencesHint());
} else {
- return new ICommandProxy(getDefaultDropNodeCommand(MetaclassEditPartCN.VISUAL_ID, dropRequest.getLocation(), metaclass));
+ descriptor = new ViewDescriptor(elementAdapter, Node.class, ((IHintedType)getUMLElementType(MetaclassEditPartCN.VISUAL_ID)).getSemanticHint(), ViewUtil.APPEND, false, getDiagramPreferencesHint());
}
- }
+ CreateCommand createCommand = new CreateCommand(getEditingDomain(), descriptor, ((View)(getHost().getModel())));
+ cc.compose(createCommand);
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)createCommand.getCommandResult().getReturnValue(), dropRequest.getLocation()); //$NON-NLS-1$
+ cc.compose(setBoundsCommand);
+
+ /*
+ * we set the stereotype <<metaclass>> visible
+ * we can not call AppliedStereotypeHelper.getAddAppliedStereotypeCommand here,
+ * because createCommand.getResult( ((ViewDescriptor)createCommand.getCommandResult().getReturnValue()).getAdapter(View.class) return
+ * null :
+ * the view is not yet created!!!
+ */
+ if(createCommand.canExecute()) {
+ SetStereotypeVisibleOnMetaclassCommand stereotypeCommand = new SetStereotypeVisibleOnMetaclassCommand(getEditingDomain(), "Set Stereotype Visible", null, semanticLink, (ViewDescriptor)createCommand.getCommandResult().getReturnValue()); //$NON-NLS-1$
+ if(stereotypeCommand.canExecute()) {
+ cc.add(stereotypeCommand);
+ }
+ }
+ return new ICommandProxy(cc);
+ }
}
return UnexecutableCommand.INSTANCE;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/itemsemantic/CustomExtensionItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/itemsemantic/CustomExtensionItemSemanticEditPolicy.java
index 108e4ae1ed0..e90da7ad96a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/itemsemantic/CustomExtensionItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/itemsemantic/CustomExtensionItemSemanticEditPolicy.java
@@ -38,11 +38,11 @@ public class CustomExtensionItemSemanticEditPolicy extends ExtensionItemSemantic
EObject elementToDestroy = req.getElementToDestroy();
if(elementToDestroy instanceof Extension) {
- cc.add(StereotypeHelper.getRemovePropertyCommand((Extension)elementToDestroy));
- if(cc.canExecute()) {
- int dummy = 0;
- dummy++;
+ Command steCmd = StereotypeHelper.getRemovePropertyCommand((Extension)elementToDestroy);
+ if(steCmd.canExecute()) {
+ cc.add(steCmd);
}
+ cc.add(super.getDestroyElementCommand(req));
}
return cc;
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicy.java
new file mode 100644
index 00000000000..069aa93eafa
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicy.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.diagram.profile.custom.commands.CustomAssociationReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.policies.PrimitiveTypeItemSemanticEditPolicy;
+import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
+
+
+
+/**
+ * this a specialization to manage creation of association
+ */
+public class CustomPrimitiveTypeItemSemanticEditPolicy extends PrimitiveTypeItemSemanticEditPolicy {
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.Association_4001 == req.getElementType()) {
+ return getGEFWrapper(new org.eclipse.papyrus.diagram.profile.custom.commands.CustomAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch(getVisualID(req)) {
+ case AssociationEditPart.VISUAL_ID:
+ return getGEFWrapper(new CustomAssociationReorientCommand(req));
+ }
+ return super.getReorientRelationshipCommand(req);
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.Association_4001 == req.getElementType()) {
+ return getGEFWrapper(new org.eclipse.papyrus.diagram.profile.custom.commands.CustomAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ //forbid creation of association branch from it.
+ if(UMLElementTypes.Association_4019 == req.getElementType()) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ return super.getStartCreateRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicyCN.java
new file mode 100644
index 00000000000..d0aee27af41
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicyCN.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.diagram.profile.custom.commands.CustomAssociationReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.policies.PrimitiveTypeItemSemanticEditPolicy;
+import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
+
+
+/**
+ * this a specialization to manage creation of association
+ */
+public class CustomPrimitiveTypeItemSemanticEditPolicyCN extends PrimitiveTypeItemSemanticEditPolicy {
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.Association_4001 == req.getElementType()) {
+ return getGEFWrapper(new org.eclipse.papyrus.diagram.profile.custom.commands.CustomAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch(getVisualID(req)) {
+ case AssociationEditPart.VISUAL_ID:
+ return getGEFWrapper(new CustomAssociationReorientCommand(req));
+ }
+ return super.getReorientRelationshipCommand(req);
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.Association_4001 == req.getElementType()) {
+ return getGEFWrapper(new org.eclipse.papyrus.diagram.profile.custom.commands.CustomAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ //forbid creation of association branch from it.
+ if(UMLElementTypes.Association_4019 == req.getElementType()) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ return super.getStartCreateRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/ui/dialog/ChooseSetMetaclassDialog.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/ui/dialog/ChooseSetMetaclassDialog.java
index 637d021c77c..7779a912cb3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/ui/dialog/ChooseSetMetaclassDialog.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/ui/dialog/ChooseSetMetaclassDialog.java
@@ -18,22 +18,16 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
-import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.papyrus.diagram.common.Activator;
-import org.eclipse.papyrus.diagram.profile.custom.helper.MetaclassHelper;
+import org.eclipse.papyrus.diagram.profile.custom.messages.Messages;
import org.eclipse.papyrus.diagram.profile.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.profile.ui.dialogs.AlphabeticalViewerSorter;
import org.eclipse.papyrus.profile.ui.dialogs.ChooseSetAssistedDialog;
-import org.eclipse.papyrus.profile.ui.dialogs.ElementList;
import org.eclipse.papyrus.profile.ui.dialogs.IChooseDialog;
import org.eclipse.papyrus.ui.toolbox.LookForElement;
import org.eclipse.swt.SWT;
@@ -45,15 +39,15 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.ElementImport;
import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.PackageableElement;
import org.eclipse.uml2.uml.Profile;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
/**
*
+ * This dialog allows to choose the metaclass to import in the profile.
+ * This dialog doesn't allow remove imported metaclass.
+ * This dialog doesn't show the metaclasses which are already imported in the profile
+ *
*/
public class ChooseSetMetaclassDialog extends ChooseSetAssistedDialog implements IChooseDialog {
@@ -63,18 +57,12 @@ public class ChooseSetMetaclassDialog extends ChooseSetAssistedDialog implements
*/
protected Profile profile;
- protected ArrayList<Object> addedMetaclasses;
-
- protected ArrayList<Object> deletedMetaclasses;
-
/**
* @param parentShell
* @param profile
*/
public ChooseSetMetaclassDialog(Shell parentShell, Profile profile) {
this(parentShell, profile, true);
- addedMetaclasses = new ArrayList<Object>();
- deletedMetaclasses = new ArrayList<Object>();
}
/**
@@ -100,26 +88,13 @@ public class ChooseSetMetaclassDialog extends ChooseSetAssistedDialog implements
this.profile = (Profile)oldContainer;
selectedElementList = new ElementListWithComparator(new ClassElementComparator());
-
+ // redrawedMetaclasses = new ArrayList<Object>();
labelProvider = new MetaclassLabelProvider();
decoratedContentProposalProvider = new MetaclassContentProposalProvider();
- if(retrieveImported) {
- Iterator metaclasses = this.profile.getReferencedMetaclasses().iterator();
- while(metaclasses.hasNext()) {
- selectedElementList.addElement(metaclasses.next());
- }
- }
-
- Iterator metaclasses = LookForElement.getPossibleMetaclasses(this.profile).iterator();
+ Iterator<?> metaclasses = LookForElement.getPossibleMetaclasses(this.profile).iterator();
while(metaclasses.hasNext()) {
- Object currentPossibleMetaclass = metaclasses.next();
-
- // for each element in the metaclasses collection, check if this class is not already
- // imported
- if(!selectedElementList.contains(currentPossibleMetaclass)) {
- possibleElementList.addElement(currentPossibleMetaclass);
- }
+ possibleElementList.addElement(metaclasses.next());
}
}
@@ -183,7 +158,7 @@ public class ChooseSetMetaclassDialog extends ChooseSetAssistedDialog implements
protected void runAddElement(String name) {
// find the class in the list
Class theClass = null;
- Iterator it = possibleElementList.getElements().iterator();
+ Iterator<?> it = possibleElementList.getElements().iterator();
while(it.hasNext()) {
Class current = (Class)it.next();
if(name.equalsIgnoreCase(current.getName()) || name.equalsIgnoreCase(current.getQualifiedName())) {
@@ -211,7 +186,7 @@ public class ChooseSetMetaclassDialog extends ChooseSetAssistedDialog implements
@Override
protected boolean isSelectableElement(String text) {
// iterate through all possibilities and return true if text corresponds
- Iterator it = possibleElementList.getElements().iterator();
+ Iterator<?> it = possibleElementList.getElements().iterator();
while(it.hasNext()) {
Class element = (Class)it.next();
if(text.equalsIgnoreCase(element.getName()) || text.equalsIgnoreCase(element.getQualifiedName())) {
@@ -221,117 +196,6 @@ public class ChooseSetMetaclassDialog extends ChooseSetAssistedDialog implements
return false;
}
- /*
- * (non-Javadoc)
- *
- * @see com.cea.papyrus.core.utils.dialog.ChooseSetDialog#okPressed()
- */
- /**
- *
- */
- @Override
- protected void okPressed() {
- applyModifications();
- super.okPressed();
- }
-
- /**
- * Apply modification when the button ok is pressed.
- */
- protected void applyModifications() {
- //----Obtain the actual imported metaclasses
- EList metaclassSet = profile.getReferencedMetaclasses();
- CompoundCommand deletingCommand = new CompoundCommand();
- CompoundCommand addingCommand = new CompoundCommand();
-
- for(int i = 0; i < metaclassSet.size(); i++) {
- //we verify if some metaclasses need to be removed
- if(!selectedElementList.contains(metaclassSet.get(i))) {
-
- //we delete the metaclass
- org.eclipse.uml2.uml.Class theClass = (org.eclipse.uml2.uml.Class)metaclassSet.get(i);
- EList<ElementImport> importSet = profile.getMetaclassReferences();
-
- for(int j = 0; j < importSet.size(); j++) {
- if((importSet.get(j)).getImportedElement() != null) {
- org.eclipse.uml2.uml.Class importedClass = (org.eclipse.uml2.uml.Class)(importSet.get(j)).getImportedElement();
- if(importedClass.equals(theClass)) {
-
- //we need to destroy the extensions and remove the attribute in the stereotype
- deletingCommand.add(MetaclassHelper.getDestroyMetaclassCommand(theClass, this.profile));
- }
- }
- }
-
-
-
- }
-
- }
-
- if(deletingCommand != null && deletingCommand.canExecute()) {
- try {
- LookForElement.getCommandStack().execute(deletingCommand);
- } catch (Exception e) {
-
- e.printStackTrace();
- }
- }
-
- //we add the new metaclasses
- for(int i = 0; i < selectedElementList.getElements().size(); i++) {
- if(!metaclassSet.contains(selectedElementList.getElements().get(i))) {
- //we create an ElementImport for the new metaclass
- ElementImport ei = UMLFactory.eINSTANCE.createElementImport();
- //we create the class
-
-
- ei.setImportedElement((PackageableElement)selectedElementList.getElements().get(i));
-
- ei.setAlias(((NamedElement)selectedElementList.getElements().get(i)).getName());
- addedMetaclasses.add(selectedElementList.getElements().get(i));
- ElementImport added = ei;
-
- //we need make the import only if it doesn't exist yet!
- EList<ElementImport> list = profile.getElementImports();
-
- //We search if this metaclass is imported yet
- //ListIterator<ElementImport> iterator = list.listIterator();
- for(int iter = 0; iter < list.size(); iter++) {
- if(list.get(iter) != null) {
- String qNameEI = ei.getImportedElement().getQualifiedName();
- if(list.get(iter).getImportedElement() != null) {
- String qNamelist = list.get(iter).getImportedElement().getQualifiedName();
- if(ei.getImportedElement().getQualifiedName().equals(list.get(iter).getImportedElement().getQualifiedName())) {
-
- //the metaclass is yet imported, we take it to put it in the metaclassReference
- added = list.get(iter);//iterator.previous();
- break;
- }
- }
- }
- }
-
- //we add the metaclass in metaclassReference
- SetRequest setRequest = new SetRequest(profile, UMLPackage.eINSTANCE.getProfile_MetaclassReference(), added);
- SetValueCommand setValueCommand = new SetValueCommand(setRequest);
- if(setValueCommand != null && setValueCommand.canExecute()) {
- addingCommand.add(new ICommandProxy(setValueCommand));
- }
-
- }
- }
-
- if(addingCommand != null && addingCommand.canExecute()) {
- try {
- LookForElement.getCommandStack().execute(addingCommand);
- } catch (Exception e) {
-
- e.printStackTrace();
- }
- }
-
- }
/**
*
@@ -358,7 +222,7 @@ public class ChooseSetMetaclassDialog extends ChooseSetAssistedDialog implements
ArrayList<DecoratedContentProposal> proposals = new ArrayList<DecoratedContentProposal>();
if(possibleElementList != null) {
- Iterator it = possibleElementList.getElements().iterator();
+ Iterator<?> it = possibleElementList.getElements().iterator();
while(it.hasNext()) {
final NamedElement element = (NamedElement)it.next();
final String simpleName = element.getName();
@@ -542,24 +406,4 @@ public class ChooseSetMetaclassDialog extends ChooseSetAssistedDialog implements
}
}
- public ElementList getElement() {
- // TODO Auto-generated method stub
- return selectedElementList;
- }
-
- /**
- *
- * @return the added metaclasses
- */
- public ArrayList<Object> getAddedMetaclasses() {
- return addedMetaclasses;
- }
-
- /**
- *
- * @return the deleted metaclasses
- */
- public ArrayList<Object> getDeletedMetaclasses() {
- return deletedMetaclasses;
- }
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/ui/dialog/Messages.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/ui/dialog/Messages.java
deleted file mode 100644
index b01d5530c9b..00000000000
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/ui/dialog/Messages.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*****************************************************************************
- * 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
- *
- *****************************************************************************/
-package org.eclipse.papyrus.diagram.profile.custom.ui.dialog;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.diagram.profile.custom.ui.dialog.messages"; //$NON-NLS-1$
-
- public static String ChooseSetMetaclassDialog_Metaclasses;
-
- public static String ChooseSetMetaclassDialog_ImportedMetaclasses;
-
- public static String ChooseSetMetaclassDialog_Metaclass;
-
- public static String ChooseSetMetaclassDialog_Information;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/ui/dialog/messages.properties b/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/ui/dialog/messages.properties
deleted file mode 100644
index e2a4526d0d5..00000000000
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/custom-src/org/eclipse/papyrus/diagram/profile/custom/ui/dialog/messages.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-ChooseSetMetaclassDialog_Metaclasses=Metaclasses:
-ChooseSetMetaclassDialog_ImportedMetaclasses=Imported meta-classes:
-ChooseSetMetaclassDialog_Metaclass=Metaclass
-ChooseSetMetaclassDialog_Information=Information
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/messages.properties b/plugins/uml/org.eclipse.papyrus.diagram.profile/messages.properties
index 5c107f8c387..2aa6d59b128 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/messages.properties
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/messages.properties
@@ -201,3 +201,7 @@ createEnumerationLiteral3CreationTool_title=EnumerationLiteral
createEnumerationLiteral3CreationTool_desc=Add new EnumerationLiteral
createImportMetaclass3CreationTool_title=Import Metaclass
createImportMetaclass3CreationTool_desc=Import a new Metaclass
+createPrimitiveType6CreationTool_title=PrimitiveType
+createPrimitiveType6CreationTool_desc=Create new PrimitiveType
+createReception17CreationTool_title=DataType
+createReception17CreationTool_desc=Create new DataType
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/model/profilediagram.gmfgen b/plugins/uml/org.eclipse.papyrus.diagram.profile/model/profilediagram.gmfgen
index 3f26bcc3e05..aa818f5ac6d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/model/profilediagram.gmfgen
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/model/profilediagram.gmfgen
@@ -41,6 +41,87 @@
<domainDiagramElement
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Profile"/>
<childNodes
+ visualID="3026"
+ editPartClassName="PrimitiveTypeEditPartCN"
+ itemSemanticEditPolicyClassName="PrimitiveTypeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="PrimitiveTypeCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="PrimitiveTypeGraphicalNodeEditPolicyCN"
+ createCommandClassName="PrimitiveTypeCreateCommandCN"
+ containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.3 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.2">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.diagram.common.figure.node.PrimitiveTypeFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="50"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.diagram.common.editpolicies.HyperLinkPopupBarEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.diagram.profile.custom.policies.itemsemantic.CustomPrimitiveTypeItemSemanticEditPolicyCN"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5058"
+ editPartClassName="PrimitiveTypeNameEditPartCN"
+ itemSemanticEditPolicyClassName="PrimitiveTypeNameItemSemanticEditPolicyCN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:StyleAttributes"
+ fixedFont="true"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
xsi:type="gmfgen:GenChildLabelNode"
visualID="3019"
editPartClassName="DataTypeOperationEditPart"
@@ -707,11 +788,11 @@
editPartClassName="PackageEditPartCN"
itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicyCN"
canonicalEditPolicyClassName="PackageCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.10"
+ childNodes="/0/@diagram/@childNodes.11"
compartments="/0/@diagram/@compartments.1"
graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicyCN"
createCommandClassName="PackageCreateCommandCN"
- containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@childNodes.10 /0/@diagram/@compartments.3 /0/@diagram/@compartments.2 /0/@diagram/@compartments.9 /0/@diagram/@compartments.8">
+ containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@childNodes.11 /0/@diagram/@compartments.3 /0/@diagram/@compartments.2 /0/@diagram/@compartments.9 /0/@diagram/@compartments.8">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
@@ -966,7 +1047,7 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.10/@elementType"/>
+ metamodelType="/0/@diagram/@topLevelNodes.11/@elementType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.diagram.common.figure.node.DataTypeFigure">
@@ -1239,7 +1320,7 @@
xsi:type="gmfgen:SpecializationType"
uniqueIdentifier="org.eclipse.papyrus.diagram.profile.Metaclass_1031"
displayName="Metaclass"
- metamodelType="/0/@diagram/@childNodes.6/@elementType"/>
+ metamodelType="/0/@diagram/@childNodes.7/@elementType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.diagram.common.figure.node.ClassifierFigure">
@@ -1771,6 +1852,82 @@
</labels>
</topLevelNodes>
<topLevelNodes
+ visualID="2009">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.0/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.diagram.common.figure.node.PrimitiveTypeFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="50"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.diagram.common.editpolicies.HyperLinkPopupBarEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.diagram.profile.custom.policies.itemsemantic.CustomPrimitiveTypeItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5032"
+ editPartClassName="PrimitiveTypeNameEditPart"
+ itemSemanticEditPolicyClassName="PrimitiveTypeNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:StyleAttributes"
+ fixedFont="true"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
visualID="2010"
compartments="/0/@diagram/@compartments.12 /0/@diagram/@compartments.14">
<diagramRunTimeClass
@@ -2550,7 +2707,7 @@
editPartClassName="PackagePackageableElementCompartmentEditPart"
itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicy"
canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13"
+ childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.14"
title="PackageableElementCompartment"
canCollapse="false"
needsTitle="false"
@@ -2584,11 +2741,11 @@
editPartClassName="PackagePackageableElementCompartmentEditPartCN"
itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicyCN"
canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13"
+ childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.14"
title="PackageableElementCompartmentCN"
canCollapse="false"
needsTitle="false"
- node="/0/@diagram/@childNodes.10"
+ node="/0/@diagram/@childNodes.11"
listLayout="false">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
@@ -2618,7 +2775,7 @@
editPartClassName="ProfilePackageableElementCompartmentEditPartTN"
itemSemanticEditPolicyClassName="ProfilePackageableElementCompartmentItemSemanticEditPolicyTN"
canonicalEditPolicyClassName="ProfilePackageableElementCompartmentCanonicalEditPolicyTN"
- childNodes="/0/@diagram/@childNodes.5 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.6"
+ childNodes="/0/@diagram/@childNodes.6 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.7"
title="ProfilePackageableElementCompartmentTN"
canCollapse="false"
needsTitle="false"
@@ -2652,11 +2809,11 @@
editPartClassName="ProfilePackageableElementCompartmentEditPartCN"
itemSemanticEditPolicyClassName="ProfilePackageableElementCompartmentItemSemanticEditPolicyCN"
canonicalEditPolicyClassName="ProfilePackageableElementCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.5 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.6"
+ childNodes="/0/@diagram/@childNodes.6 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.7"
title="ProfilePackageableElementCompartmentTN"
canCollapse="false"
needsTitle="false"
- node="/0/@diagram/@childNodes.9"
+ node="/0/@diagram/@childNodes.10"
listLayout="false">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
@@ -2686,7 +2843,7 @@
editPartClassName="StereotypeAttributeCompartmentEditPart"
itemSemanticEditPolicyClassName="StereotypeAttributeCompartmentItemSemanticEditPolicy"
canonicalEditPolicyClassName="StereotypeAttributeCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.3"
+ childNodes="/0/@diagram/@childNodes.4"
title="AttributeCompartment"
needsTitle="false"
node="/0/@diagram/@topLevelNodes.2">
@@ -2710,10 +2867,10 @@
editPartClassName="StereotypeAttributeCompartmentEditPartCN"
itemSemanticEditPolicyClassName="StereotypeAttributeCompartmentItemSemanticEditPolicyCN"
canonicalEditPolicyClassName="StereotypeAttributeCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.3"
+ childNodes="/0/@diagram/@childNodes.4"
title="AttributeCompartment"
needsTitle="false"
- node="/0/@diagram/@childNodes.5">
+ node="/0/@diagram/@childNodes.6">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<viewmap
@@ -2734,7 +2891,7 @@
editPartClassName="StereotypeOperationCompartmentEditPart"
itemSemanticEditPolicyClassName="StereotypeOperationCompartmentItemSemanticEditPolicy"
canonicalEditPolicyClassName="StereotypeOperationCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.4"
+ childNodes="/0/@diagram/@childNodes.5"
title="OperationCompartment"
needsTitle="false"
node="/0/@diagram/@topLevelNodes.2">
@@ -2758,10 +2915,10 @@
editPartClassName="StereotypeOperationCompartmentEditPartCN"
itemSemanticEditPolicyClassName="StereotypeOperationCompartmentItemSemanticEditPolicyCN"
canonicalEditPolicyClassName="StereotypeOperationCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.4"
+ childNodes="/0/@diagram/@childNodes.5"
title="OperationCompartment"
needsTitle="false"
- node="/0/@diagram/@childNodes.5">
+ node="/0/@diagram/@childNodes.6">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<viewmap
@@ -2782,7 +2939,7 @@
editPartClassName="ModelPackageableElementCompartmentEditPartTN"
itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicyTN"
canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicyTN"
- childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.7"
+ childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.14"
title="ModelElementCompartment"
canCollapse="false"
needsTitle="false"
@@ -2816,11 +2973,11 @@
editPartClassName="ModelPackageableElementCompartmentEditPartCN"
itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicyCN"
canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13"
+ childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.14"
title="ModelElementCompartment"
canCollapse="false"
needsTitle="false"
- node="/0/@diagram/@childNodes.8"
+ node="/0/@diagram/@childNodes.9"
listLayout="false">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
@@ -2850,10 +3007,10 @@
editPartClassName="EnumerationEnumerationLiteralCompartmentEditPartCN"
itemSemanticEditPolicyClassName="EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN"
canonicalEditPolicyClassName="EnumerationEnumerationLiteralCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.1"
+ childNodes="/0/@diagram/@childNodes.2"
title="EnumerationEnumerationLiteral"
needsTitle="false"
- node="/0/@diagram/@childNodes.12">
+ node="/0/@diagram/@childNodes.13">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<viewmap
@@ -2874,7 +3031,7 @@
editPartClassName="EnumerationEnumerationLiteralCompartmentEditPart"
itemSemanticEditPolicyClassName="EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy"
canonicalEditPolicyClassName="EnumerationEnumerationLiteralCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.1"
+ childNodes="/0/@diagram/@childNodes.2"
title="EnumerationEnumerationLiteral"
needsTitle="false"
node="/0/@diagram/@topLevelNodes.9">
@@ -2898,10 +3055,10 @@
editPartClassName="DataTypeAttributeCompartmentEditPart"
itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicy"
canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2"
+ childNodes="/0/@diagram/@childNodes.3"
title="DataTypeAttributeCompartment"
needsTitle="false"
- node="/0/@diagram/@topLevelNodes.10">
+ node="/0/@diagram/@topLevelNodes.11">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<viewmap
@@ -2922,10 +3079,10 @@
editPartClassName="DataTypeAttributeCompartmentEditPartCN"
itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicyCN"
canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.2"
+ childNodes="/0/@diagram/@childNodes.3"
title="DataTypeAttributeCompartment"
needsTitle="false"
- node="/0/@diagram/@childNodes.13">
+ node="/0/@diagram/@childNodes.14">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<viewmap
@@ -2946,10 +3103,10 @@
editPartClassName="DataTypeOperationCompartmentEditPart"
itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicy"
canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.0"
+ childNodes="/0/@diagram/@childNodes.1"
title="DataTypeOperationCompartment"
needsTitle="false"
- node="/0/@diagram/@topLevelNodes.10">
+ node="/0/@diagram/@topLevelNodes.11">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<viewmap
@@ -2970,10 +3127,10 @@
editPartClassName="DataTypeOperationCompartmentEditPartCN"
itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicyCN"
canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.0"
+ childNodes="/0/@diagram/@childNodes.1"
title="DataTypeOperationCompartment"
needsTitle="false"
- node="/0/@diagram/@childNodes.13">
+ node="/0/@diagram/@childNodes.14">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<viewmap
@@ -3001,35 +3158,35 @@
description="Create a new Package"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
- genNodes="/0/@diagram/@topLevelNodes.8 /0/@diagram/@childNodes.10"/>
+ genNodes="/0/@diagram/@topLevelNodes.8 /0/@diagram/@childNodes.11"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Model"
description="Add a model"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
- genNodes="/0/@diagram/@topLevelNodes.6 /0/@diagram/@childNodes.8"/>
+ genNodes="/0/@diagram/@topLevelNodes.6 /0/@diagram/@childNodes.9"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Profile"
description="Add a new Profile"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Profile.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Profile.gif"
- genNodes="/0/@diagram/@topLevelNodes.7 /0/@diagram/@childNodes.9"/>
+ genNodes="/0/@diagram/@topLevelNodes.7 /0/@diagram/@childNodes.10"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Comment"
description="Create new comment"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- genNodes="/0/@diagram/@topLevelNodes.4 /0/@diagram/@childNodes.7"/>
+ genNodes="/0/@diagram/@topLevelNodes.4 /0/@diagram/@childNodes.8"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Constraint"
description="Create a constraint"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- genNodes="/0/@diagram/@topLevelNodes.5 /0/@diagram/@childNodes.11"/>
+ genNodes="/0/@diagram/@topLevelNodes.5 /0/@diagram/@childNodes.12"/>
</groups>
<groups
title="Classifiers"
@@ -3050,28 +3207,35 @@
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Stereotype.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Stereotype.gif"
qualifiedToolName=""
- genNodes="/0/@diagram/@childNodes.5 /0/@diagram/@topLevelNodes.2"/>
+ genNodes="/0/@diagram/@childNodes.6 /0/@diagram/@topLevelNodes.2"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Import Metaclass"
description="Import a new Metaclass"
largeIconPath="/icons/Metaclass.gif"
smallIconPath="/icons/Metaclass.gif"
- genNodes="/0/@diagram/@topLevelNodes.3 /0/@diagram/@childNodes.6"/>
+ genNodes="/0/@diagram/@topLevelNodes.3 /0/@diagram/@childNodes.7"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Enumeration"
description="Create new Enumeration"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif"
- genNodes="/0/@diagram/@topLevelNodes.9 /0/@diagram/@childNodes.12"/>
+ genNodes="/0/@diagram/@topLevelNodes.9 /0/@diagram/@childNodes.13"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="DataType"
description="Create new DataType"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif"
- genNodes="/0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.13"/>
+ genNodes="/0/@diagram/@topLevelNodes.11 /0/@diagram/@childNodes.14"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="PrimitiveType"
+ description="Create new PrimitiveType"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif"
+ genNodes="/0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.0"/>
</groups>
<groups
title="RelationShips"
@@ -3168,21 +3332,21 @@
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
qualifiedToolName=""
- genNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.2"/>
+ genNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.3"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Operation"
description="Add new operation"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"
- genNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.4"/>
+ genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.5"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="EnumerationLiteral"
description="Add new EnumerationLiteral"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif"
- genNodes="/0/@diagram/@childNodes.1"/>
+ genNodes="/0/@diagram/@childNodes.2"/>
</groups>
</palette>
<preferencePages
@@ -3279,7 +3443,7 @@
<labelParsers>
<implementations
xsi:type="gmfgen:PredefinedParser"
- uses="/0/@diagram/@topLevelNodes.8/@labels.0/@modelFacet /0/@diagram/@childNodes.10/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.5/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.2/@labels.0/@modelFacet /0/@diagram/@links.4/@labels.0/@modelFacet /0/@diagram/@childNodes.5/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.7/@labels.0/@modelFacet /0/@diagram/@childNodes.9/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.0/@modelFacet /0/@diagram/@childNodes.8/@labels.0/@modelFacet /0/@diagram/@childNodes.11/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.9/@labels.0/@modelFacet /0/@diagram/@childNodes.1/@labelModelFacet /0/@diagram/@childNodes.12/@labels.0/@modelFacet /0/@diagram/@childNodes.13/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.10/@labels.0/@modelFacet /0/@diagram/@childNodes.0/@labelModelFacet /0/@diagram/@childNodes.2/@labelModelFacet /0/@diagram/@topLevelNodes.3/@labels.0/@modelFacet /0/@diagram/@links.5/@labels.0/@modelFacet /0/@diagram/@links.1/@labels.1/@modelFacet /0/@diagram/@links.1/@labels.3/@modelFacet /0/@diagram/@links.1/@labels.2/@modelFacet /0/@diagram/@childNodes.3/@labelModelFacet /0/@diagram/@links.7/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labelModelFacet /0/@diagram/@childNodes.6/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.11/@labels.0/@modelFacet"/>
+ uses="/0/@diagram/@topLevelNodes.8/@labels.0/@modelFacet /0/@diagram/@childNodes.11/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.5/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.2/@labels.0/@modelFacet /0/@diagram/@links.4/@labels.0/@modelFacet /0/@diagram/@childNodes.6/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.7/@labels.0/@modelFacet /0/@diagram/@childNodes.10/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.0/@modelFacet /0/@diagram/@childNodes.9/@labels.0/@modelFacet /0/@diagram/@childNodes.12/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.9/@labels.0/@modelFacet /0/@diagram/@childNodes.2/@labelModelFacet /0/@diagram/@childNodes.13/@labels.0/@modelFacet /0/@diagram/@childNodes.14/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.11/@labels.0/@modelFacet /0/@diagram/@childNodes.1/@labelModelFacet /0/@diagram/@childNodes.3/@labelModelFacet /0/@diagram/@topLevelNodes.3/@labels.0/@modelFacet /0/@diagram/@links.5/@labels.0/@modelFacet /0/@diagram/@links.1/@labels.1/@modelFacet /0/@diagram/@links.1/@labels.3/@modelFacet /0/@diagram/@links.1/@labels.2/@modelFacet /0/@diagram/@childNodes.4/@labelModelFacet /0/@diagram/@links.7/@labels.0/@modelFacet /0/@diagram/@childNodes.5/@labelModelFacet /0/@diagram/@childNodes.7/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.12/@labels.0/@modelFacet /0/@diagram/@childNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.10/@labels.0/@modelFacet"/>
<implementations
xsi:type="gmfgen:CustomParser"
uses="/0/@diagram/@links.5/@labels.1/@modelFacet /0/@diagram/@links.1/@labels.0/@modelFacet /0/@diagram/@links.7/@labels.1/@modelFacet"
@@ -3290,14 +3454,14 @@
qualifiedName="org.eclipse.papyrus.diagram.common.parser.packageimport.PackageImportVisibilityParser"/>
<implementations
xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@topLevelNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.7/@labels.0/@modelFacet"
+ uses="/0/@diagram/@topLevelNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.8/@labels.0/@modelFacet"
qualifiedName="org.eclipse.papyrus.diagram.common.parser.CommentParser"/>
<implementations
xsi:type="gmfgen:ExternalParser"
uses="/0/@diagram/@links.3/@labels.0/@modelFacet"/>
<implementations
xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.11/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.5/@labels.1/@modelFacet"
+ uses="/0/@diagram/@childNodes.12/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.5/@labels.1/@modelFacet"
qualifiedName="org.eclipse.papyrus.diagram.common.parser.ConstraintParser"/>
</labelParsers>
<contextMenus
@@ -3316,7 +3480,7 @@
<extensionNodes
xsi:type="papyrusgmfgenextension:ExtendedGenView"
comment="Manage the class"
- genView="/0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.2 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6"
+ genView="/0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.2 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7"
name="Extended class editpart"
superOwnedEditPart="org.eclipse.papyrus.diagram.common.editparts.ClassifierEditPart">
<propRefreshHook
@@ -3327,13 +3491,13 @@
<extensionNodes
xsi:type="papyrusgmfgenextension:ExtendedGenView"
comment="Elements that inherits Classifier"
- genView="/0/@diagram/@childNodes.13 /0/@diagram/@topLevelNodes.10"
+ genView="/0/@diagram/@childNodes.14 /0/@diagram/@topLevelNodes.11 /0/@diagram/@childNodes.0 /0/@diagram/@topLevelNodes.10"
name="Classifier inheritance"
superOwnedEditPart="org.eclipse.papyrus.diagram.common.editparts.ClassifierEditPart"/>
<extensionNodes
xsi:type="papyrusgmfgenextension:ExtendedGenView"
comment="adding to manange otherNamedElement"
- genView="/0/@diagram/@topLevelNodes.8 /0/@diagram/@topLevelNodes.7 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.9 /0/@diagram /0/@diagram/@childNodes.8 /0/@diagram/@topLevelNodes.6"
+ genView="/0/@diagram/@topLevelNodes.8 /0/@diagram/@topLevelNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.10 /0/@diagram /0/@diagram/@childNodes.9 /0/@diagram/@topLevelNodes.6"
name="OtherNamedElementEditPart"
superOwnedEditPart="org.eclipse.papyrus.diagram.common.editparts.NamedElementEditPart"/>
<extensionNodes
@@ -3357,7 +3521,7 @@
<extensionNodes
xsi:type="papyrusgmfgenextension:ExtendedGenView"
comment="add superclass for short cut"
- genView="/0/@diagram/@topLevelNodes.11"
+ genView="/0/@diagram/@topLevelNodes.12"
name="AbstractShortCutDiagramEditPart"
superOwnedEditPart="org.eclipse.papyrus.diagram.common.editparts.AbstractShortCutDiagramEditPart"/>
<extensionNodes
@@ -3369,13 +3533,13 @@
<extensionNodes
xsi:type="papyrusgmfgenextension:ExtendedGenView"
comment="this is an extension for constraint "
- genView="/0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.5"
+ genView="/0/@diagram/@childNodes.12 /0/@diagram/@topLevelNodes.5"
name="ConstraintEditPart extension"
superOwnedEditPart="org.eclipse.papyrus.diagram.common.editparts.AbstractConstraintEditPart"/>
<extensionNodes
xsi:type="papyrusgmfgenextension:ExtendedGenView"
comment="this is an extension to manage the comment"
- genView="/0/@diagram/@childNodes.7 /0/@diagram/@topLevelNodes.4"
+ genView="/0/@diagram/@childNodes.8 /0/@diagram/@topLevelNodes.4"
name="comment extended node"
superOwnedEditPart="org.eclipse.papyrus.diagram.common.editparts.AbstractCommentEditPart"/>
<extensionNodes
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/plugin.properties b/plugins/uml/org.eclipse.papyrus.diagram.profile/plugin.properties
index ee09baf5468..a287ee94497 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/plugin.properties
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/plugin.properties
@@ -62,3 +62,14 @@ metatype.name.Operation_3020=ClassOperation
metatype.name.Class_3028=Metaclass
metatype.name.Diagram_2016=ShortCutDiagram
metatype.name.ConstraintConstrainedElement_4014=Undefined
+editorName=PapyrusUMLProfileDiagram Diagram Editing
+newWizardName=PapyrusUMLProfileDiagram Diagram
+newWizardDesc=Creates PapyrusUMLProfileDiagram diagram.
+initDiagramActionLabel=Initialize PapyrusUMLProfile_diagram diagram file
+tab.apparence=Apparence
+prefpage.org.eclipse.uml2.uml.diagram.general=UML Diagram
+prefpage.org.eclipse.uml2.uml.diagram.appearance=Appearance
+prefpage.org.eclipse.uml2.uml.diagram.connections=Connections
+prefpage.org.eclipse.uml2.uml.diagram.pathmaps=Pathmaps
+metatype.name.PrimitiveType_3026=PrimitiveType
+metatype.name.PrimitiveType_2009=PrimitiveType
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/plugin.xml b/plugins/uml/org.eclipse.papyrus.diagram.profile/plugin.xml
index 002e9d4504e..46e8df4beeb 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/plugin.xml
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/plugin.xml
@@ -159,6 +159,16 @@
</entry>
<entry
defineOnly="true"
+ description="Create new PrimitiveType"
+ id="createPrimitiveType6CreationTool"
+ kind="tool"
+ label="PrimitiveType"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif">
+ </entry>
+ <entry
+ defineOnly="true"
description="Add an Extension"
id="createExtension1CreationTool"
kind="tool"
@@ -378,6 +388,10 @@
id="createDataType5CreationTool"
path="/createClassifiers2Group">
</predefinedEntry>
+ <predefinedEntry
+ id="createPrimitiveType6CreationTool"
+ path="/createClassifiers2Group">
+ </predefinedEntry>
<entry
description="Links"
@@ -485,7 +499,7 @@
<viewProvider class="org.eclipse.papyrus.diagram.profile.providers.UMLViewProvider">
<Priority name="Lowest"/>
<context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLProfileDiagram"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2014,2015,1026,1031,1002,1014,2005,1030,2007,2006,2010,2016,3019,1037,3018,3002,3020,1023,3028,1007,1027,1024,1012,1028,3025,3027"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2014,2015,1026,1031,1002,1014,2005,1030,2007,2006,2009,2010,2016,3026,3019,1037,3018,3002,3020,1023,3028,1007,1027,1024,1012,1028,3025,3027"/>
<context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="1013,4001,1045,4019,4002,4008,4018,1064,1065,1022,4014"/>
</viewProvider>
</extension>
@@ -498,13 +512,13 @@
<method name="getType()" value="PapyrusUMLProfileDiagram"/>
</object>
<object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
- <method name="getType()" value="2014,2015,1026,1031,1002,1014,2005,1030,2007,2006,2010,2016,3019,1037,3018,3002,3020,1023,3028,1007,1027,1024,1012,1028,3025,3027"/>
+ <method name="getType()" value="2014,2015,1026,1031,1002,1014,2005,1030,2007,2006,2009,2010,2016,3026,3019,1037,3018,3002,3020,1023,3028,1007,1027,1024,1012,1028,3025,3027"/>
</object>
<object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
<method name="getType()" value="1013,4001,1045,4019,4002,4008,4018,1064,1065,1022,4014"/>
</object>
<object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
- <method name="getType()" value="1,1034,1084,3,1015,5063,5020,1047,5026,5023,5035,2,1046,5062,1008,1056,1050,1010,1059,5064,5055,5061"/>
+ <method name="getType()" value="1,1034,1084,3,1015,5063,5020,1047,5026,5023,5032,5035,2,5058,1046,5062,1008,1056,1050,1010,1059,5064,5055,5061"/>
</object>
<object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
<method name="getType()" value="1005,11,1042,1051,1071,1052,1019,1053,1057,1058,1062,1063,1067,1069,1068,1070"/>
@@ -581,9 +595,10 @@
<object class="org.eclipse.papyrus.diagram.profile.edit.parts.ProfileEditPartTN" id="Profile_1030"/>
<object class="org.eclipse.papyrus.diagram.profile.edit.parts.PackageEditPart" id="Package_2007"/>
<object class="org.eclipse.papyrus.diagram.profile.edit.parts.EnumerationEditPart" id="Enumeration_2006"/>
+ <object class="org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPart" id="PrimitiveType_2009"/>
<object class="org.eclipse.papyrus.diagram.profile.edit.parts.DataTypeEditPart" id="DataType_2010"/>
<object class="org.eclipse.papyrus.diagram.profile.edit.parts.ShortCutDiagramEditPart" id="Diagram_2016"/>
- <context elements="Profile_1000,Dependency_2014,Association_2015,Stereotype_1026,Class_1031,Comment_1002,Constraint_1014,Model_2005,Profile_1030,Package_2007,Enumeration_2006,DataType_2010,Diagram_2016"/>
+ <context elements="Profile_1000,Dependency_2014,Association_2015,Stereotype_1026,Class_1031,Comment_1002,Constraint_1014,Model_2005,Profile_1030,Package_2007,Enumeration_2006,PrimitiveType_2009,DataType_2010,Diagram_2016"/>
</modelingAssistantProvider>
</extension>
@@ -706,6 +721,15 @@
</metamodelType>
</metamodel>
<metamodel nsURI="http://www.eclipse.org/uml2/3.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.diagram.profile.PrimitiveType_2009"
+ name="%metatype.name.PrimitiveType_2009"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.diagram.profile.PrimitiveType_3026"/>
+ <param name="semanticHint" value="2009"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/3.0.0/UML">
<metamodelType
id="org.eclipse.papyrus.diagram.profile.DataType_2010"
name="%metatype.name.DataType_2010"
@@ -727,6 +751,16 @@
</metamodel>
<metamodel nsURI="http://www.eclipse.org/uml2/3.0.0/UML">
<metamodelType
+ id="org.eclipse.papyrus.diagram.profile.PrimitiveType_3026"
+ name="%metatype.name.PrimitiveType_3026"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="PrimitiveType"
+ edithelper="org.eclipse.papyrus.diagram.profile.edit.helpers.PrimitiveTypeEditHelper">
+ <param name="semanticHint" value="3026"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/3.0.0/UML">
+ <metamodelType
id="org.eclipse.papyrus.diagram.profile.DataTypeOperation_3019"
name="%metatype.name.Operation_3019"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
@@ -988,8 +1022,10 @@
<elementType ref="org.eclipse.papyrus.diagram.profile.Profile_1030"/>
<elementType ref="org.eclipse.papyrus.diagram.profile.Package_1004"/>
<elementType ref="org.eclipse.papyrus.diagram.profile.Enumeration_2006"/>
+ <elementType ref="org.eclipse.papyrus.diagram.profile.PrimitiveType_2009"/>
<elementType ref="org.eclipse.papyrus.diagram.profile.DataType_2010"/>
<elementType ref="org.eclipse.papyrus.diagram.profile.Diagram_2016"/>
+ <elementType ref="org.eclipse.papyrus.diagram.profile.PrimitiveType_3026"/>
<elementType ref="org.eclipse.papyrus.diagram.profile.DataTypeOperation_3019"/>
<elementType ref="org.eclipse.papyrus.diagram.profile.EnumerationLiteral_1037"/>
<elementType ref="org.eclipse.papyrus.diagram.profile.DataTypeProperty_3018"/>
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationBranchCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationBranchCreateCommand.java
index aad2c4cf8a8..e669be3566d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationBranchCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationBranchCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationBranchReorientCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationBranchReorientCommand.java
index 09120402898..59e30d641a3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationBranchReorientCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationBranchReorientCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationCreateCommand.java
index 8cdae5451d1..7599478fc97 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationNodeCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationNodeCreateCommand.java
index 777f96c6850..cb91afac473 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationNodeCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationNodeCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationReorientCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationReorientCommand.java
index c04fc62b7ac..3503874c0a1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationReorientCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/AssociationReorientCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ClassOperationCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ClassOperationCreateCommand.java
index 7c275dcde7d..406b1245a10 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ClassOperationCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ClassOperationCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ClassPropertyCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ClassPropertyCreateCommand.java
index ee5c915a357..adea33d4d9c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ClassPropertyCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ClassPropertyCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentAnnotatedElementCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentAnnotatedElementCreateCommand.java
index f54d4cb9b1c..aafbbc80cd4 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentAnnotatedElementCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentAnnotatedElementCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentAnnotatedElementReorientCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentAnnotatedElementReorientCommand.java
index 168b1f4f249..26bd8d6fc69 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentAnnotatedElementReorientCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentAnnotatedElementReorientCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentCreateCommandCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentCreateCommandCN.java
index dc2f3ec1746..27c6f229b68 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentCreateCommandCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentCreateCommandCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentEditPartCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentEditPartCreateCommand.java
index ab9c7c99aff..6b3e13d71e4 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentEditPartCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/CommentEditPartCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintConstrainedElementCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintConstrainedElementCreateCommand.java
index 264d7eceb40..b1067c7270d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintConstrainedElementCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintConstrainedElementCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintConstrainedElementReorientCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintConstrainedElementReorientCommand.java
index 530ec0363aa..6956de32348 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintConstrainedElementReorientCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintConstrainedElementReorientCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintCreateCommand.java
index e0d3654e97a..2ee9d03ab5e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintCreateCommandCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintCreateCommandCN.java
index 093b94121a9..b33500a86fd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintCreateCommandCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ConstraintCreateCommandCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypeCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypeCreateCommand.java
index bb56dc7dd69..19d57356e8e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypeCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypeCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypeCreateCommandCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypeCreateCommandCN.java
index 2e8d87e9365..6d32e684302 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypeCreateCommandCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypeCreateCommandCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java
index f92ecdfc3de..a964c560592 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java
index 6db660b0739..1c1bdf92b8d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyBranchCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyBranchCreateCommand.java
index b5443c4d97c..8f304e477e8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyBranchCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyBranchCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyBranchReorientCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyBranchReorientCommand.java
index d3035e668f5..c606576450d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyBranchReorientCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyBranchReorientCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyCreateCommand.java
index d32f046321f..10725ac6284 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyNodeCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyNodeCreateCommand.java
index 3c23630677a..c03769a54fd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyNodeCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyNodeCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyReorientCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyReorientCommand.java
index 9ba3df7068f..8aeb6126537 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyReorientCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/DependencyReorientCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ElementImportCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ElementImportCreateCommand.java
index edd6617f4dd..ecc0576e73e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ElementImportCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ElementImportCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ElementImportReorientCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ElementImportReorientCommand.java
index 5e2eee0102b..73fd00d15ba 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ElementImportReorientCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ElementImportReorientCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/EnumerationCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/EnumerationCreateCommand.java
index e6bcac3fe01..846f73dc5e9 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/EnumerationCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/EnumerationCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/EnumerationCreateCommandCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/EnumerationCreateCommandCN.java
index eb4907a2780..e9f1c81f62e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/EnumerationCreateCommandCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/EnumerationCreateCommandCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java
index c87374ebc05..150be9c1295 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ExtensionCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ExtensionCreateCommand.java
index 3177c65cdd0..294ec5ec4d1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ExtensionCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ExtensionCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ExtensionReorientCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ExtensionReorientCommand.java
index 1490291b573..12731e625c7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ExtensionReorientCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ExtensionReorientCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/GeneralizationCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/GeneralizationCreateCommand.java
index 77d7a53ee5e..f14e22076e4 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/GeneralizationCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/GeneralizationCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/GeneralizationReorientCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/GeneralizationReorientCommand.java
index c98caf09c72..795c9984308 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/GeneralizationReorientCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/GeneralizationReorientCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/MetaclassCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/MetaclassCreateCommand.java
index 0be57b1fa7f..6037ee7a946 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/MetaclassCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/MetaclassCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/MetaclassCreateCommandCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/MetaclassCreateCommandCN.java
index 898cbbe5fe0..c502a617a6f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/MetaclassCreateCommandCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/MetaclassCreateCommandCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ModelCreateCommandCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ModelCreateCommandCN.java
index daab3ec5f9b..68f6e4ebc31 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ModelCreateCommandCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ModelCreateCommandCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ModelCreateCommandTN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ModelCreateCommandTN.java
index c45bf2abdbc..2736b9231fe 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ModelCreateCommandTN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ModelCreateCommandTN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageCreateCommand.java
index f4ef819ff40..d242b9488e6 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageCreateCommandCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageCreateCommandCN.java
index 79438b8d14e..83924afd2ba 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageCreateCommandCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageCreateCommandCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageImportCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageImportCreateCommand.java
index bcf99402761..01a1f0e107f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageImportCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageImportCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageImportReorientCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageImportReorientCommand.java
index 699d47c49a6..1a99b88be96 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageImportReorientCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PackageImportReorientCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java
new file mode 100644
index 00000000000..ce0d0fdfe9b
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.diagram.profile.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.PrimitiveType;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * @generated
+ */
+public class PrimitiveTypeCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private EClass eClass = null;
+
+ /**
+ * @generated
+ */
+ private EObject eObject = null;
+
+ /**
+ * @generated
+ */
+ public PrimitiveTypeCreateCommand(CreateElementRequest req, EObject eObject) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.eClass = eObject != null ? eObject.eClass() : null;
+ }
+
+ /**
+ * @generated
+ */
+ public static PrimitiveTypeCreateCommand create(CreateElementRequest req, EObject eObject) {
+ return new PrimitiveTypeCreateCommand(req, eObject);
+ }
+
+ /**
+ * @generated
+ */
+ public PrimitiveTypeCreateCommand(CreateElementRequest req) {
+ super(req.getLabel(), null, req);
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ protected EObject getElementToEdit() {
+
+
+ EObject container = ((CreateElementRequest)getRequest()).getContainer();
+ if(container instanceof View) {
+ container = ((View)container).getElement();
+ }
+ if(container != null) {
+ return container;
+ }
+ return eObject;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute() {
+
+
+ return true;
+
+
+
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+
+
+ PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
+
+ Package owner = (Package)getElementToEdit();
+ owner.getPackagedElements().add(newElement);
+
+
+ ElementInitializers.getInstance().init_PrimitiveType_2009(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest)getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+
+
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(PrimitiveType newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
+ configureRequest.addParameters(getRequest().getParameters());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if(configureCommand != null && configureCommand.canExecute()) {
+ configureCommand.execute(monitor, info);
+ }
+ }
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java
new file mode 100644
index 00000000000..028cb92b932
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.diagram.profile.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.PrimitiveType;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * @generated
+ */
+public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private EClass eClass = null;
+
+ /**
+ * @generated
+ */
+ private EObject eObject = null;
+
+ /**
+ * @generated
+ */
+ public PrimitiveTypeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.eClass = eObject != null ? eObject.eClass() : null;
+ }
+
+ /**
+ * @generated
+ */
+ public static PrimitiveTypeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
+ return new PrimitiveTypeCreateCommandCN(req, eObject);
+ }
+
+ /**
+ * @generated
+ */
+ public PrimitiveTypeCreateCommandCN(CreateElementRequest req) {
+ super(req.getLabel(), null, req);
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ protected EObject getElementToEdit() {
+
+
+ EObject container = ((CreateElementRequest)getRequest()).getContainer();
+ if(container instanceof View) {
+ container = ((View)container).getElement();
+ }
+ if(container != null) {
+ return container;
+ }
+ return eObject;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute() {
+
+
+ return true;
+
+
+
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+
+
+ PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
+
+ Package owner = (Package)getElementToEdit();
+ owner.getPackagedElements().add(newElement);
+
+
+ ElementInitializers.getInstance().init_PrimitiveType_3026(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest)getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+
+
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(PrimitiveType newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
+ configureRequest.addParameters(getRequest().getParameters());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if(configureCommand != null && configureCommand.canExecute()) {
+ configureCommand.execute(monitor, info);
+ }
+ }
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileApplicationCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileApplicationCreateCommand.java
index 5583b73231c..4d5ada8a27c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileApplicationCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileApplicationCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileApplicationReorientCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileApplicationReorientCommand.java
index 5e7aaa5804b..61691f8203f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileApplicationReorientCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileApplicationReorientCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileCreateCommandCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileCreateCommandCN.java
index 6576c547264..7a7d76c9d5f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileCreateCommandCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileCreateCommandCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileCreateCommandTN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileCreateCommandTN.java
index a9ad082bf29..feac8b05e60 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileCreateCommandTN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ProfileCreateCommandTN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java
index 2479c300494..7a3eb100abe 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/StereotypeCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/StereotypeCreateCommand.java
index 638e0a40e1a..e72584b91ba 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/StereotypeCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/StereotypeCreateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/StereotypeCreateCommandCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/StereotypeCreateCommandCN.java
index fe97eccc202..5432c1f048b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/StereotypeCreateCommandCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/commands/StereotypeCreateCommandCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.commands;
import org.eclipse.core.commands.ExecutionException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/AssociationEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/AssociationEditHelper.java
index 67c15175a7e..9d1c3e5a308 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/AssociationEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/AssociationEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ClassOperationEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ClassOperationEditHelper.java
index f16952c167e..ed4c7b0d978 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ClassOperationEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ClassOperationEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ClassPropertyEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ClassPropertyEditHelper.java
index a4af95c86c7..e250b33cc79 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ClassPropertyEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ClassPropertyEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/CommentEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/CommentEditHelper.java
index 7d9f484b055..cd897082677 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/CommentEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/CommentEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/CommentEditHelperCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/CommentEditHelperCN.java
index dc3be85d27c..d5025503324 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/CommentEditHelperCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/CommentEditHelperCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ConstraintEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ConstraintEditHelper.java
index 703a2a7ee1f..15b22a55e14 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ConstraintEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ConstraintEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ConstraintEditHelperCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ConstraintEditHelperCN.java
index 3dad8591c21..d2e0e0da8d7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ConstraintEditHelperCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ConstraintEditHelperCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DataTypeEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DataTypeEditHelper.java
index 01f49b74355..699df9085b3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DataTypeEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DataTypeEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DataTypeOperationEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DataTypeOperationEditHelper.java
index 4fdf57d4039..378bdaba058 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DataTypeOperationEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DataTypeOperationEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DataTypePropertyEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DataTypePropertyEditHelper.java
index ead658fb2b3..24b2b9d83a4 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DataTypePropertyEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DataTypePropertyEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DependencyEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DependencyEditHelper.java
index d6130951eec..7d7f4b99288 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DependencyEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/DependencyEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ElementImportEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ElementImportEditHelper.java
index f52e40d3b52..08f2c4b72d1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ElementImportEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ElementImportEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/EnumerationEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/EnumerationEditHelper.java
index 36b57801ca7..d63b0bc251b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/EnumerationEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/EnumerationEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/EnumerationLiteralEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/EnumerationLiteralEditHelper.java
index 46aaa797317..defb1bfd104 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/EnumerationLiteralEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/EnumerationLiteralEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ExtensionEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ExtensionEditHelper.java
index c1e4144b980..d38e89d49a4 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ExtensionEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ExtensionEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/GeneralizationEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/GeneralizationEditHelper.java
index d40c4b1e052..b0a576513ba 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/GeneralizationEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/GeneralizationEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/MetaclassEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/MetaclassEditHelper.java
index 5faea8183e9..8dfbfed284d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/MetaclassEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/MetaclassEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ModelEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ModelEditHelper.java
index 7dfa62f94c8..8ff3d2d3070 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ModelEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ModelEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PackageEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PackageEditHelper.java
index d4c8b497c05..544f92ecb7d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PackageEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PackageEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PackageEditHelperCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PackageEditHelperCN.java
index d74ab8aca41..7fe54216d24 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PackageEditHelperCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PackageEditHelperCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PackageImportEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PackageImportEditHelper.java
index ebb0cefc321..8c59c19a20c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PackageImportEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PackageImportEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PrimitiveTypeEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PrimitiveTypeEditHelper.java
new file mode 100644
index 00000000000..631b99badb2
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/PrimitiveTypeEditHelper.java
@@ -0,0 +1,22 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.edit.helpers;
+
+import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
+
+/**
+ * @generated
+ */
+public class PrimitiveTypeEditHelper extends UMLBaseEditHelper {
+}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ProfileApplicationEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ProfileApplicationEditHelper.java
index 0ce844257d6..2cae28393b4 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ProfileApplicationEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ProfileApplicationEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ProfileDiagramEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ProfileDiagramEditHelper.java
index 7af35d8e32b..387fde14563 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ProfileDiagramEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ProfileDiagramEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ProfileEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ProfileEditHelper.java
index a35bf49f0f7..d623bd3ecb6 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ProfileEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ProfileEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ShortCutDiagramEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ShortCutDiagramEditHelper.java
index ba242e43c3a..b39965c5841 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ShortCutDiagramEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/ShortCutDiagramEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/StereotypeEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/StereotypeEditHelper.java
index 5e454bbbc92..c0c7bb49c5a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/StereotypeEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/StereotypeEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.papyrus.diagram.common.helper.UMLBaseEditHelper;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/UMLBaseEditHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/UMLBaseEditHelper.java
index b5aa48f271f..35c659a2933 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/UMLBaseEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/helpers/UMLBaseEditHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.helpers;
import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AppliedStereotypeElementImportEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AppliedStereotypeElementImportEditPart.java
index 81d30b00f1d..8be67207146 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AppliedStereotypeElementImportEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AppliedStereotypeElementImportEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationAppliedStereotypeEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationAppliedStereotypeEditPart.java
index 167d7801ba4..061606ccff3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationAppliedStereotypeEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationAppliedStereotypeEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationBranchEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationBranchEditPart.java
index dc71f5f8668..83b4867f75d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationBranchEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationBranchEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.Connection;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationBranchRoleEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationBranchRoleEditPart.java
index 800330ae400..d0d8c4d0bd1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationBranchRoleEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationBranchRoleEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationEditPart.java
index 2da7734393f..183bc647208 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.Connection;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationMultiplicityTargetLabelEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationMultiplicityTargetLabelEditPart.java
index 7e3c5a6afe4..14f3ed5f602 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationMultiplicityTargetLabelEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationMultiplicityTargetLabelEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationNameEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationNameEditPart.java
index 664f767bb24..ad264a5a0d5 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationNameEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationNameEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationNodeEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationNodeEditPart.java
index 92cd3f32397..a8e4a509ecd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationNodeEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationNodeEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -241,9 +254,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4001);
}
@@ -268,9 +287,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4019);
}
@@ -295,9 +320,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Generalization_4002);
}
@@ -337,9 +368,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -391,9 +428,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -445,9 +488,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ElementImport_1064);
}
@@ -503,7 +552,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -513,7 +564,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -523,7 +576,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -538,7 +593,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -557,7 +614,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -576,7 +635,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -622,7 +683,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -632,7 +695,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -642,7 +707,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -657,7 +724,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -676,7 +745,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -693,7 +764,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationRoleSourceLabelEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationRoleSourceLabelEditPart.java
index b10a90ec3cc..63072e44e0f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationRoleSourceLabelEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/AssociationRoleSourceLabelEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ClassOperationEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ClassOperationEditPart.java
index f628d4637de..bd3c7883bd2 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ClassOperationEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ClassOperationEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ClassPropertyEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ClassPropertyEditPart.java
index 5b569314faf..b06394219c0 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ClassPropertyEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ClassPropertyEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentAnnotatedElementEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentAnnotatedElementEditPart.java
index 78c84ac497d..5bf30325c23 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentAnnotatedElementEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentAnnotatedElementEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.Connection;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentBodyEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentBodyEditPart.java
index 323cb415804..0beb6f45b0e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentBodyEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentBodyEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentBodyEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentBodyEditPartCN.java
index 80d14872464..c159399378a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentBodyEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentBodyEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentEditPart.java
index c8802ed3ace..36d6e7ad299 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -328,9 +341,15 @@ AbstractCommentEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.CommentAnnotatedElement_1022);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.CommentAnnotatedElement_1022);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
}
@@ -377,7 +396,9 @@ AbstractCommentEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Comment_1007);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentEditPartCN.java
index cd7a45060b9..8bf6e64389b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/CommentEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -328,9 +341,15 @@ AbstractCommentEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.CommentAnnotatedElement_1022);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.CommentAnnotatedElement_1022);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
}
@@ -377,7 +396,9 @@ AbstractCommentEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Comment_1007);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintBodyEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintBodyEditPart.java
index b6face9bd29..f1f5065816b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintBodyEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintBodyEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintBondyEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintBondyEditPartCN.java
index 4ae2b8bad65..4075676d64b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintBondyEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintBondyEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintConstrainedElementEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintConstrainedElementEditPart.java
index 68429659435..6f222b67137 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintConstrainedElementEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintConstrainedElementEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.Connection;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintEditPart.java
index 54d30220f15..59d3799144a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -335,9 +348,15 @@ AbstractConstraintEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -389,9 +408,15 @@ AbstractConstraintEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -446,9 +471,15 @@ AbstractConstraintEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
}
@@ -494,7 +525,9 @@ AbstractConstraintEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -513,7 +546,9 @@ AbstractConstraintEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -533,7 +568,9 @@ AbstractConstraintEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Comment_1007);
@@ -575,7 +612,9 @@ AbstractConstraintEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -594,7 +633,9 @@ AbstractConstraintEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -611,7 +652,9 @@ AbstractConstraintEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintEditPartCN.java
index d98397ac1c2..7b3572c5bb6 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -331,9 +344,15 @@ AbstractConstraintEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -385,9 +404,15 @@ AbstractConstraintEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -442,9 +467,15 @@ AbstractConstraintEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
}
@@ -490,7 +521,9 @@ AbstractConstraintEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -509,7 +542,9 @@ AbstractConstraintEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -529,7 +564,9 @@ AbstractConstraintEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Comment_1007);
@@ -571,7 +608,9 @@ AbstractConstraintEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -590,7 +629,9 @@ AbstractConstraintEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -607,7 +648,9 @@ AbstractConstraintEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintNameEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintNameEditPart.java
index 6587662e1ce..0ae050377e9 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintNameEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintNameEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintNameEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintNameEditPartCN.java
index 7680601b4e1..8edd494364c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintNameEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ConstraintNameEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPart.java
index 4ea24d4c0dc..470af6fb924 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPartCN.java
index 5b5c64e5781..bb728e5aac3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeEditPart.java
index d5d0051b69f..1565194e816 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -362,9 +375,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.DataTypeEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4001);
}
@@ -389,9 +408,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.DataTypeEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4019);
}
@@ -416,9 +441,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.DataTypeEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Generalization_4002);
}
@@ -458,9 +489,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -512,9 +549,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -566,9 +609,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.DataTypeEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ElementImport_1064);
}
@@ -624,7 +673,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -634,7 +685,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -644,7 +697,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -659,7 +714,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -678,7 +735,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -697,7 +756,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -743,7 +804,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -753,7 +816,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -763,7 +828,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -778,7 +845,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -797,7 +866,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -814,7 +885,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeEditPartCN.java
index 2fa88592c71..0203270eaf9 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -362,9 +375,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4001);
}
@@ -389,9 +408,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4019);
}
@@ -416,9 +441,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Generalization_4002);
}
@@ -458,9 +489,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -512,9 +549,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -566,9 +609,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ElementImport_1064);
}
@@ -624,7 +673,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -634,7 +685,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -644,7 +697,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -659,7 +714,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -678,7 +735,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -697,7 +756,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -743,7 +804,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -753,7 +816,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -763,7 +828,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -778,7 +845,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -797,7 +866,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -814,7 +885,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeNameEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeNameEditPart.java
index 4e3194d1286..70c70654ec5 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeNameEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeNameEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeNameEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeNameEditPartCN.java
index 8ba4b57535e..2b0a540da98 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeNameEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeNameEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPart.java
index b0e80ace3d2..39d2b48cd58 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPartCN.java
index 43551826046..959ee55ffc3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeOperationEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeOperationEditPart.java
index c15fa9507ea..f5bb5f0489f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeOperationEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypeOperationEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypePropertyEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypePropertyEditPart.java
index 1f0e7003885..af3556f223b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypePropertyEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DataTypePropertyEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyAppliedStereotypeEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyAppliedStereotypeEditPart.java
index 40ac3e5eab6..04e8ba2465c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyAppliedStereotypeEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyAppliedStereotypeEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyBranchEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyBranchEditPart.java
index b924366e410..6d1ccbf97bc 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyBranchEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyBranchEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.Connection;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyEditPart.java
index b25c7c4d3c1..db832a457e7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.Connection;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyNameEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyNameEditPart.java
index 2adfcf6c2b0..e70c08ef6d0 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyNameEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyNameEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyNodeEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyNodeEditPart.java
index 0b50c7038ce..f69f86aa5ff 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyNodeEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DependencyNodeEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -285,9 +298,15 @@ AbstractBorderedShapeEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -339,9 +358,15 @@ AbstractBorderedShapeEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -384,7 +409,9 @@ AbstractBorderedShapeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -403,7 +430,9 @@ AbstractBorderedShapeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -444,7 +473,9 @@ AbstractBorderedShapeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -463,7 +494,9 @@ AbstractBorderedShapeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -480,7 +513,9 @@ AbstractBorderedShapeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DiagramNameEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DiagramNameEditPart.java
index ee32d45634f..4ba6915aefb 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DiagramNameEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/DiagramNameEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ElementImportAliasEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ElementImportAliasEditPart.java
index 53307c2fffb..d5749840444 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ElementImportAliasEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ElementImportAliasEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ElementImportEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ElementImportEditPart.java
index 40d79dd6e64..cc1fc194bd3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ElementImportEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ElementImportEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.Connection;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEditPart.java
index 4db3cd6963e..1fe59e3e2e4 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -331,9 +344,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.EnumerationEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4001);
}
@@ -358,9 +377,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.EnumerationEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4019);
}
@@ -385,9 +410,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.EnumerationEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Generalization_4002);
}
@@ -427,9 +458,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -481,9 +518,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -535,9 +578,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.EnumerationEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ElementImport_1064);
}
@@ -593,7 +642,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -603,7 +654,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -613,7 +666,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -628,7 +683,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -647,7 +704,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -666,7 +725,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -712,7 +773,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -722,7 +785,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -732,7 +797,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -747,7 +814,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -766,7 +835,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -783,7 +854,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEditPartCN.java
index ca432663f52..ee40ba7169d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -329,9 +342,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4001);
}
@@ -356,9 +375,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4019);
}
@@ -383,9 +408,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Generalization_4002);
}
@@ -425,9 +456,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -479,9 +516,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -533,9 +576,15 @@ ShapeNodeEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ElementImport_1064);
}
@@ -591,7 +640,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -601,7 +652,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -611,7 +664,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -626,7 +681,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -645,7 +702,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -664,7 +723,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -710,7 +771,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -720,7 +783,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -730,7 +795,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -745,7 +812,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -764,7 +833,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -781,7 +852,9 @@ ShapeNodeEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java
index ee38c797cc0..21ad0775db6 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java
index bf47820510f..2723acc4884 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationLiteralEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationLiteralEditPart.java
index e49dd86ee9d..f05a76b1197 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationLiteralEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationLiteralEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationNameEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationNameEditPart.java
index d8417003990..3c4e12c610e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationNameEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationNameEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationNameEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationNameEditPartCN.java
index 8e78d6a8c65..0737e84490e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationNameEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/EnumerationNameEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ExtensionEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ExtensionEditPart.java
index ae13fc69e49..afed4bc912a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ExtensionEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ExtensionEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.Connection;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/GeneralizationAppliedStereotypeEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/GeneralizationAppliedStereotypeEditPart.java
index 3e47e226bb5..62f26cb8cbb 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/GeneralizationAppliedStereotypeEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/GeneralizationAppliedStereotypeEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/GeneralizationEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/GeneralizationEditPart.java
index d3a038d14e6..9aa0cd40093 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/GeneralizationEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/GeneralizationEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.Connection;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassEditPart.java
index ba7cf793dff..62b63cce4a3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -328,9 +341,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4001);
}
@@ -355,9 +374,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4019);
}
@@ -382,9 +407,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Generalization_4002);
}
@@ -424,9 +455,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -478,9 +515,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -532,9 +575,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ElementImport_1064);
}
@@ -590,7 +639,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -600,7 +651,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -610,7 +663,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -625,7 +680,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -644,7 +701,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -663,7 +722,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -709,7 +770,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -719,7 +782,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -729,7 +794,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -744,7 +811,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -763,7 +832,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -780,7 +851,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassEditPartCN.java
index 81cb90a99b1..e7ab8cfe41a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -328,9 +341,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4001);
}
@@ -355,9 +374,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4019);
}
@@ -382,9 +407,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Generalization_4002);
}
@@ -424,9 +455,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -478,9 +515,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -532,9 +575,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ElementImport_1064);
}
@@ -590,7 +639,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -600,7 +651,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -610,7 +663,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -625,7 +680,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -644,7 +701,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -663,7 +722,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -709,7 +770,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -719,7 +782,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -729,7 +794,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -744,7 +811,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -763,7 +832,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -780,7 +851,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassNameEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassNameEditPart.java
index f61b288e89c..0e74859bcb2 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassNameEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassNameEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassNameEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassNameEditPartCN.java
index a8e0f65db41..4f56da8bd96 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassNameEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MetaclassNameEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelEditPartCN.java
index f6d98d4bc27..a79b574c4e6 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -359,9 +372,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -413,9 +432,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -467,9 +492,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ElementImport_1064);
}
@@ -533,7 +564,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -552,7 +585,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -571,7 +606,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -620,7 +657,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -639,7 +678,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -656,7 +697,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -672,7 +715,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelEditPartTN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelEditPartTN.java
index 9a498a64c8b..874a6eb4c04 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelEditPartTN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelEditPartTN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -359,9 +372,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -413,9 +432,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -467,9 +492,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ElementImport_1064);
}
@@ -533,7 +564,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -552,7 +585,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -571,7 +606,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -620,7 +657,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -639,7 +678,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -656,7 +697,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -672,7 +715,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelNameEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelNameEditPart.java
index 30b036bcbe5..98306be6a37 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelNameEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelNameEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelNameEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelNameEditPartCN.java
index 9e98fa2341e..bbff01f8abd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelNameEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelNameEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartCN.java
index bacae89a158..f59dca02111 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartTN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartTN.java
index c44e4d29ffa..d17d3647244 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartTN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartTN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MultiDependencyLabelEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MultiDependencyLabelEditPart.java
index 72de9d1fafe..5d8baffa0c0 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MultiDependencyLabelEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/MultiDependencyLabelEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageEditPart.java
index b14b48a25f0..fb99cfd3fc9 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -359,9 +372,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -413,9 +432,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -467,9 +492,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ElementImport_1064);
}
@@ -533,7 +564,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -552,7 +585,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -571,7 +606,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -620,7 +657,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -639,7 +678,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -656,7 +697,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -672,7 +715,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageEditPartCN.java
index aeb94d60fee..0453bb2ab78 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -363,9 +376,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -417,9 +436,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -471,9 +496,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ElementImport_1064);
}
@@ -537,7 +568,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -556,7 +589,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -575,7 +610,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -624,7 +661,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -643,7 +682,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -660,7 +701,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -676,7 +719,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageImportAppliedStereotypeEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageImportAppliedStereotypeEditPart.java
index c949b1b5110..a43ba36a10f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageImportAppliedStereotypeEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageImportAppliedStereotypeEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageImportEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageImportEditPart.java
index 109bcccc04d..3e62ce58a89 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageImportEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageImportEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.Connection;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageNameEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageNameEditPart.java
index 7041d7a31c8..6682a869b39 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageNameEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageNameEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageNameEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageNameEditPartCN.java
index 8ae14410138..c7ebf665599 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageNameEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackageNameEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPart.java
index 84911f294d4..3d8786df0bb 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPartCN.java
index 1bc505247da..5f92be62075 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeEditPart.java
new file mode 100644
index 00000000000..489ad169725
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeEditPart.java
@@ -0,0 +1,905 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Shape;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+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.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.diagram.common.editparts.ClassifierEditPart;
+import org.eclipse.papyrus.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.diagram.common.editpolicies.HyperLinkPopupBarEditPolicy;
+import org.eclipse.papyrus.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.diagram.common.figure.node.PrimitiveTypeFigure;
+import org.eclipse.papyrus.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.papyrus.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.diagram.profile.custom.policies.itemsemantic.CustomPrimitiveTypeItemSemanticEditPolicy;
+import org.eclipse.papyrus.diagram.profile.edit.policies.PrimitiveTypeItemSemanticEditPolicy;
+import org.eclipse.papyrus.diagram.profile.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.diagram.profile.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.papyrus.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class PrimitiveTypeEditPart extends
+
+
+ClassifierEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2009;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public PrimitiveTypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PrimitiveTypeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.POPUPBAR_ROLE, new HyperLinkPopupBarEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomPrimitiveTypeItemSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+
+
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+
+
+
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if(result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ return primaryShape = new PrimitiveTypeFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public PrimitiveTypeFigure getPrimaryShape() {
+ return (PrimitiveTypeFigure)primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if(childEditPart instanceof PrimitiveTypeNameEditPart) {
+ ((PrimitiveTypeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ return false;
+ }
+
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if(childEditPart instanceof PrimitiveTypeNameEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if(addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeChildVisual(EditPart childEditPart) {
+ if(removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "PrimitiveType";
+ IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
+ String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
+ String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
+
+ return result;
+ }
+
+
+ /**
+ * Creates figure for this edit part.
+ *
+ * Body of this method does not depend on settings in generation model
+ * so you may safely remove <i>generated</i> tag and modify it.
+ *
+ * @generated
+ */
+ protected NodeFigure createNodeFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if(nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ public IFigure getContentPane() {
+ if(contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected void setForegroundColor(Color color) {
+ if(primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLineWidth(int width) {
+ if(primaryShape instanceof Shape) {
+ ((Shape)primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLineType(int style) {
+ if(primaryShape instanceof Shape) {
+ ((Shape)primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(7);
+ types.add(UMLElementTypes.Association_4001);
+ types.add(UMLElementTypes.Association_4019);
+ types.add(UMLElementTypes.Generalization_4002);
+ types.add(UMLElementTypes.Dependency_4008);
+ types.add(UMLElementTypes.Dependency_4018);
+ types.add(UMLElementTypes.ElementImport_1064);
+ types.add(UMLElementTypes.PackageImport_1065);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if(targetEditPart instanceof AssociationNodeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof StereotypeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof MetaclassEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof EnumerationEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof DataTypeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof StereotypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof MetaclassEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof EnumerationEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof DataTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof AssociationNodeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof StereotypeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof MetaclassEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof EnumerationEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof DataTypeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof StereotypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof MetaclassEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof EnumerationEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof DataTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof AssociationNodeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof StereotypeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof MetaclassEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof EnumerationEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof DataTypeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof StereotypeEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof MetaclassEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof EnumerationEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof DataTypeEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof DependencyNodeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof AssociationNodeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof StereotypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof MetaclassEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof ConstraintEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof ModelEditPartTN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof ProfileEditPartTN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof PackageEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof EnumerationEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof DataTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof StereotypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof MetaclassEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof ModelEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof ProfileEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof PackageEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof EnumerationEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof DataTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof DependencyNodeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof AssociationNodeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof StereotypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof MetaclassEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof ConstraintEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof ModelEditPartTN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof ProfileEditPartTN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof PackageEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof EnumerationEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof DataTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof StereotypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof MetaclassEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof ModelEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof ProfileEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof PackageEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof EnumerationEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof DataTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof DependencyNodeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof AssociationNodeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof StereotypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof MetaclassEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof ConstraintEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof ModelEditPartTN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof ProfileEditPartTN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof PackageEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof EnumerationEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof DataTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof StereotypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof MetaclassEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof ModelEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof ProfileEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof PackageEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof EnumerationEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof DataTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof ModelEditPartTN) {
+ types.add(UMLElementTypes.PackageImport_1065);
+ }
+ if(targetEditPart instanceof ProfileEditPartTN) {
+ types.add(UMLElementTypes.PackageImport_1065);
+ }
+ if(targetEditPart instanceof PackageEditPart) {
+ types.add(UMLElementTypes.PackageImport_1065);
+ }
+ if(targetEditPart instanceof ModelEditPartCN) {
+ types.add(UMLElementTypes.PackageImport_1065);
+ }
+ if(targetEditPart instanceof ProfileEditPartCN) {
+ types.add(UMLElementTypes.PackageImport_1065);
+ }
+ if(targetEditPart instanceof PackageEditPartCN) {
+ types.add(UMLElementTypes.PackageImport_1065);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if(relationshipType == UMLElementTypes.Association_4001) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Association_4019) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Generalization_4002) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Dependency_4008) {
+ types.add(UMLElementTypes.Dependency_2014);
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ types.add(UMLElementTypes.Constraint_1028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Dependency_4018) {
+ types.add(UMLElementTypes.Dependency_2014);
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ types.add(UMLElementTypes.Constraint_1028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.ElementImport_1064) {
+ types.add(UMLElementTypes.Dependency_2014);
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ types.add(UMLElementTypes.Constraint_1028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.PackageImport_1065) {
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(8);
+ types.add(UMLElementTypes.Association_4001);
+ types.add(UMLElementTypes.Association_4019);
+ types.add(UMLElementTypes.Generalization_4002);
+ types.add(UMLElementTypes.Dependency_4008);
+ types.add(UMLElementTypes.Dependency_4018);
+ types.add(UMLElementTypes.ElementImport_1064);
+ types.add(UMLElementTypes.CommentAnnotatedElement_1022);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if(relationshipType == UMLElementTypes.Association_4001) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Association_4019) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Generalization_4002) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Dependency_4008) {
+ types.add(UMLElementTypes.Dependency_2014);
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ types.add(UMLElementTypes.Constraint_1028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Dependency_4018) {
+ types.add(UMLElementTypes.Dependency_2014);
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ types.add(UMLElementTypes.Constraint_1028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.ElementImport_1064) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_1022) {
+ types.add(UMLElementTypes.Comment_1002);
+ types.add(UMLElementTypes.Comment_1007);
+ } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
+ }
+ return types;
+ }
+
+
+
+
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+
+ if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferenceConstantHelper.getElementConstant("PrimitiveType", PreferenceConstantHelper.COLOR_LINE);
+ } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferenceConstantHelper.getElementConstant("PrimitiveType", PreferenceConstantHelper.COLOR_FONT);
+ } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferenceConstantHelper.getElementConstant("PrimitiveType", PreferenceConstantHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
+ } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferenceConstantHelper.getElementConstant("PrimitiveType", PreferenceConstantHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+
+ if(result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java
new file mode 100644
index 00000000000..4c68734e6fc
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java
@@ -0,0 +1,905 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Shape;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+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.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.diagram.common.editparts.ClassifierEditPart;
+import org.eclipse.papyrus.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.diagram.common.editpolicies.HyperLinkPopupBarEditPolicy;
+import org.eclipse.papyrus.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.diagram.common.figure.node.PrimitiveTypeFigure;
+import org.eclipse.papyrus.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.papyrus.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.diagram.profile.custom.policies.itemsemantic.CustomPrimitiveTypeItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.diagram.profile.edit.policies.PrimitiveTypeItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.diagram.profile.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.diagram.profile.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.papyrus.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class PrimitiveTypeEditPartCN extends
+
+
+ClassifierEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3026;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public PrimitiveTypeEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PrimitiveTypeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.POPUPBAR_ROLE, new HyperLinkPopupBarEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomPrimitiveTypeItemSemanticEditPolicyCN());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+
+
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+
+
+
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if(result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ return primaryShape = new PrimitiveTypeFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public PrimitiveTypeFigure getPrimaryShape() {
+ return (PrimitiveTypeFigure)primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if(childEditPart instanceof PrimitiveTypeNameEditPartCN) {
+ ((PrimitiveTypeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ return false;
+ }
+
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if(childEditPart instanceof PrimitiveTypeNameEditPartCN) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if(addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeChildVisual(EditPart childEditPart) {
+ if(removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "PrimitiveType";
+ IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
+ String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
+ String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
+
+ return result;
+ }
+
+
+ /**
+ * Creates figure for this edit part.
+ *
+ * Body of this method does not depend on settings in generation model
+ * so you may safely remove <i>generated</i> tag and modify it.
+ *
+ * @generated
+ */
+ protected NodeFigure createNodeFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if(nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ public IFigure getContentPane() {
+ if(contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected void setForegroundColor(Color color) {
+ if(primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLineWidth(int width) {
+ if(primaryShape instanceof Shape) {
+ ((Shape)primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLineType(int style) {
+ if(primaryShape instanceof Shape) {
+ ((Shape)primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPartCN.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(7);
+ types.add(UMLElementTypes.Association_4001);
+ types.add(UMLElementTypes.Association_4019);
+ types.add(UMLElementTypes.Generalization_4002);
+ types.add(UMLElementTypes.Dependency_4008);
+ types.add(UMLElementTypes.Dependency_4018);
+ types.add(UMLElementTypes.ElementImport_1064);
+ types.add(UMLElementTypes.PackageImport_1065);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if(targetEditPart instanceof AssociationNodeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof StereotypeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof MetaclassEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof EnumerationEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof DataTypeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof StereotypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof MetaclassEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof EnumerationEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof DataTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
+ if(targetEditPart instanceof AssociationNodeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof StereotypeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof MetaclassEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof EnumerationEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof DataTypeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof StereotypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof MetaclassEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof EnumerationEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof DataTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
+ if(targetEditPart instanceof AssociationNodeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof StereotypeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof MetaclassEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof EnumerationEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof DataTypeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof StereotypeEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof MetaclassEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof EnumerationEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof DataTypeEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
+ if(targetEditPart instanceof DependencyNodeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof AssociationNodeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof StereotypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof MetaclassEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof ConstraintEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof ModelEditPartTN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof ProfileEditPartTN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof PackageEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof EnumerationEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof DataTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof StereotypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof MetaclassEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof ModelEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof ProfileEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof PackageEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof EnumerationEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof DataTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
+ if(targetEditPart instanceof DependencyNodeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof AssociationNodeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof StereotypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof MetaclassEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof ConstraintEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof ModelEditPartTN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof ProfileEditPartTN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof PackageEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof EnumerationEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof DataTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof StereotypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof MetaclassEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof ModelEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof ProfileEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof PackageEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof EnumerationEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof DataTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
+ if(targetEditPart instanceof DependencyNodeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof AssociationNodeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof StereotypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof MetaclassEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof ConstraintEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof ModelEditPartTN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof ProfileEditPartTN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof PackageEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof EnumerationEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof DataTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof StereotypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof MetaclassEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof ModelEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof ProfileEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof PackageEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof EnumerationEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof DataTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
+ if(targetEditPart instanceof ModelEditPartTN) {
+ types.add(UMLElementTypes.PackageImport_1065);
+ }
+ if(targetEditPart instanceof ProfileEditPartTN) {
+ types.add(UMLElementTypes.PackageImport_1065);
+ }
+ if(targetEditPart instanceof PackageEditPart) {
+ types.add(UMLElementTypes.PackageImport_1065);
+ }
+ if(targetEditPart instanceof ModelEditPartCN) {
+ types.add(UMLElementTypes.PackageImport_1065);
+ }
+ if(targetEditPart instanceof ProfileEditPartCN) {
+ types.add(UMLElementTypes.PackageImport_1065);
+ }
+ if(targetEditPart instanceof PackageEditPartCN) {
+ types.add(UMLElementTypes.PackageImport_1065);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if(relationshipType == UMLElementTypes.Association_4001) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Association_4019) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Generalization_4002) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Dependency_4008) {
+ types.add(UMLElementTypes.Dependency_2014);
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ types.add(UMLElementTypes.Constraint_1028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Dependency_4018) {
+ types.add(UMLElementTypes.Dependency_2014);
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ types.add(UMLElementTypes.Constraint_1028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.ElementImport_1064) {
+ types.add(UMLElementTypes.Dependency_2014);
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ types.add(UMLElementTypes.Constraint_1028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.PackageImport_1065) {
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(8);
+ types.add(UMLElementTypes.Association_4001);
+ types.add(UMLElementTypes.Association_4019);
+ types.add(UMLElementTypes.Generalization_4002);
+ types.add(UMLElementTypes.Dependency_4008);
+ types.add(UMLElementTypes.Dependency_4018);
+ types.add(UMLElementTypes.ElementImport_1064);
+ types.add(UMLElementTypes.CommentAnnotatedElement_1022);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if(relationshipType == UMLElementTypes.Association_4001) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Association_4019) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Generalization_4002) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Dependency_4008) {
+ types.add(UMLElementTypes.Dependency_2014);
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ types.add(UMLElementTypes.Constraint_1028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.Dependency_4018) {
+ types.add(UMLElementTypes.Dependency_2014);
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ types.add(UMLElementTypes.Constraint_1028);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.ElementImport_1064) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_1022) {
+ types.add(UMLElementTypes.Comment_1002);
+ types.add(UMLElementTypes.Comment_1007);
+ } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
+ }
+ return types;
+ }
+
+
+
+
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+
+ if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferenceConstantHelper.getElementConstant("PrimitiveType", PreferenceConstantHelper.COLOR_LINE);
+ } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferenceConstantHelper.getElementConstant("PrimitiveType", PreferenceConstantHelper.COLOR_FONT);
+ } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferenceConstantHelper.getElementConstant("PrimitiveType", PreferenceConstantHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
+ } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferenceConstantHelper.getElementConstant("PrimitiveType", PreferenceConstantHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+
+ if(result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeNameEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeNameEditPart.java
new file mode 100644
index 00000000000..650544728e6
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeNameEditPart.java
@@ -0,0 +1,804 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.diagram.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.papyrus.diagram.common.util.DiagramEditPartsUtil;
+import org.eclipse.papyrus.diagram.profile.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.papyrus.diagram.profile.providers.UMLParserProvider;
+import org.eclipse.papyrus.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
+import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.umlutils.ui.VisualInformationPapyrusConstant;
+import org.eclipse.papyrus.umlutils.ui.helper.NameLabelIconHelper;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @generated
+ */
+public class PrimitiveTypeNameEditPart extends CompartmentEditPart implements ITextAwareEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5032;
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List<?> parserElements;
+
+ /**
+ * @generated
+ */
+ private String defaultText;
+
+
+
+ /**
+ * direct edition mode (default, undefined, registered editor, etc.)
+ *
+ * @generated
+ */
+ protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
+
+ /**
+ * configuration from a registered edit dialog
+ *
+ * @generated
+ */
+ protected IDirectEditorConfiguration configuration;
+
+
+
+ /**
+ * @generated
+ */
+ public PrimitiveTypeNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ProfileDiagramEditPart.NodeLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelTextHelper(IFigure figure) {
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
+ } else {
+ return ((Label)figure).getText();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelTextHelper(IFigure figure, String text) {
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
+ } else {
+ ((Label)figure).setText(text);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIconHelper(IFigure figure) {
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
+ } else {
+ return ((Label)figure).getIcon();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelIconHelper(IFigure figure, Image icon) {
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
+ } else {
+ ((Label)figure).setIcon(icon);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabel(WrappingLabel figure) {
+ unregisterVisuals();
+ setFigure(figure);
+ defaultText = getLabelTextHelper(figure);
+ registerVisuals();
+ refreshVisuals();
+ }
+
+ /**
+ * @generated
+ */
+ protected List getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIcon() {
+ EObject parserElement = getParserElement();
+ if(parserElement == null) {
+ return null;
+ }
+
+ List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ for(View view : views) {
+ if(NameLabelIconHelper.showLabelIcon(view)) {
+ return UMLElementTypes.getImage(parserElement.eClass());
+ }
+ }
+ return null;
+
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelText() {
+ String text = null;
+ EObject parserElement = getParserElement();
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
+ }
+ if(text == null || text.length() == 0) {
+ text = defaultText;
+ }
+ return text;
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabelText(String text) {
+ setLabelTextHelper(getFigure(), text);
+ 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();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public String getEditText() {
+ if(getParserElement() == null || getParser() == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isEditable() {
+ return getParser() != null;
+ }
+
+ /**
+ * @generated
+ */
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ public String isValid(final Object value) {
+ if(value instanceof String) {
+ final EObject element = getParserElement();
+ final IParser parser = getParser();
+ try {
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
+
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
+ return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ public IContentAssistProcessor getCompletionProcessor() {
+ if(getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ public IParser getParser() {
+ if(parser == null) {
+ parser = UMLParserProvider.get().getPrimitiveTypeName_5032Parser();
+ }
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected DirectEditManager getManager() {
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
+ }
+ return manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setManager(DirectEditManager manager) {
+ this.manager = manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit() {
+ getManager().show();
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit(Point eventLocation) {
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void performDirectEdit(char initialCharacter) {
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEditRequest(Request request) {
+
+ final Request theRequest = request;
+
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ directEditionMode = getDirectEditionType();
+ }
+ switch(directEditionMode) {
+ case IDirectEdition.NO_DIRECT_EDITION:
+ // no direct edition mode => does nothing
+ return;
+ case IDirectEdition.EXTENDED_DIRECT_EDITOR:
+ updateExtendedEditorConfiguration();
+ if(configuration == null || configuration.getLanguage() == null) {
+ performDefaultDirectEditorEdit(theRequest);
+ } else {
+ configuration.preEditAction(resolveSemanticElement());
+ Dialog dialog = null;
+ if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
+ helper.showEditor();
+ return;
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
+ } else {
+ return;
+ }
+ final Dialog finalDialog = dialog;
+
+ if(Window.OK == dialog.open()) {
+ TransactionalEditingDomain domain = getEditingDomain();
+ RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
+
+ @Override
+ protected void doExecute() {
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
+
+ }
+ };
+ domain.getCommandStack().execute(command);
+ }
+ }
+ break;
+ case IDirectEdition.DEFAULT_DIRECT_EDITOR:
+
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ public void run() {
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLabel();
+ refreshFont();
+ refreshFontColor();
+ refreshUnderline();
+ refreshStrikeThrough();
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshLabel() {
+ EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
+ if(maskLabelPolicy == null) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ 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();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshUnderline() {
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshStrikeThrough() {
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshFont() {
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ setFont(fontData);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ protected void addSemanticListeners() {
+ if(getParser() instanceof ISemanticParser) {
+ EObject element = resolveSemanticElement();
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
+ }
+ } else {
+ super.addSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeSemanticListeners() {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if(accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return (View)getModel();
+ }
+
+
+
+ /**
+ * Returns the kind of associated editor for direct edition.
+ *
+ * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.diagram.common.editpolicies.IDirectEdition
+ * @generated
+ */
+ public int getDirectEditionType() {
+ if(checkExtendedEditor()) {
+ initExtendedEditorConfiguration();
+ return IDirectEdition.EXTENDED_DIRECT_EDITOR;
+ }
+ if(checkDefaultEdition()) {
+ return IDirectEdition.DEFAULT_DIRECT_EDITOR;
+ }
+
+ // not a named element. no specific editor => do nothing
+ return IDirectEdition.NO_DIRECT_EDITION;
+ }
+
+ /**
+ * Checks if an extended editor is present.
+ *
+ * @return <code>true</code> if an extended editor is present.
+ * @generated
+ */
+ protected boolean checkExtendedEditor() {
+ if(resolveSemanticElement() != null) {
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ return false;
+ }
+
+ /**
+ * Checks if a default direct edition is available
+ *
+ * @return <code>true</code> if a default direct edition is available
+ * @generated
+ */
+ protected boolean checkDefaultEdition() {
+ return (getParser() != null);
+ }
+
+ /**
+ * Initializes the extended editor configuration
+ *
+ * @generated
+ */
+ protected void initExtendedEditorConfiguration() {
+ if(configuration == null) {
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("")) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else {
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ }
+ }
+
+ /**
+ * Updates the preference configuration
+ *
+ * @generated
+ */
+ protected void updateExtendedEditorConfiguration() {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ configuration = null;
+ }
+ }
+
+ /**
+ * Performs the direct edit usually used by GMF editors.
+ *
+ * @param theRequest
+ * the direct edit request that starts the direct edit system
+ * @generated
+ */
+ protected void performDefaultDirectEditorEdit(final Request theRequest) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ public void run() {
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+
+ /**
+ * @generated
+ */
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification event) {
+ refreshLabel();
+ Object feature = event.getFeature();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
+ setFontColor(DiagramColorRegistry.getInstance().getColor(c));
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ refreshUnderline();
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ refreshStrikeThrough();
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ refreshFont();
+ } else {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ refreshLabel();
+ }
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
+ removeSemanticListeners();
+ if(resolveSemanticElement() != null) {
+ addSemanticListeners();
+ }
+ refreshLabel();
+ }
+ }
+ }
+
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstant.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
+ refreshLabel();
+ }
+
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+
+ /**
+ * @generated
+ */
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
+
+ }
+
+ /**
+ * @generated
+ */
+ public void deactivate() {
+ removeOwnerElementListeners();
+ super.deactivate();
+
+ }
+
+
+ /**
+ * @generated
+ */
+ protected void removeOwnerElementListeners() {
+ removeListenerFilter(ADD_PARENT_MODEL);
+
+ }
+
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeNameEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeNameEditPartCN.java
new file mode 100644
index 00000000000..435c80bc3ed
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/PrimitiveTypeNameEditPartCN.java
@@ -0,0 +1,804 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.diagram.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.papyrus.diagram.common.util.DiagramEditPartsUtil;
+import org.eclipse.papyrus.diagram.profile.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.papyrus.diagram.profile.providers.UMLParserProvider;
+import org.eclipse.papyrus.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
+import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.umlutils.ui.VisualInformationPapyrusConstant;
+import org.eclipse.papyrus.umlutils.ui.helper.NameLabelIconHelper;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @generated
+ */
+public class PrimitiveTypeNameEditPartCN extends CompartmentEditPart implements ITextAwareEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5058;
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List<?> parserElements;
+
+ /**
+ * @generated
+ */
+ private String defaultText;
+
+
+
+ /**
+ * direct edition mode (default, undefined, registered editor, etc.)
+ *
+ * @generated
+ */
+ protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
+
+ /**
+ * configuration from a registered edit dialog
+ *
+ * @generated
+ */
+ protected IDirectEditorConfiguration configuration;
+
+
+
+ /**
+ * @generated
+ */
+ public PrimitiveTypeNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ProfileDiagramEditPart.NodeLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelTextHelper(IFigure figure) {
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
+ } else {
+ return ((Label)figure).getText();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelTextHelper(IFigure figure, String text) {
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
+ } else {
+ ((Label)figure).setText(text);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIconHelper(IFigure figure) {
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
+ } else {
+ return ((Label)figure).getIcon();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelIconHelper(IFigure figure, Image icon) {
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
+ } else {
+ ((Label)figure).setIcon(icon);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabel(WrappingLabel figure) {
+ unregisterVisuals();
+ setFigure(figure);
+ defaultText = getLabelTextHelper(figure);
+ registerVisuals();
+ refreshVisuals();
+ }
+
+ /**
+ * @generated
+ */
+ protected List getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIcon() {
+ EObject parserElement = getParserElement();
+ if(parserElement == null) {
+ return null;
+ }
+
+ List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ for(View view : views) {
+ if(NameLabelIconHelper.showLabelIcon(view)) {
+ return UMLElementTypes.getImage(parserElement.eClass());
+ }
+ }
+ return null;
+
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelText() {
+ String text = null;
+ EObject parserElement = getParserElement();
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
+ }
+ if(text == null || text.length() == 0) {
+ text = defaultText;
+ }
+ return text;
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabelText(String text) {
+ setLabelTextHelper(getFigure(), text);
+ 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();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public String getEditText() {
+ if(getParserElement() == null || getParser() == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isEditable() {
+ return getParser() != null;
+ }
+
+ /**
+ * @generated
+ */
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ public String isValid(final Object value) {
+ if(value instanceof String) {
+ final EObject element = getParserElement();
+ final IParser parser = getParser();
+ try {
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
+
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
+ return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ public IContentAssistProcessor getCompletionProcessor() {
+ if(getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ public IParser getParser() {
+ if(parser == null) {
+ parser = UMLParserProvider.get().getPrimitiveTypeName_5058Parser();
+ }
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected DirectEditManager getManager() {
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
+ }
+ return manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setManager(DirectEditManager manager) {
+ this.manager = manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit() {
+ getManager().show();
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit(Point eventLocation) {
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void performDirectEdit(char initialCharacter) {
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEditRequest(Request request) {
+
+ final Request theRequest = request;
+
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ directEditionMode = getDirectEditionType();
+ }
+ switch(directEditionMode) {
+ case IDirectEdition.NO_DIRECT_EDITION:
+ // no direct edition mode => does nothing
+ return;
+ case IDirectEdition.EXTENDED_DIRECT_EDITOR:
+ updateExtendedEditorConfiguration();
+ if(configuration == null || configuration.getLanguage() == null) {
+ performDefaultDirectEditorEdit(theRequest);
+ } else {
+ configuration.preEditAction(resolveSemanticElement());
+ Dialog dialog = null;
+ if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
+ helper.showEditor();
+ return;
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
+ } else {
+ return;
+ }
+ final Dialog finalDialog = dialog;
+
+ if(Window.OK == dialog.open()) {
+ TransactionalEditingDomain domain = getEditingDomain();
+ RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
+
+ @Override
+ protected void doExecute() {
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
+
+ }
+ };
+ domain.getCommandStack().execute(command);
+ }
+ }
+ break;
+ case IDirectEdition.DEFAULT_DIRECT_EDITOR:
+
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ public void run() {
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLabel();
+ refreshFont();
+ refreshFontColor();
+ refreshUnderline();
+ refreshStrikeThrough();
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshLabel() {
+ EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
+ if(maskLabelPolicy == null) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ 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();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshUnderline() {
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshStrikeThrough() {
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshFont() {
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ setFont(fontData);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ protected void addSemanticListeners() {
+ if(getParser() instanceof ISemanticParser) {
+ EObject element = resolveSemanticElement();
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
+ }
+ } else {
+ super.addSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeSemanticListeners() {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if(accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return (View)getModel();
+ }
+
+
+
+ /**
+ * Returns the kind of associated editor for direct edition.
+ *
+ * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.diagram.common.editpolicies.IDirectEdition
+ * @generated
+ */
+ public int getDirectEditionType() {
+ if(checkExtendedEditor()) {
+ initExtendedEditorConfiguration();
+ return IDirectEdition.EXTENDED_DIRECT_EDITOR;
+ }
+ if(checkDefaultEdition()) {
+ return IDirectEdition.DEFAULT_DIRECT_EDITOR;
+ }
+
+ // not a named element. no specific editor => do nothing
+ return IDirectEdition.NO_DIRECT_EDITION;
+ }
+
+ /**
+ * Checks if an extended editor is present.
+ *
+ * @return <code>true</code> if an extended editor is present.
+ * @generated
+ */
+ protected boolean checkExtendedEditor() {
+ if(resolveSemanticElement() != null) {
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ return false;
+ }
+
+ /**
+ * Checks if a default direct edition is available
+ *
+ * @return <code>true</code> if a default direct edition is available
+ * @generated
+ */
+ protected boolean checkDefaultEdition() {
+ return (getParser() != null);
+ }
+
+ /**
+ * Initializes the extended editor configuration
+ *
+ * @generated
+ */
+ protected void initExtendedEditorConfiguration() {
+ if(configuration == null) {
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("")) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else {
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ }
+ }
+
+ /**
+ * Updates the preference configuration
+ *
+ * @generated
+ */
+ protected void updateExtendedEditorConfiguration() {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ configuration = null;
+ }
+ }
+
+ /**
+ * Performs the direct edit usually used by GMF editors.
+ *
+ * @param theRequest
+ * the direct edit request that starts the direct edit system
+ * @generated
+ */
+ protected void performDefaultDirectEditorEdit(final Request theRequest) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ public void run() {
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+
+ /**
+ * @generated
+ */
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification event) {
+ refreshLabel();
+ Object feature = event.getFeature();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
+ setFontColor(DiagramColorRegistry.getInstance().getColor(c));
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ refreshUnderline();
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ refreshStrikeThrough();
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ refreshFont();
+ } else {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ refreshLabel();
+ }
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
+ removeSemanticListeners();
+ if(resolveSemanticElement() != null) {
+ addSemanticListeners();
+ }
+ refreshLabel();
+ }
+ }
+ }
+
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstant.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
+ refreshLabel();
+ }
+
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+
+ /**
+ * @generated
+ */
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
+
+ }
+
+ /**
+ * @generated
+ */
+ public void deactivate() {
+ removeOwnerElementListeners();
+ super.deactivate();
+
+ }
+
+
+ /**
+ * @generated
+ */
+ protected void removeOwnerElementListeners() {
+ removeListenerFilter(ADD_PARENT_MODEL);
+
+ }
+
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileApplicationEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileApplicationEditPart.java
index df8314324de..b0294847235 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileApplicationEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileApplicationEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.Connection;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileDiagramEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileDiagramEditPart.java
index a556bc7ae73..f3034dbe2bc 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileDiagramEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileDiagramEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileEditPartCN.java
index 10748de1b61..fbb6f873ca2 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -359,9 +372,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -413,9 +432,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -467,9 +492,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ElementImport_1064);
}
@@ -533,7 +564,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -552,7 +585,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -571,7 +606,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -628,7 +665,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -647,7 +686,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -664,7 +705,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -680,7 +723,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileEditPartTN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileEditPartTN.java
index 8581b0227cd..e173e2b7f31 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileEditPartTN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileEditPartTN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -359,9 +372,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -413,9 +432,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -467,9 +492,15 @@ NamedElementEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ElementImport_1064);
}
@@ -533,7 +564,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -552,7 +585,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -571,7 +606,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -628,7 +665,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -647,7 +686,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -664,7 +705,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -680,7 +723,9 @@ NamedElementEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileNameEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileNameEditPartCN.java
index 6f19ee95140..c2f691947ad 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileNameEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileNameEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileNameEditPartTN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileNameEditPartTN.java
index 9ceea57d0c7..aa70f8f9b1b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileNameEditPartTN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfileNameEditPartTN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartCN.java
index 5a7c2168781..f9ae21d41f1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartTN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartTN.java
index 060e0428c1f..2aefefe7dfb 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartTN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartTN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ShortCutDiagramEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ShortCutDiagramEditPart.java
index 4c1a3f6dc7c..30721f3470a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ShortCutDiagramEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/ShortCutDiagramEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPart.java
index e0ffd793326..3843470429e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPartCN.java
index 5062775defa..d8c63eb4345 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeEditPart.java
index 97c0edd95f4..011ed908f1a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -368,9 +381,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4001);
}
@@ -395,9 +414,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4019);
}
@@ -422,9 +447,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Generalization_4002);
}
@@ -464,9 +495,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -518,9 +555,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -572,9 +615,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
types.add(UMLElementTypes.ElementImport_1064);
}
@@ -630,7 +679,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -640,7 +691,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -650,7 +703,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -665,7 +720,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -684,7 +741,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -703,7 +762,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -749,7 +810,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -759,7 +822,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -769,7 +834,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -784,7 +851,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -803,7 +872,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -820,7 +891,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeEditPartCN.java
index c1476463846..3ebcbed29da 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.ArrayList;
@@ -368,9 +381,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4001);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4001);
+ }
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4001);
}
@@ -395,9 +414,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Association_4019);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Association_4019);
+ }
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.StereotypeEditPartCN) {
types.add(UMLElementTypes.Association_4019);
}
@@ -422,9 +447,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Generalization_4002);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Generalization_4002);
+ }
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.StereotypeEditPartCN) {
types.add(UMLElementTypes.Generalization_4002);
}
@@ -464,9 +495,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4008);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4008);
+ }
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4008);
}
@@ -518,9 +555,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.Dependency_4018);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.Dependency_4018);
+ }
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.StereotypeEditPartCN) {
types.add(UMLElementTypes.Dependency_4018);
}
@@ -572,9 +615,15 @@ ClassifierEditPart {
if(targetEditPart instanceof EnumerationEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
types.add(UMLElementTypes.ElementImport_1064);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ElementImport_1064);
+ }
if(targetEditPart instanceof org.eclipse.papyrus.diagram.profile.edit.parts.StereotypeEditPartCN) {
types.add(UMLElementTypes.ElementImport_1064);
}
@@ -630,7 +679,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -640,7 +691,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -650,7 +703,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -665,7 +720,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -684,7 +741,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -703,7 +762,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -749,7 +810,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -759,7 +822,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -769,7 +834,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Stereotype_1026);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Enumeration_3025);
@@ -784,7 +851,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -803,7 +872,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
@@ -820,7 +891,9 @@ ClassifierEditPart {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Class_3028);
types.add(UMLElementTypes.Model_1027);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeNameEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeNameEditPart.java
index 0f2a94b13e7..987fd2ad41f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeNameEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeNameEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeNameEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeNameEditPartCN.java
index 76787e45976..67ddf1d45d5 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeNameEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeNameEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPart.java
index 38741ffda13..c891694804f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPart.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPartCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPartCN.java
index 73aafeb2308..255b387ad62 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPartCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPartCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.IFigure;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/UMLEditPartFactory.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/UMLEditPartFactory.java
index 3c19a8914f5..f6728c4e9b0 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/UMLEditPartFactory.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/parts/UMLEditPartFactory.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.parts;
import org.eclipse.draw2d.FigureUtilities;
@@ -92,6 +105,12 @@ public class UMLEditPartFactory implements EditPartFactory {
case EnumerationNameEditPart.VISUAL_ID:
return new EnumerationNameEditPart(view);
+ case PrimitiveTypeEditPart.VISUAL_ID:
+ return new PrimitiveTypeEditPart(view);
+
+ case PrimitiveTypeNameEditPart.VISUAL_ID:
+ return new PrimitiveTypeNameEditPart(view);
+
case DataTypeEditPart.VISUAL_ID:
return new DataTypeEditPart(view);
@@ -104,6 +123,12 @@ public class UMLEditPartFactory implements EditPartFactory {
case DiagramNameEditPart.VISUAL_ID:
return new DiagramNameEditPart(view);
+ case PrimitiveTypeEditPartCN.VISUAL_ID:
+ return new PrimitiveTypeEditPartCN(view);
+
+ case PrimitiveTypeNameEditPartCN.VISUAL_ID:
+ return new PrimitiveTypeNameEditPartCN(view);
+
case DataTypeOperationEditPart.VISUAL_ID:
return new DataTypeOperationEditPart(view);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java
index a0a9ffcf224..fbeb6b8a830 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java
@@ -1,14 +1,30 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationBranchCreateCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationBranchReorientCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationCreateCommand;
@@ -54,9 +70,13 @@ public class AssociationBranchItemSemanticEditPolicy extends UMLBaseItemSemantic
* @generated
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
- ArrayList todestroy = new ArrayList();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
- return new EMFtoGEFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy));
+ //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ return getGEFWrapper(cmd.reduce());
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java
index bfb57c388e8..d9ef3bae9cb 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java
@@ -1,14 +1,30 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationBranchCreateCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationBranchReorientCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationCreateCommand;
@@ -54,9 +70,13 @@ public class AssociationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
* @generated
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
- ArrayList todestroy = new ArrayList();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
- return new EMFtoGEFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy));
+ //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ return getGEFWrapper(cmd.reduce());
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java
index 5094c7e59d4..ea01702a693 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java
@@ -1,20 +1,30 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
-import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationBranchCreateCommand;
@@ -44,7 +54,6 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ElementImportEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.GeneralizationEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageImportEditPart;
-import org.eclipse.papyrus.diagram.profile.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
/**
@@ -66,58 +75,19 @@ public class AssociationNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEd
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ClassOperationItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ClassOperationItemSemanticEditPolicy.java
index 851326005b9..12e8067170f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ClassOperationItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ClassOperationItemSemanticEditPolicy.java
@@ -1,11 +1,26 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
@@ -30,21 +45,19 @@ public class ClassOperationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
-
-
+ cmd.setTransactionNestingEnabled(true);
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ClassPropertyItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ClassPropertyItemSemanticEditPolicy.java
index 38b9b537679..334f5de6292 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ClassPropertyItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ClassPropertyItemSemanticEditPolicy.java
@@ -1,11 +1,26 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
@@ -30,21 +45,19 @@ public class ClassPropertyItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
-
-
+ cmd.setTransactionNestingEnabled(true);
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
index 7a8be32d7b6..4c27e35278e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/CommentEditPartItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/CommentEditPartItemSemanticEditPolicy.java
index f62d3644ab7..27caae14011 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/CommentEditPartItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/CommentEditPartItemSemanticEditPolicy.java
@@ -1,19 +1,29 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
-import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
@@ -22,7 +32,6 @@ import org.eclipse.papyrus.diagram.profile.edit.commands.ConstraintConstrainedEl
import org.eclipse.papyrus.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.diagram.profile.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
/**
@@ -44,42 +53,19 @@ public class CommentEditPartItemSemanticEditPolicy extends UMLBaseItemSemanticEd
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/CommentItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/CommentItemSemanticEditPolicyCN.java
index bf66995aca2..ebfdcba3703 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/CommentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/CommentItemSemanticEditPolicyCN.java
@@ -1,19 +1,29 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
-import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
@@ -22,7 +32,6 @@ import org.eclipse.papyrus.diagram.profile.edit.commands.ConstraintConstrainedEl
import org.eclipse.papyrus.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.diagram.profile.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
/**
@@ -44,42 +53,19 @@ public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
index a5273a02079..19d26332374 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java
index d83f2515608..6a34490a1a3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java
@@ -1,20 +1,30 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
-import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
@@ -32,7 +42,6 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.ConstraintConstrainedEleme
import org.eclipse.papyrus.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ElementImportEditPart;
-import org.eclipse.papyrus.diagram.profile.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
/**
@@ -54,55 +63,19 @@ public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java
index 5b539ba71fd..4be5afa3a91 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java
@@ -1,20 +1,30 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
-import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
@@ -32,7 +42,6 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.ConstraintConstrainedEleme
import org.eclipse.papyrus.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ElementImportEditPart;
-import org.eclipse.papyrus.diagram.profile.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
/**
@@ -54,55 +63,19 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
index 5e8ca4cf615..e2927ad3404 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
index bb806e701eb..dffcfc3f29a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java
index 6a78f5083ed..5b054a5fc75 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java
@@ -1,21 +1,33 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
@@ -72,59 +84,20 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyChildNodesCommand(cmd);
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java
index bbfd8cf9b42..0fa4b53c882 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java
@@ -1,21 +1,33 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
@@ -72,59 +84,20 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyChildNodesCommand(cmd);
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
index 236f2e5a077..004b96f7d4e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
index 877e81afb87..7ee29da5eb7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeOperationItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeOperationItemSemanticEditPolicy.java
index 825a5ff6e84..853f81371bd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeOperationItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypeOperationItemSemanticEditPolicy.java
@@ -1,11 +1,26 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
@@ -30,21 +45,19 @@ public class DataTypeOperationItemSemanticEditPolicy extends UMLBaseItemSemantic
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
-
-
+ cmd.setTransactionNestingEnabled(true);
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypePropertyItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypePropertyItemSemanticEditPolicy.java
index 3cef61abe23..5030ff5b259 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypePropertyItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DataTypePropertyItemSemanticEditPolicy.java
@@ -1,11 +1,26 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
@@ -30,21 +45,19 @@ public class DataTypePropertyItemSemanticEditPolicy extends UMLBaseItemSemanticE
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
-
-
+ cmd.setTransactionNestingEnabled(true);
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DependencyBranchItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DependencyBranchItemSemanticEditPolicy.java
index ff8eb1973ef..e4f9f20c6bb 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DependencyBranchItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DependencyBranchItemSemanticEditPolicy.java
@@ -1,14 +1,30 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
@@ -42,9 +58,13 @@ public class DependencyBranchItemSemanticEditPolicy extends UMLBaseItemSemanticE
* @generated
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
- ArrayList todestroy = new ArrayList();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
- return new EMFtoGEFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy));
+ //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ return getGEFWrapper(cmd.reduce());
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DependencyItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DependencyItemSemanticEditPolicy.java
index 9fe6b9508fd..d5fd069f764 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DependencyItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DependencyItemSemanticEditPolicy.java
@@ -1,14 +1,30 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
@@ -42,9 +58,13 @@ public class DependencyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
* @generated
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
- ArrayList todestroy = new ArrayList();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
- return new EMFtoGEFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy));
+ //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ return getGEFWrapper(cmd.reduce());
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DependencyNodeItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DependencyNodeItemSemanticEditPolicy.java
index 3b13711be54..ed9016ec6ea 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DependencyNodeItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/DependencyNodeItemSemanticEditPolicy.java
@@ -1,20 +1,30 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
-import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
@@ -32,7 +42,6 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.ConstraintConstrainedEleme
import org.eclipse.papyrus.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ElementImportEditPart;
-import org.eclipse.papyrus.diagram.profile.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
/**
@@ -54,50 +63,19 @@ public class DependencyNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ElementImportItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ElementImportItemSemanticEditPolicy.java
index 236aa0e1bac..4892b0eb92f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ElementImportItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ElementImportItemSemanticEditPolicy.java
@@ -1,13 +1,29 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
@@ -32,9 +48,13 @@ public class ElementImportItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
* @generated
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
- ArrayList todestroy = new ArrayList();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
- return new EMFtoGEFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy));
+ //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ return getGEFWrapper(cmd.reduce());
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
index e1277c7d5f6..3dff5cfb62f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
index c4d9606f5d8..971354c04f7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java
index 1b1270d1c97..44dde86d7d1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java
@@ -1,21 +1,33 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
@@ -70,59 +82,20 @@ public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyChildNodesCommand(cmd);
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java
index 7f5c2f0d8e0..9637ff72e20 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java
@@ -1,21 +1,33 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
@@ -70,59 +82,20 @@ public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdit
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyChildNodesCommand(cmd);
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationLiteralItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationLiteralItemSemanticEditPolicy.java
index ba1a503bfb8..3fe9b99d518 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationLiteralItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/EnumerationLiteralItemSemanticEditPolicy.java
@@ -1,11 +1,26 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
@@ -30,21 +45,19 @@ public class EnumerationLiteralItemSemanticEditPolicy extends UMLBaseItemSemanti
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
-
-
+ cmd.setTransactionNestingEnabled(true);
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java
index 3b3bc7830b1..974038679c3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java
@@ -1,14 +1,30 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationBranchCreateCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationBranchReorientCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationCreateCommand;
@@ -54,9 +70,13 @@ public class ExtensionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli
* @generated
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
- ArrayList todestroy = new ArrayList();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
- return new EMFtoGEFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy));
+ //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ return getGEFWrapper(cmd.reduce());
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/GeneralizationItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/GeneralizationItemSemanticEditPolicy.java
index f24e8328967..265f44fb720 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/GeneralizationItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/GeneralizationItemSemanticEditPolicy.java
@@ -1,13 +1,29 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
@@ -32,9 +48,13 @@ public class GeneralizationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
* @generated
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
- ArrayList todestroy = new ArrayList();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
- return new EMFtoGEFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy));
+ //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ return getGEFWrapper(cmd.reduce());
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java
index f51c3c40a15..1fb51ca3dd7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java
@@ -1,20 +1,30 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
-import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationBranchCreateCommand;
@@ -47,7 +57,6 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.ElementImportEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ExtensionEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.GeneralizationEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageImportEditPart;
-import org.eclipse.papyrus.diagram.profile.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
/**
@@ -69,59 +78,19 @@ public class MetaclassItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case ExtensionEditPart.VISUAL_ID:
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java
index bc3a3621029..f74ce897341 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java
@@ -1,20 +1,30 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
-import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationBranchCreateCommand;
@@ -47,7 +57,6 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.ElementImportEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ExtensionEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.GeneralizationEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageImportEditPart;
-import org.eclipse.papyrus.diagram.profile.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
/**
@@ -69,59 +78,19 @@ public class MetaclassItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPo
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case ExtensionEditPart.VISUAL_ID:
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java
index 6a948d5a60d..55f46bb8f70 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java
@@ -1,12 +1,27 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
@@ -49,6 +64,7 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.ModelEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ModelPackageableElementCompartmentEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageImportEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileApplicationEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileEditPartCN;
import org.eclipse.papyrus.diagram.profile.part.UMLVisualIDRegistry;
@@ -73,55 +89,20 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case ProfileApplicationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyChildNodesCommand(cmd);
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
@@ -138,6 +119,35 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
for(Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
+ case CommentEditPartCN.VISUAL_ID:
+
+
+ for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ }
+ }
+
+ for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
+ Edge outgoingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
+ break;
+ }
+ }
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
case ModelEditPartCN.VISUAL_ID:
@@ -148,7 +158,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
@@ -156,7 +166,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -171,7 +181,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -189,7 +199,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case ProfileApplicationEditPart.VISUAL_ID:
case DependencyEditPart.VISUAL_ID:
@@ -198,7 +208,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -213,7 +223,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -231,7 +241,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
@@ -239,7 +249,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -254,7 +264,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -262,7 +272,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
- case CommentEditPartCN.VISUAL_ID:
+ case ConstraintEditPartCN.VISUAL_ID:
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
@@ -272,7 +282,14 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -280,10 +297,16 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
+ break;
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -291,7 +314,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
- case ConstraintEditPartCN.VISUAL_ID:
+ case EnumerationEditPartCN.VISUAL_ID:
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
@@ -301,14 +324,17 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -316,16 +342,16 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -333,7 +359,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
- case EnumerationEditPartCN.VISUAL_ID:
+ case PrimitiveTypeEditPartCN.VISUAL_ID:
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
@@ -343,7 +369,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case AssociationEditPart.VISUAL_ID:
case AssociationBranchEditPart.VISUAL_ID:
@@ -353,7 +379,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -370,7 +396,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -388,7 +414,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case AssociationEditPart.VISUAL_ID:
case AssociationBranchEditPart.VISUAL_ID:
@@ -398,7 +424,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -415,7 +441,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java
index 662eb28000e..f4847beb0fa 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java
@@ -1,12 +1,27 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
@@ -49,6 +64,7 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.ModelEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ModelPackageableElementCompartmentEditPartTN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageImportEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileApplicationEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileEditPartCN;
import org.eclipse.papyrus.diagram.profile.part.UMLVisualIDRegistry;
@@ -73,55 +89,20 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case ProfileApplicationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyChildNodesCommand(cmd);
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
@@ -138,6 +119,35 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
for(Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
+ case CommentEditPartCN.VISUAL_ID:
+
+
+ for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ }
+ }
+
+ for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
+ Edge outgoingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
+ break;
+ }
+ }
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
case ModelEditPartCN.VISUAL_ID:
@@ -148,7 +158,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
@@ -156,7 +166,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -171,7 +181,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -189,7 +199,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case ProfileApplicationEditPart.VISUAL_ID:
case DependencyEditPart.VISUAL_ID:
@@ -198,7 +208,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -213,7 +223,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -231,7 +241,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
@@ -239,7 +249,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -254,7 +264,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -272,14 +282,14 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -290,13 +300,13 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -314,7 +324,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case AssociationEditPart.VISUAL_ID:
case AssociationBranchEditPart.VISUAL_ID:
@@ -324,7 +334,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -341,7 +351,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -349,7 +359,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
- case DataTypeEditPartCN.VISUAL_ID:
+ case PrimitiveTypeEditPartCN.VISUAL_ID:
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
@@ -359,7 +369,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case AssociationEditPart.VISUAL_ID:
case AssociationBranchEditPart.VISUAL_ID:
@@ -369,7 +379,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -386,7 +396,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -394,7 +404,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
- case CommentEditPartCN.VISUAL_ID:
+ case DataTypeEditPartCN.VISUAL_ID:
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
@@ -404,7 +414,17 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -412,10 +432,16 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ case PackageImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
index 1ae0f43f320..cbc7fe138bd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
@@ -8,6 +21,7 @@ import org.eclipse.papyrus.diagram.profile.edit.commands.DataTypeCreateCommandCN
import org.eclipse.papyrus.diagram.profile.edit.commands.EnumerationCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.ModelCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.PackageCreateCommandCN;
+import org.eclipse.papyrus.diagram.profile.edit.commands.PrimitiveTypeCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.ProfileCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
@@ -28,6 +42,9 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyCN extends
* @generated
*/
protected Command getCreateCommand(CreateElementRequest req) {
+ if(UMLElementTypes.Comment_1007 == req.getElementType()) {
+ return getGEFWrapper(new CommentCreateCommandCN(req));
+ }
if(UMLElementTypes.Model_1027 == req.getElementType()) {
return getGEFWrapper(new ModelCreateCommandCN(req));
}
@@ -37,15 +54,15 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyCN extends
if(UMLElementTypes.Package_1012 == req.getElementType()) {
return getGEFWrapper(new PackageCreateCommandCN(req));
}
- if(UMLElementTypes.Comment_1007 == req.getElementType()) {
- return getGEFWrapper(new CommentCreateCommandCN(req));
- }
if(UMLElementTypes.Constraint_1028 == req.getElementType()) {
return getGEFWrapper(new ConstraintCreateCommandCN(req));
}
if(UMLElementTypes.Enumeration_3025 == req.getElementType()) {
return getGEFWrapper(new EnumerationCreateCommandCN(req));
}
+ if(UMLElementTypes.PrimitiveType_3026 == req.getElementType()) {
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ }
if(UMLElementTypes.DataType_3027 == req.getElementType()) {
return getGEFWrapper(new DataTypeCreateCommandCN(req));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java
index 0d034c8ffe3..daaf77d1af8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
@@ -8,6 +21,7 @@ import org.eclipse.papyrus.diagram.profile.edit.commands.DataTypeCreateCommandCN
import org.eclipse.papyrus.diagram.profile.edit.commands.EnumerationCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.ModelCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.PackageCreateCommandCN;
+import org.eclipse.papyrus.diagram.profile.edit.commands.PrimitiveTypeCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.ProfileCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
@@ -28,6 +42,9 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyTN extends
* @generated
*/
protected Command getCreateCommand(CreateElementRequest req) {
+ if(UMLElementTypes.Comment_1007 == req.getElementType()) {
+ return getGEFWrapper(new CommentCreateCommandCN(req));
+ }
if(UMLElementTypes.Model_1027 == req.getElementType()) {
return getGEFWrapper(new ModelCreateCommandCN(req));
}
@@ -43,12 +60,12 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyTN extends
if(UMLElementTypes.Enumeration_3025 == req.getElementType()) {
return getGEFWrapper(new EnumerationCreateCommandCN(req));
}
+ if(UMLElementTypes.PrimitiveType_3026 == req.getElementType()) {
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ }
if(UMLElementTypes.DataType_3027 == req.getElementType()) {
return getGEFWrapper(new DataTypeCreateCommandCN(req));
}
- if(UMLElementTypes.Comment_1007 == req.getElementType()) {
- return getGEFWrapper(new CommentCreateCommandCN(req));
- }
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackageImportItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackageImportItemSemanticEditPolicy.java
index b0a85c6bb5c..9ac5f8de220 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackageImportItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackageImportItemSemanticEditPolicy.java
@@ -1,13 +1,29 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
@@ -32,9 +48,13 @@ public class PackageImportItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
* @generated
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
- ArrayList todestroy = new ArrayList();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
- return new EMFtoGEFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy));
+ //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ return getGEFWrapper(cmd.reduce());
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java
index 868ee0d4efc..e72ec132afa 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java
@@ -1,12 +1,27 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
@@ -49,6 +64,7 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.ModelEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageImportEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileApplicationEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileEditPartCN;
import org.eclipse.papyrus.diagram.profile.part.UMLVisualIDRegistry;
@@ -73,55 +89,20 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case ProfileApplicationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyChildNodesCommand(cmd);
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
@@ -148,7 +129,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -159,7 +140,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case CommentAnnotatedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -177,7 +158,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
@@ -185,7 +166,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -200,7 +181,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -218,7 +199,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case ProfileApplicationEditPart.VISUAL_ID:
case DependencyEditPart.VISUAL_ID:
@@ -227,7 +208,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -242,7 +223,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -260,7 +241,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
@@ -268,7 +249,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -283,7 +264,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -301,14 +282,14 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -319,13 +300,13 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -343,7 +324,52 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ }
+ }
+
+ for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
+ Edge outgoingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ case PackageImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
+ break;
+ }
+ }
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ case PrimitiveTypeEditPartCN.VISUAL_ID:
+
+
+ for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case AssociationEditPart.VISUAL_ID:
case AssociationBranchEditPart.VISUAL_ID:
@@ -353,7 +379,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -370,7 +396,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -388,7 +414,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case AssociationEditPart.VISUAL_ID:
case AssociationBranchEditPart.VISUAL_ID:
@@ -398,7 +424,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -415,7 +441,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java
index b372087231d..7b30532bd4e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java
@@ -1,12 +1,27 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
@@ -51,6 +66,7 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.ModelEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageImportEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileApplicationEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileEditPartCN;
import org.eclipse.papyrus.diagram.profile.part.UMLVisualIDRegistry;
@@ -85,55 +101,20 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case ProfileApplicationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyChildNodesCommand(cmd);
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
@@ -156,7 +137,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
@@ -164,7 +145,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -179,7 +160,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -201,7 +182,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -212,7 +193,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case CommentAnnotatedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -230,7 +211,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
@@ -238,7 +219,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -253,7 +234,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -271,7 +252,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case ProfileApplicationEditPart.VISUAL_ID:
case DependencyEditPart.VISUAL_ID:
@@ -280,7 +261,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -295,7 +276,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -313,7 +294,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
@@ -321,7 +302,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -336,7 +317,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -354,14 +335,14 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -372,13 +353,13 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -396,7 +377,52 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ }
+ }
+
+ for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
+ Edge outgoingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ case PackageImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
+ break;
+ }
+ }
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ case PrimitiveTypeEditPartCN.VISUAL_ID:
+
+
+ for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case AssociationEditPart.VISUAL_ID:
case AssociationBranchEditPart.VISUAL_ID:
@@ -406,7 +432,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -423,7 +449,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -441,7 +467,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case AssociationEditPart.VISUAL_ID:
case AssociationBranchEditPart.VISUAL_ID:
@@ -451,7 +477,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -468,7 +494,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
index a3d917b99f5..29b31fa75a3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
@@ -8,6 +21,7 @@ import org.eclipse.papyrus.diagram.profile.edit.commands.DataTypeCreateCommandCN
import org.eclipse.papyrus.diagram.profile.edit.commands.EnumerationCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.ModelCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.PackageCreateCommandCN;
+import org.eclipse.papyrus.diagram.profile.edit.commands.PrimitiveTypeCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.ProfileCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
@@ -46,6 +60,9 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicy extends
if(UMLElementTypes.Enumeration_3025 == req.getElementType()) {
return getGEFWrapper(new EnumerationCreateCommandCN(req));
}
+ if(UMLElementTypes.PrimitiveType_3026 == req.getElementType()) {
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ }
if(UMLElementTypes.DataType_3027 == req.getElementType()) {
return getGEFWrapper(new DataTypeCreateCommandCN(req));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
index a4091636017..576d0e4d124 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
@@ -8,6 +21,7 @@ import org.eclipse.papyrus.diagram.profile.edit.commands.DataTypeCreateCommandCN
import org.eclipse.papyrus.diagram.profile.edit.commands.EnumerationCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.ModelCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.PackageCreateCommandCN;
+import org.eclipse.papyrus.diagram.profile.edit.commands.PrimitiveTypeCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.ProfileCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
@@ -46,6 +60,9 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicyCN extend
if(UMLElementTypes.Enumeration_3025 == req.getElementType()) {
return getGEFWrapper(new EnumerationCreateCommandCN(req));
}
+ if(UMLElementTypes.PrimitiveType_3026 == req.getElementType()) {
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ }
if(UMLElementTypes.DataType_3027 == req.getElementType()) {
return getGEFWrapper(new DataTypeCreateCommandCN(req));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java
new file mode 100644
index 00000000000..a2dd510bbac
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java
@@ -0,0 +1,213 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.edit.policies;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationBranchCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationBranchReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.DependencyBranchReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.DependencyReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.ElementImportCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.ElementImportReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.GeneralizationReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.PackageImportCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.PackageImportReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.parts.AssociationBranchEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.ElementImportEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PackageImportEditPart;
+import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class PrimitiveTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public PrimitiveTypeItemSemanticEditPolicy() {
+ super(UMLElementTypes.PrimitiveType_2009);
+ }
+
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ View view = (View)getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+
+ EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+ if(annotation == null) {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ List<EObject> todestroy = new ArrayList<EObject>();
+ todestroy.add(req.getElementToDestroy());
+ //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ } else {
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ return command != null ? command : super.getCreateRelationshipCommand(req);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.Association_4001 == req.getElementType()) {
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4019 == req.getElementType()) {
+ return getGEFWrapper(new AssociationBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Generalization_4002 == req.getElementType()) {
+ return getGEFWrapper(new GeneralizationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4008 == req.getElementType()) {
+ return getGEFWrapper(new DependencyCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4018 == req.getElementType()) {
+ return getGEFWrapper(new DependencyBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ElementImport_1064 == req.getElementType()) {
+ return getGEFWrapper(new ElementImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.PackageImport_1065 == req.getElementType()) {
+ return getGEFWrapper(new PackageImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.CommentAnnotatedElement_1022 == req.getElementType()) {
+ return null;
+ }
+ if(UMLElementTypes.ConstraintConstrainedElement_4014 == req.getElementType()) {
+ return null;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.Association_4001 == req.getElementType()) {
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4019 == req.getElementType()) {
+ return getGEFWrapper(new AssociationBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Generalization_4002 == req.getElementType()) {
+ return getGEFWrapper(new GeneralizationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4008 == req.getElementType()) {
+ return getGEFWrapper(new DependencyCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4018 == req.getElementType()) {
+ return getGEFWrapper(new DependencyBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ElementImport_1064 == req.getElementType()) {
+ return getGEFWrapper(new ElementImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.PackageImport_1065 == req.getElementType()) {
+ return null;
+ }
+ if(UMLElementTypes.CommentAnnotatedElement_1022 == req.getElementType()) {
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ConstraintConstrainedElement_4014 == req.getElementType()) {
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return null;
+ }
+
+ /**
+ * Returns command to reorient EClass based link. New link target or source
+ * should be the domain model element associated with this node.
+ *
+ * @generated
+ */
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch(getVisualID(req)) {
+ case AssociationEditPart.VISUAL_ID:
+ return getGEFWrapper(new AssociationReorientCommand(req));
+ case AssociationBranchEditPart.VISUAL_ID:
+ return getGEFWrapper(new AssociationBranchReorientCommand(req));
+ case GeneralizationEditPart.VISUAL_ID:
+ return getGEFWrapper(new GeneralizationReorientCommand(req));
+ case DependencyEditPart.VISUAL_ID:
+ return getGEFWrapper(new DependencyReorientCommand(req));
+ case DependencyBranchEditPart.VISUAL_ID:
+ return getGEFWrapper(new DependencyBranchReorientCommand(req));
+ case ElementImportEditPart.VISUAL_ID:
+ return getGEFWrapper(new ElementImportReorientCommand(req));
+ case PackageImportEditPart.VISUAL_ID:
+ return getGEFWrapper(new PackageImportReorientCommand(req));
+ }
+ return super.getReorientRelationshipCommand(req);
+ }
+
+ /**
+ * Returns command to reorient EReference based link. New link target or source
+ * should be the domain model element associated with this node.
+ *
+ * @generated
+ */
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch(getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java
new file mode 100644
index 00000000000..20c3a2a4ede
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java
@@ -0,0 +1,213 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.edit.policies;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationBranchCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationBranchReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.AssociationReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.DependencyBranchReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.DependencyReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.ElementImportCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.ElementImportReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.GeneralizationReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.PackageImportCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.PackageImportReorientCommand;
+import org.eclipse.papyrus.diagram.profile.edit.parts.AssociationBranchEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.ElementImportEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PackageImportEditPart;
+import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class PrimitiveTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public PrimitiveTypeItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.PrimitiveType_3026);
+ }
+
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ View view = (View)getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+
+ EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+ if(annotation == null) {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ List<EObject> todestroy = new ArrayList<EObject>();
+ todestroy.add(req.getElementToDestroy());
+ //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ } else {
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ return command != null ? command : super.getCreateRelationshipCommand(req);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.Association_4001 == req.getElementType()) {
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4019 == req.getElementType()) {
+ return getGEFWrapper(new AssociationBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Generalization_4002 == req.getElementType()) {
+ return getGEFWrapper(new GeneralizationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4008 == req.getElementType()) {
+ return getGEFWrapper(new DependencyCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4018 == req.getElementType()) {
+ return getGEFWrapper(new DependencyBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ElementImport_1064 == req.getElementType()) {
+ return getGEFWrapper(new ElementImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.PackageImport_1065 == req.getElementType()) {
+ return getGEFWrapper(new PackageImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.CommentAnnotatedElement_1022 == req.getElementType()) {
+ return null;
+ }
+ if(UMLElementTypes.ConstraintConstrainedElement_4014 == req.getElementType()) {
+ return null;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.Association_4001 == req.getElementType()) {
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4019 == req.getElementType()) {
+ return getGEFWrapper(new AssociationBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Generalization_4002 == req.getElementType()) {
+ return getGEFWrapper(new GeneralizationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4008 == req.getElementType()) {
+ return getGEFWrapper(new DependencyCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4018 == req.getElementType()) {
+ return getGEFWrapper(new DependencyBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ElementImport_1064 == req.getElementType()) {
+ return getGEFWrapper(new ElementImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.PackageImport_1065 == req.getElementType()) {
+ return null;
+ }
+ if(UMLElementTypes.CommentAnnotatedElement_1022 == req.getElementType()) {
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ConstraintConstrainedElement_4014 == req.getElementType()) {
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return null;
+ }
+
+ /**
+ * Returns command to reorient EClass based link. New link target or source
+ * should be the domain model element associated with this node.
+ *
+ * @generated
+ */
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch(getVisualID(req)) {
+ case AssociationEditPart.VISUAL_ID:
+ return getGEFWrapper(new AssociationReorientCommand(req));
+ case AssociationBranchEditPart.VISUAL_ID:
+ return getGEFWrapper(new AssociationBranchReorientCommand(req));
+ case GeneralizationEditPart.VISUAL_ID:
+ return getGEFWrapper(new GeneralizationReorientCommand(req));
+ case DependencyEditPart.VISUAL_ID:
+ return getGEFWrapper(new DependencyReorientCommand(req));
+ case DependencyBranchEditPart.VISUAL_ID:
+ return getGEFWrapper(new DependencyBranchReorientCommand(req));
+ case ElementImportEditPart.VISUAL_ID:
+ return getGEFWrapper(new ElementImportReorientCommand(req));
+ case PackageImportEditPart.VISUAL_ID:
+ return getGEFWrapper(new PackageImportReorientCommand(req));
+ }
+ return super.getReorientRelationshipCommand(req);
+ }
+
+ /**
+ * Returns command to reorient EReference based link. New link target or source
+ * should be the domain model element associated with this node.
+ *
+ * @generated
+ */
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch(getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileApplicationItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileApplicationItemSemanticEditPolicy.java
index 7b20f624b57..94bf762a3e8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileApplicationItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileApplicationItemSemanticEditPolicy.java
@@ -1,13 +1,29 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
@@ -32,9 +48,13 @@ public class ProfileApplicationItemSemanticEditPolicy extends UMLBaseItemSemanti
* @generated
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
- ArrayList todestroy = new ArrayList();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
- return new EMFtoGEFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy));
+ //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ return getGEFWrapper(cmd.reduce());
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java
index d1c18bdbd49..c50ce0ecf45 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
@@ -16,6 +29,7 @@ import org.eclipse.papyrus.diagram.profile.edit.commands.EnumerationCreateComman
import org.eclipse.papyrus.diagram.profile.edit.commands.MetaclassCreateCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.ModelCreateCommandTN;
import org.eclipse.papyrus.diagram.profile.edit.commands.PackageCreateCommand;
+import org.eclipse.papyrus.diagram.profile.edit.commands.PrimitiveTypeCreateCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.ProfileCreateCommandTN;
import org.eclipse.papyrus.diagram.profile.edit.commands.ShortCutDiagramCreateCommand;
import org.eclipse.papyrus.diagram.profile.edit.commands.StereotypeCreateCommand;
@@ -68,6 +82,9 @@ public class ProfileDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
if(UMLElementTypes.Enumeration_2006 == req.getElementType()) {
return getGEFWrapper(new EnumerationCreateCommand(req));
}
+ if(UMLElementTypes.PrimitiveType_2009 == req.getElementType()) {
+ return getGEFWrapper(new PrimitiveTypeCreateCommand(req));
+ }
if(UMLElementTypes.DataType_2010 == req.getElementType()) {
return getGEFWrapper(new DataTypeCreateCommand(req));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java
index 5951ca5f130..c0a17b1102a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java
@@ -1,12 +1,27 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
@@ -50,6 +65,7 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.MetaclassEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ModelEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageImportEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileApplicationEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfilePackageableElementCompartmentEditPartCN;
@@ -76,56 +92,20 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case ProfileApplicationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case ProfileApplicationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyChildNodesCommand(cmd);
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
@@ -152,7 +132,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case ExtensionEditPart.VISUAL_ID:
case AssociationEditPart.VISUAL_ID:
@@ -163,7 +143,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -180,7 +160,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -198,7 +178,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
@@ -206,7 +186,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -221,7 +201,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -239,7 +219,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case ProfileApplicationEditPart.VISUAL_ID:
case DependencyEditPart.VISUAL_ID:
@@ -248,7 +228,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -263,7 +243,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -281,7 +261,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
@@ -289,7 +269,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -304,7 +284,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -322,14 +302,14 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -340,13 +320,13 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -364,7 +344,52 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ }
+ }
+
+ for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
+ Edge outgoingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ case PackageImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
+ break;
+ }
+ }
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ case PrimitiveTypeEditPartCN.VISUAL_ID:
+
+
+ for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case AssociationEditPart.VISUAL_ID:
case AssociationBranchEditPart.VISUAL_ID:
@@ -374,7 +399,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -391,7 +416,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -409,7 +434,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case AssociationEditPart.VISUAL_ID:
case AssociationBranchEditPart.VISUAL_ID:
@@ -419,7 +444,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -436,7 +461,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -454,7 +479,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -465,7 +490,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case CommentAnnotatedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -483,7 +508,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case ExtensionEditPart.VISUAL_ID:
case AssociationEditPart.VISUAL_ID:
@@ -494,7 +519,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -511,7 +536,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java
index 52ffdfafc52..ad6059e6042 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java
@@ -1,12 +1,27 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
@@ -50,6 +65,7 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.MetaclassEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ModelEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageImportEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileApplicationEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfilePackageableElementCompartmentEditPartTN;
@@ -76,56 +92,20 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case ProfileApplicationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case ProfileApplicationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyChildNodesCommand(cmd);
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
@@ -152,7 +132,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case ExtensionEditPart.VISUAL_ID:
case AssociationEditPart.VISUAL_ID:
@@ -163,7 +143,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -180,7 +160,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -198,7 +178,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
@@ -206,7 +186,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -221,7 +201,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -239,7 +219,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case ProfileApplicationEditPart.VISUAL_ID:
case DependencyEditPart.VISUAL_ID:
@@ -248,7 +228,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -263,7 +243,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -281,7 +261,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
@@ -289,7 +269,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -304,7 +284,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -322,14 +302,14 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -340,13 +320,13 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -364,7 +344,52 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ }
+ }
+
+ for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
+ Edge outgoingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ case PackageImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
+ break;
+ }
+ }
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ case PrimitiveTypeEditPartCN.VISUAL_ID:
+
+
+ for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case AssociationEditPart.VISUAL_ID:
case AssociationBranchEditPart.VISUAL_ID:
@@ -374,7 +399,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -391,7 +416,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -409,7 +434,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case AssociationEditPart.VISUAL_ID:
case AssociationBranchEditPart.VISUAL_ID:
@@ -419,7 +444,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -436,7 +461,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -454,7 +479,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -465,7 +490,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case CommentAnnotatedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
@@ -483,7 +508,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case ConstraintConstrainedElementEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
case ExtensionEditPart.VISUAL_ID:
case AssociationEditPart.VISUAL_ID:
@@ -494,7 +519,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case ElementImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
break;
}
}
@@ -511,7 +536,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
case PackageImportEditPart.VISUAL_ID:
DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
break;
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java
index 91567f9ec05..852af2ffda4 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
@@ -9,6 +22,7 @@ import org.eclipse.papyrus.diagram.profile.edit.commands.EnumerationCreateComman
import org.eclipse.papyrus.diagram.profile.edit.commands.MetaclassCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.ModelCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.PackageCreateCommandCN;
+import org.eclipse.papyrus.diagram.profile.edit.commands.PrimitiveTypeCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.ProfileCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.StereotypeCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
@@ -48,6 +62,9 @@ public class ProfilePackageableElementCompartmentItemSemanticEditPolicyCN extend
if(UMLElementTypes.Enumeration_3025 == req.getElementType()) {
return getGEFWrapper(new EnumerationCreateCommandCN(req));
}
+ if(UMLElementTypes.PrimitiveType_3026 == req.getElementType()) {
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ }
if(UMLElementTypes.DataType_3027 == req.getElementType()) {
return getGEFWrapper(new DataTypeCreateCommandCN(req));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java
index 42096b00da8..05f412fc261 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
@@ -9,6 +22,7 @@ import org.eclipse.papyrus.diagram.profile.edit.commands.EnumerationCreateComman
import org.eclipse.papyrus.diagram.profile.edit.commands.MetaclassCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.ModelCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.PackageCreateCommandCN;
+import org.eclipse.papyrus.diagram.profile.edit.commands.PrimitiveTypeCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.ProfileCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.edit.commands.StereotypeCreateCommandCN;
import org.eclipse.papyrus.diagram.profile.providers.UMLElementTypes;
@@ -48,6 +62,9 @@ public class ProfilePackageableElementCompartmentItemSemanticEditPolicyTN extend
if(UMLElementTypes.Enumeration_3025 == req.getElementType()) {
return getGEFWrapper(new EnumerationCreateCommandCN(req));
}
+ if(UMLElementTypes.PrimitiveType_3026 == req.getElementType()) {
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ }
if(UMLElementTypes.DataType_3027 == req.getElementType()) {
return getGEFWrapper(new DataTypeCreateCommandCN(req));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java
index 78203ecb845..95e36ccdc10 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java
@@ -1,11 +1,26 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
@@ -30,21 +45,19 @@ public class ShortCutDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEd
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
-
-
+ cmd.setTransactionNestingEnabled(true);
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java
index ae19946dbb1..e06d5fe2880 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java
index 702d1870078..be192e9ef71 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java
index f102bff7544..539a11b1308 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java
@@ -1,21 +1,33 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
@@ -75,60 +87,20 @@ public class StereotypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case ExtensionEditPart.VISUAL_ID:
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyChildNodesCommand(cmd);
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java
index cdbd16dfd8c..2a7d45f99a8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java
@@ -1,21 +1,33 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGMFCommandWrapper;
@@ -75,60 +87,20 @@ public class StereotypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
+ cmd.setTransactionNestingEnabled(true);
-
- for(Iterator<?> it = view.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case ExtensionEditPart.VISUAL_ID:
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for(Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge)it.next();
- switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- case AssociationEditPart.VISUAL_ID:
- case AssociationBranchEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- case ElementImportEditPart.VISUAL_ID:
- case PackageImportEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(outgoingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
- break;
- }
- }
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyChildNodesCommand(cmd);
addDestroyShortcutsCommand(cmd, view);
// delete host element
- ArrayList todestroy = new ArrayList();
+ List<EObject> todestroy = new ArrayList<EObject>();
todestroy.add(req.getElementToDestroy());
//cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
} else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java
index f33ce5dfe10..ba57044f2bd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java
index c445fd8f86b..69fd29a869a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.gef.commands.Command;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java
index f8ba554d189..7674af0f154 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.Iterator;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/UMLTextNonResizableEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/UMLTextNonResizableEditPolicy.java
index f0e57fc0d91..732d38d8a97 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/UMLTextNonResizableEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/UMLTextNonResizableEditPolicy.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import java.util.Collections;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/UMLTextSelectionEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/UMLTextSelectionEditPolicy.java
index 1157ab86729..c762a1a7d7a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/UMLTextSelectionEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/edit/policies/UMLTextSelectionEditPolicy.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.edit.policies;
import org.eclipse.draw2d.ColorConstants;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLAbstractNavigatorItem.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLAbstractNavigatorItem.java
index 8c4e367e301..a8ce851e800 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLAbstractNavigatorItem.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLAbstractNavigatorItem.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.navigator;
import org.eclipse.core.runtime.IAdapterFactory;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLDomainNavigatorContentProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLDomainNavigatorContentProvider.java
index fdb52e5f1ca..4e16821d914 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLDomainNavigatorContentProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLDomainNavigatorContentProvider.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.navigator;
import java.util.ArrayList;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLDomainNavigatorItem.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLDomainNavigatorItem.java
index bbb18ccc504..e238838aa43 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLDomainNavigatorItem.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLDomainNavigatorItem.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.navigator;
import org.eclipse.core.runtime.IAdapterFactory;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLDomainNavigatorLabelProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLDomainNavigatorLabelProvider.java
index daf7b222929..7588f149d41 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLDomainNavigatorLabelProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLDomainNavigatorLabelProvider.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.navigator;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorActionProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorActionProvider.java
index 436307e294e..79516e82b2d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorActionProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorActionProvider.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.navigator;
import org.eclipse.core.runtime.IAdaptable;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorContentProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorContentProvider.java
index 2e83d9b25e7..37380d88d0a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorContentProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorContentProvider.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.navigator;
import java.util.ArrayList;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorGroup.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorGroup.java
index f4b0a17e151..703a545e96c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorGroup.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorGroup.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.navigator;
import java.util.Collection;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorItem.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorItem.java
index 4a0aa2b6459..08fd0c54de9 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorItem.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorItem.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.navigator;
import org.eclipse.core.runtime.IAdapterFactory;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorLabelProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorLabelProvider.java
index 113570e0eab..02796fb22c2 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorLabelProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorLabelProvider.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.navigator;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorLinkHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorLinkHelper.java
index 16220d94dc4..bc15ee1ef7d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorLinkHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorLinkHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.navigator;
import org.eclipse.emf.common.ui.URIEditorInput;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorSorter.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorSorter.java
index 6e3d3619ee3..7a673d88637 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorSorter.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/navigator/UMLNavigatorSorter.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.navigator;
import org.eclipse.jface.viewers.ViewerSorter;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/parsers/AbstractParser.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/parsers/AbstractParser.java
index 5b58d6a8fb5..d4caa5f3878 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/parsers/AbstractParser.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/parsers/AbstractParser.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.parsers;
import java.util.Arrays;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/parsers/MessageFormatParser.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/parsers/MessageFormatParser.java
index 47a12040079..ef17629953b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/parsers/MessageFormatParser.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/parsers/MessageFormatParser.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.parsers;
import java.text.FieldPosition;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/DiagramEditorContextMenuProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/DiagramEditorContextMenuProvider.java
index 319e04e9d8a..8536b63fd3a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/DiagramEditorContextMenuProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/DiagramEditorContextMenuProvider.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import org.eclipse.emf.ecore.EObject;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/LoadResourceAction.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/LoadResourceAction.java
index a0a923664d9..56209d72158 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/LoadResourceAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/LoadResourceAction.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import org.eclipse.core.commands.AbstractHandler;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/Messages.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/Messages.java
index 11586b0f537..78d7a284753 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/Messages.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/Messages.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import org.eclipse.osgi.util.NLS;
@@ -375,6 +388,16 @@ public class Messages extends NLS {
/**
* @generated
*/
+ public static String createPrimitiveType6CreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String createPrimitiveType6CreationTool_desc;
+
+ /**
+ * @generated
+ */
public static String createExtension1CreationTool_title;
/**
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/ModelElementSelectionPage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/ModelElementSelectionPage.java
index 2dcbf71d22a..f706fbe7dcf 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/ModelElementSelectionPage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/ModelElementSelectionPage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import org.eclipse.emf.ecore.EObject;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLCreationWizard.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLCreationWizard.java
index faf33ee91e0..c72bec31f93 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLCreationWizard.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLCreationWizard.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import java.lang.reflect.InvocationTargetException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLCreationWizardPage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLCreationWizardPage.java
index 8ee698b7a98..7e0bf3917ff 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLCreationWizardPage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLCreationWizardPage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import org.eclipse.core.runtime.IPath;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramActionBarContributor.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramActionBarContributor.java
index 4a399622ad2..d85d6725a8f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramActionBarContributor.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramActionBarContributor.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramActionBarContributor;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramContentInitializer.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramContentInitializer.java
index b3717c90fff..615a2eeaf9e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramContentInitializer.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramContentInitializer.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import java.util.Collection;
@@ -51,6 +64,8 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.PackageEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageImportEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileApplicationEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileDiagramEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileEditPartCN;
@@ -206,6 +221,15 @@ public class UMLDiagramContentInitializer {
/**
* @generated
*/
+ private void createPrimitiveType_2009Children(View view) {
+ myDomain2NotationMap.put(view.getElement(), view);
+ myLinkDescriptors.addAll(UMLDiagramUpdater.getPrimitiveType_2009OutgoingLinks(view));
+
+ }
+
+ /**
+ * @generated
+ */
private void createDataType_2010Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
myLinkDescriptors.addAll(UMLDiagramUpdater.getDataType_2010OutgoingLinks(view));
@@ -226,6 +250,15 @@ public class UMLDiagramContentInitializer {
/**
* @generated
*/
+ private void createPrimitiveType_3026Children(View view) {
+ myDomain2NotationMap.put(view.getElement(), view);
+ myLinkDescriptors.addAll(UMLDiagramUpdater.getPrimitiveType_3026OutgoingLinks(view));
+
+ }
+
+ /**
+ * @generated
+ */
private void createOperation_3019Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
myLinkDescriptors.addAll(UMLDiagramUpdater.getOperation_3019OutgoingLinks(view));
@@ -558,12 +591,18 @@ public class UMLDiagramContentInitializer {
case EnumerationEditPart.VISUAL_ID:
createEnumeration_2006Children(node);
return;
+ case PrimitiveTypeEditPart.VISUAL_ID:
+ createPrimitiveType_2009Children(node);
+ return;
case DataTypeEditPart.VISUAL_ID:
createDataType_2010Children(node);
return;
case ShortCutDiagramEditPart.VISUAL_ID:
createDiagram_2016Children(node);
return;
+ case PrimitiveTypeEditPartCN.VISUAL_ID:
+ createPrimitiveType_3026Children(node);
+ return;
case DataTypeOperationEditPart.VISUAL_ID:
createOperation_3019Children(node);
return;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramEditor.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramEditor.java
index 5949b6bf559..913f28efc81 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramEditor.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramEditor.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import java.util.EventObject;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramEditorPlugin.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramEditorPlugin.java
index 718bad07b91..9c1ad39fcdb 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramEditorPlugin.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramEditorPlugin.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import java.util.ArrayList;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramEditorUtil.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramEditorUtil.java
index 3dada58c99d..a1417b8ec5e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramEditorUtil.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramEditorUtil.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import java.io.IOException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramUpdateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramUpdateCommand.java
index 91cc9278740..f28525c2a0e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramUpdateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramUpdateCommand.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import java.util.Iterator;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramUpdater.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramUpdater.java
index 762701fd95b..cffb0b0e11c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramUpdater.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDiagramUpdater.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import java.util.Collection;
@@ -53,6 +66,8 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.PackageEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageImportEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileApplicationEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileDiagramEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileEditPartCN;
@@ -87,6 +102,7 @@ import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.PackageImport;
import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.Profile;
import org.eclipse.uml2.uml.ProfileApplication;
import org.eclipse.uml2.uml.Property;
@@ -190,6 +206,10 @@ public class UMLDiagramUpdater {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == PrimitiveTypeEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
if(visualID == DataTypeEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
@@ -296,6 +316,10 @@ public class UMLDiagramUpdater {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
@@ -351,6 +375,10 @@ public class UMLDiagramUpdater {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
@@ -406,6 +434,10 @@ public class UMLDiagramUpdater {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
@@ -473,6 +505,10 @@ public class UMLDiagramUpdater {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == PrimitiveTypeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
@@ -617,6 +653,14 @@ public class UMLDiagramUpdater {
}
Model modelElement = (Model)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ 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.getPackagedElements().iterator(); it.hasNext();) {
PackageableElement childElement = (PackageableElement)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
@@ -640,15 +684,11 @@ public class UMLDiagramUpdater {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if(visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.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) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -672,6 +712,14 @@ public class UMLDiagramUpdater {
}
Model modelElement = (Model)containerView.getElement();
LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ 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.getPackagedElements().iterator(); it.hasNext();) {
PackageableElement childElement = (PackageableElement)it.next();
int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
@@ -695,15 +743,11 @@ public class UMLDiagramUpdater {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
- if(visualID == DataTypeEditPartCN.VISUAL_ID) {
+ if(visualID == PrimitiveTypeEditPartCN.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) {
+ if(visualID == DataTypeEditPartCN.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
@@ -908,10 +952,14 @@ public class UMLDiagramUpdater {
return getPackage_2007ContainedLinks(view);
case EnumerationEditPart.VISUAL_ID:
return getEnumeration_2006ContainedLinks(view);
+ case PrimitiveTypeEditPart.VISUAL_ID:
+ return getPrimitiveType_2009ContainedLinks(view);
case DataTypeEditPart.VISUAL_ID:
return getDataType_2010ContainedLinks(view);
case ShortCutDiagramEditPart.VISUAL_ID:
return getDiagram_2016ContainedLinks(view);
+ case PrimitiveTypeEditPartCN.VISUAL_ID:
+ return getPrimitiveType_3026ContainedLinks(view);
case DataTypeOperationEditPart.VISUAL_ID:
return getOperation_3019ContainedLinks(view);
case EnumerationLiteralEditPart.VISUAL_ID:
@@ -987,10 +1035,14 @@ public class UMLDiagramUpdater {
return getPackage_2007IncomingLinks(view);
case EnumerationEditPart.VISUAL_ID:
return getEnumeration_2006IncomingLinks(view);
+ case PrimitiveTypeEditPart.VISUAL_ID:
+ return getPrimitiveType_2009IncomingLinks(view);
case DataTypeEditPart.VISUAL_ID:
return getDataType_2010IncomingLinks(view);
case ShortCutDiagramEditPart.VISUAL_ID:
return getDiagram_2016IncomingLinks(view);
+ case PrimitiveTypeEditPartCN.VISUAL_ID:
+ return getPrimitiveType_3026IncomingLinks(view);
case DataTypeOperationEditPart.VISUAL_ID:
return getOperation_3019IncomingLinks(view);
case EnumerationLiteralEditPart.VISUAL_ID:
@@ -1066,10 +1118,14 @@ public class UMLDiagramUpdater {
return getPackage_2007OutgoingLinks(view);
case EnumerationEditPart.VISUAL_ID:
return getEnumeration_2006OutgoingLinks(view);
+ case PrimitiveTypeEditPart.VISUAL_ID:
+ return getPrimitiveType_2009OutgoingLinks(view);
case DataTypeEditPart.VISUAL_ID:
return getDataType_2010OutgoingLinks(view);
case ShortCutDiagramEditPart.VISUAL_ID:
return getDiagram_2016OutgoingLinks(view);
+ case PrimitiveTypeEditPartCN.VISUAL_ID:
+ return getPrimitiveType_3026OutgoingLinks(view);
case DataTypeOperationEditPart.VISUAL_ID:
return getOperation_3019OutgoingLinks(view);
case EnumerationLiteralEditPart.VISUAL_ID:
@@ -1266,6 +1322,18 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
+ public static List<UMLLinkDescriptor> getPrimitiveType_2009ContainedLinks(View view) {
+ PrimitiveType modelElement = (PrimitiveType)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4002(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_ElementImport_1064(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_PackageImport_1065(modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List<UMLLinkDescriptor> getDataType_2010ContainedLinks(View view) {
DataType modelElement = (DataType)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
@@ -1285,6 +1353,18 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
+ public static List<UMLLinkDescriptor> getPrimitiveType_3026ContainedLinks(View view) {
+ PrimitiveType modelElement = (PrimitiveType)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4002(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_ElementImport_1064(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_PackageImport_1065(modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List<UMLLinkDescriptor> getOperation_3019ContainedLinks(View view) {
Operation modelElement = (Operation)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
@@ -1690,6 +1770,24 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
+ public static List<UMLLinkDescriptor> getPrimitiveType_2009IncomingLinks(View view) {
+ PrimitiveType modelElement = (PrimitiveType)view.getElement();
+ Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingTypeModelFacetLinks_Association_4001(modelElement, crossReferences));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_4019(modelElement, crossReferences));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4002(modelElement, crossReferences));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4008(modelElement, crossReferences));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4018(modelElement, crossReferences));
+ result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List<UMLLinkDescriptor> getDataType_2010IncomingLinks(View view) {
DataType modelElement = (DataType)view.getElement();
Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
@@ -1715,6 +1813,24 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
+ public static List<UMLLinkDescriptor> getPrimitiveType_3026IncomingLinks(View view) {
+ PrimitiveType modelElement = (PrimitiveType)view.getElement();
+ Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingTypeModelFacetLinks_Association_4001(modelElement, crossReferences));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_4019(modelElement, crossReferences));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4002(modelElement, crossReferences));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4008(modelElement, crossReferences));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4018(modelElement, crossReferences));
+ result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List<UMLLinkDescriptor> getOperation_3019IncomingLinks(View view) {
return Collections.emptyList();
}
@@ -2171,6 +2287,22 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
+ public static List<UMLLinkDescriptor> getPrimitiveType_2009OutgoingLinks(View view) {
+ PrimitiveType modelElement = (PrimitiveType)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Association_4001(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Association_4019(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4002(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4018(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ElementImport_1064(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_PackageImport_1065(modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List<UMLLinkDescriptor> getDataType_2010OutgoingLinks(View view) {
DataType modelElement = (DataType)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
@@ -2194,6 +2326,22 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
+ public static List<UMLLinkDescriptor> getPrimitiveType_3026OutgoingLinks(View view) {
+ PrimitiveType modelElement = (PrimitiveType)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Association_4001(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Association_4019(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4002(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4018(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ElementImport_1064(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_PackageImport_1065(modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List<UMLLinkDescriptor> getOperation_3019OutgoingLinks(View view) {
return Collections.emptyList();
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDocumentProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDocumentProvider.java
index 857bac02fcf..a853c240b9a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDocumentProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLDocumentProvider.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import java.io.IOException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLInitDiagramFileAction.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLInitDiagramFileAction.java
index 025d25cecc8..651f44ae043 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLInitDiagramFileAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLInitDiagramFileAction.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import org.eclipse.core.resources.IFile;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLLinkDescriptor.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLLinkDescriptor.java
index 23b984c6a18..e83fb08c3f3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLLinkDescriptor.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLLinkDescriptor.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import org.eclipse.core.runtime.IAdaptable;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLMatchingStrategy.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLMatchingStrategy.java
index 1c3c0090a40..2ee7bcdef3b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLMatchingStrategy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLMatchingStrategy.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import org.eclipse.emf.common.ui.URIEditorInput;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLNewDiagramFileWizard.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLNewDiagramFileWizard.java
index c2f2777b630..5e47179a04a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLNewDiagramFileWizard.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLNewDiagramFileWizard.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import java.io.IOException;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLNodeDescriptor.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLNodeDescriptor.java
index 51e51e20580..37930ca7651 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLNodeDescriptor.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLNodeDescriptor.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import org.eclipse.emf.ecore.EObject;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLPaletteFactory.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLPaletteFactory.java
index 69e684d8347..69a2d8e0671 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLPaletteFactory.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLPaletteFactory.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import java.util.ArrayList;
@@ -67,6 +80,11 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
/**
* @generated
*/
+ private final static String CREATEPRIMITIVETYPE6CREATIONTOOL = "createPrimitiveType6CreationTool"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
private final static String CREATEEXTENSION1CREATIONTOOL = "createExtension1CreationTool"; //$NON-NLS-1$
/**
@@ -176,6 +194,9 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
if(toolId.equals(CREATEDATATYPE5CREATIONTOOL)) {
return createDataType5CreationTool();
}
+ if(toolId.equals(CREATEPRIMITIVETYPE6CREATIONTOOL)) {
+ return createPrimitiveType6CreationTool();
+ }
if(toolId.equals(CREATEEXTENSION1CREATIONTOOL)) {
return createExtension1CreationTool();
}
@@ -345,6 +366,20 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
return tool;
}
+
+
+ /**
+ * @generated
+ */
+ private Tool createPrimitiveType6CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
/**
* @generated
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLUriEditorInputTester.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLUriEditorInputTester.java
index e3de04d0eb1..a4cde237d5e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLUriEditorInputTester.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLUriEditorInputTester.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import org.eclipse.core.expressions.PropertyTester;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLVisualIDRegistry.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLVisualIDRegistry.java
index a2c32d330e6..062971c92fe 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/part/UMLVisualIDRegistry.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.part;
import org.eclipse.core.runtime.Platform;
@@ -76,6 +89,10 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.PackageNameEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageNameEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeNameEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeNameEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileApplicationEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileDiagramEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileEditPartCN;
@@ -247,6 +264,11 @@ public class UMLVisualIDRegistry {
) {
return EnumerationEditPart.VISUAL_ID;
}
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())
+
+ ) {
+ return PrimitiveTypeEditPart.VISUAL_ID;
+ }
if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())
) {
@@ -296,6 +318,11 @@ public class UMLVisualIDRegistry {
) {
return EnumerationEditPartCN.VISUAL_ID;
}
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())
+
+ ) {
+ return PrimitiveTypeEditPartCN.VISUAL_ID;
+ }
if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())
) {
@@ -333,6 +360,11 @@ public class UMLVisualIDRegistry {
) {
return EnumerationEditPartCN.VISUAL_ID;
}
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())
+
+ ) {
+ return PrimitiveTypeEditPartCN.VISUAL_ID;
+ }
if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())
) {
@@ -370,6 +402,11 @@ public class UMLVisualIDRegistry {
) {
return EnumerationEditPartCN.VISUAL_ID;
}
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())
+
+ ) {
+ return PrimitiveTypeEditPartCN.VISUAL_ID;
+ }
if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())
) {
@@ -417,6 +454,11 @@ public class UMLVisualIDRegistry {
) {
return EnumerationEditPartCN.VISUAL_ID;
}
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())
+
+ ) {
+ return PrimitiveTypeEditPartCN.VISUAL_ID;
+ }
if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())
) {
@@ -462,6 +504,11 @@ public class UMLVisualIDRegistry {
}
break;
case ModelPackageableElementCompartmentEditPartTN.VISUAL_ID:
+ if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())
+
+ ) {
+ return CommentEditPartCN.VISUAL_ID;
+ }
if(UMLPackage.eINSTANCE.getModel().isSuperTypeOf(domainElement.eClass())
) {
@@ -487,18 +534,23 @@ public class UMLVisualIDRegistry {
) {
return EnumerationEditPartCN.VISUAL_ID;
}
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())
+
+ ) {
+ return PrimitiveTypeEditPartCN.VISUAL_ID;
+ }
if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())
) {
return DataTypeEditPartCN.VISUAL_ID;
}
+ break;
+ case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())
) {
return CommentEditPartCN.VISUAL_ID;
}
- break;
- case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
if(UMLPackage.eINSTANCE.getModel().isSuperTypeOf(domainElement.eClass())
) {
@@ -514,11 +566,6 @@ public class UMLVisualIDRegistry {
) {
return PackageEditPartCN.VISUAL_ID;
}
- if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return CommentEditPartCN.VISUAL_ID;
- }
if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())
) {
@@ -529,6 +576,11 @@ public class UMLVisualIDRegistry {
) {
return EnumerationEditPartCN.VISUAL_ID;
}
+ if(UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElement.eClass())
+
+ ) {
+ return PrimitiveTypeEditPartCN.VISUAL_ID;
+ }
if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())
) {
@@ -631,6 +683,9 @@ public class UMLVisualIDRegistry {
if(EnumerationEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(PrimitiveTypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if(DataTypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -704,6 +759,11 @@ public class UMLVisualIDRegistry {
return true;
}
break;
+ case PrimitiveTypeEditPart.VISUAL_ID:
+ if(PrimitiveTypeNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
case DataTypeEditPart.VISUAL_ID:
if(DataTypeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
@@ -720,6 +780,11 @@ public class UMLVisualIDRegistry {
return true;
}
break;
+ case PrimitiveTypeEditPartCN.VISUAL_ID:
+ if(PrimitiveTypeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
case StereotypeEditPartCN.VISUAL_ID:
if(StereotypeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
@@ -814,6 +879,9 @@ public class UMLVisualIDRegistry {
if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -837,6 +905,9 @@ public class UMLVisualIDRegistry {
if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -860,6 +931,9 @@ public class UMLVisualIDRegistry {
if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -889,6 +963,9 @@ public class UMLVisualIDRegistry {
if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -920,6 +997,9 @@ public class UMLVisualIDRegistry {
}
break;
case ModelPackageableElementCompartmentEditPartTN.VISUAL_ID:
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if(ModelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -935,14 +1015,17 @@ public class UMLVisualIDRegistry {
if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
break;
case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
+ if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if(ModelEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -952,15 +1035,15 @@ public class UMLVisualIDRegistry {
if(PackageEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
- if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
if(ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
if(EnumerationEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(PrimitiveTypeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -1186,6 +1269,9 @@ public class UMLVisualIDRegistry {
viewInfo = new BaseViewInfo(2006, ViewInfo.Node, "Enumeration");
root.addNode(1000, viewInfo);
+ viewInfo = new BaseViewInfo(2009, ViewInfo.Node, "PrimitiveType");
+ root.addNode(1000, viewInfo);
+
viewInfo = new BaseViewInfo(2010, ViewInfo.Node, "DataType");
root.addNode(1000, viewInfo);
@@ -1280,6 +1366,21 @@ public class UMLVisualIDRegistry {
root.addNode(1000, viewInfo);
+ viewInfo = new BaseViewInfo(3026, ViewInfo.Node, "PrimitiveType");
+
+ root.addNode(1005, viewInfo);
+
+ root.addNode(11, viewInfo);
+
+ root.addNode(1051, viewInfo);
+
+ root.addNode(1057, viewInfo);
+
+ root.addNode(1058, viewInfo);
+
+ root.addNode(1042, viewInfo);
+
+
viewInfo = new BaseViewInfo(3019, ViewInfo.Node, "Operation");
root.addNode(1070, viewInfo);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/AssociationPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/AssociationPreferencePage.java
index 15fa25abf37..8b14a2efcaf 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/AssociationPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/AssociationPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ClassOperationPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ClassOperationPreferencePage.java
index 5b48bad0f4f..88503b84d31 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ClassOperationPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ClassOperationPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ClassPropertyPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ClassPropertyPreferencePage.java
index 36137b5138e..61420e735d6 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ClassPropertyPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ClassPropertyPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/CommentCNPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/CommentCNPreferencePage.java
index 00c9dffecbb..a09a3756f8d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/CommentCNPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/CommentCNPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/CommentPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/CommentPreferencePage.java
index 596bf98fa99..a5499a4e66f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/CommentPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/CommentPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ConstraintCNPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ConstraintCNPreferencePage.java
index 7280e99f9be..a85350ed9fd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ConstraintCNPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ConstraintCNPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ConstraintPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ConstraintPreferencePage.java
index e7554e4d03c..e573d6434a3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ConstraintPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ConstraintPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DataTypeOperationPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DataTypeOperationPreferencePage.java
index 4d7195f6957..a589f3df55e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DataTypeOperationPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DataTypeOperationPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DataTypePreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DataTypePreferencePage.java
index ed467a498ac..b6362a47ec2 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DataTypePreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DataTypePreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DataTypePropertyPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DataTypePropertyPreferencePage.java
index 1ad4a1fd21a..90ed04b8ea1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DataTypePropertyPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DataTypePropertyPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DependencyPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DependencyPreferencePage.java
index 6f2418ddc79..1746febe332 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DependencyPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DependencyPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramAppearancePreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramAppearancePreferencePage.java
index afa71d00939..c0b27076ede 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramAppearancePreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramAppearancePreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.gmf.runtime.diagram.ui.preferences.AppearancePreferencePage;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramConnectionsPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramConnectionsPreferencePage.java
index db053fe199d..92928fd9799 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramConnectionsPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramConnectionsPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.gmf.runtime.diagram.ui.preferences.ConnectionsPreferencePage;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramGeneralPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramGeneralPreferencePage.java
index d7c51ccb42b..263790d3b58 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramGeneralPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramGeneralPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileDiagramEditPart;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramPreferenceInitializer.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramPreferenceInitializer.java
index a2fdfbac3f2..67726f591ee 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramPreferenceInitializer.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramPreferenceInitializer.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
@@ -51,6 +64,9 @@ public class DiagramPreferenceInitializer extends AbstractPreferenceInitializer
EnumerationCNPreferencePage.initDefaults(store);
+ PrimitiveTypePreferencePage.initDefaults(store);
+
+
PackagePreferencePage.initDefaults(store);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramPrintingPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramPrintingPreferencePage.java
index 1ffc4809c88..751406b42db 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramPrintingPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramPrintingPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.gmf.runtime.diagram.ui.preferences.PrintingPreferencePage;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramRulersAndGridPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramRulersAndGridPreferencePage.java
index aa98437ec6f..f4f33fe4b1c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramRulersAndGridPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/DiagramRulersAndGridPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.gmf.runtime.diagram.ui.preferences.RulerGridPreferencePage;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ElementImportPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ElementImportPreferencePage.java
index fe2244285c6..0404e31aedd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ElementImportPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ElementImportPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/EnumerationCNPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/EnumerationCNPreferencePage.java
index a765e715cf6..84e02d68eef 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/EnumerationCNPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/EnumerationCNPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/EnumerationLiteralPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/EnumerationLiteralPreferencePage.java
index f08313605e8..018b373cccd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/EnumerationLiteralPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/EnumerationLiteralPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/EnumerationPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/EnumerationPreferencePage.java
index 555a623940e..2386e217c70 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/EnumerationPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/EnumerationPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ExtensionPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ExtensionPreferencePage.java
index 619029ecc80..2183579db35 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ExtensionPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ExtensionPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/GeneralizationPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/GeneralizationPreferencePage.java
index 08a4093c58b..bce6b3cdf8b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/GeneralizationPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/GeneralizationPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/MetaclassPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/MetaclassPreferencePage.java
index 6d35db219e6..633ea3e67bf 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/MetaclassPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/MetaclassPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ModelPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ModelPreferencePage.java
index 65d35ed34a5..e973152ba39 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ModelPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ModelPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PackageCNPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PackageCNPreferencePage.java
index d2da3536d58..3134cc72cb5 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PackageCNPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PackageCNPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PackageImportPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PackageImportPreferencePage.java
index 03e7fb5f9a5..05b3c3344d7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PackageImportPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PackageImportPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PackagePreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PackagePreferencePage.java
index 8927fe85ed0..e3368d15437 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PackagePreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PackagePreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PrimitiveTypePreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PrimitiveTypePreferencePage.java
new file mode 100644
index 00000000000..7f4836ec0a2
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/PrimitiveTypePreferencePage.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileDiagramEditPart;
+import org.eclipse.papyrus.diagram.profile.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.preferences.pages.AbstractPapyrusNodePreferencePage;
+import org.eclipse.papyrus.preferences.utils.PreferenceConstantHelper;
+
+/**
+ * @generated
+ */
+public class PrimitiveTypePreferencePage extends AbstractPapyrusNodePreferencePage {
+
+ /**
+ * @generated
+ */
+ public PrimitiveTypePreferencePage() {
+ super();
+ setPreferenceKey(ProfileDiagramEditPart.MODEL_ID + "_PrimitiveType");
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected String getBundleId() {
+ return UMLDiagramEditorPlugin.getInstance().ID;
+ }
+
+ /**
+ * @generated
+ */
+ public static void initDefaults(IPreferenceStore store) {
+
+ String key = ProfileDiagramEditPart.MODEL_ID + "_PrimitiveType";
+ store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 100);
+ store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 50);
+
+ //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
+ //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
+
+ // Set the default for the gradient
+ //store.setDefault(org.eclipse.papyrus.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
+ //org.eclipse.papyrus.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.preferences.utils.GradientPreferenceConverter(
+ // new org.eclipse.swt.graphics.RGB(255, 255, 255),
+ // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
+ //store.setDefault(org.eclipse.papyrus.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
+
+ }
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ProfileApplicationPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ProfileApplicationPreferencePage.java
index 6a5e60e5fc3..ab644a86fa8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ProfileApplicationPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ProfileApplicationPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ProfileCNPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ProfileCNPreferencePage.java
index 7342724e59c..be763b53b24 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ProfileCNPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ProfileCNPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ProfilePreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ProfilePreferencePage.java
index fd64a77583f..8e65ecb6c2c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ProfilePreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ProfilePreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ShortCutDiagramPreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ShortCutDiagramPreferencePage.java
index fc26eec48c5..a3bdfa90160 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ShortCutDiagramPreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/ShortCutDiagramPreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/StereotypePreferencePage.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/StereotypePreferencePage.java
index 0c8506eab0c..78423eac46e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/StereotypePreferencePage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/preferences/StereotypePreferencePage.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/ElementInitializers.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/ElementInitializers.java
index e372fb2f314..2aed589130f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/ElementInitializers.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/ElementInitializers.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.providers;
import org.eclipse.papyrus.diagram.common.helper.NamedElementHelper;
@@ -15,6 +28,7 @@ import org.eclipse.uml2.uml.LiteralString;
import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.Profile;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Stereotype;
@@ -131,6 +145,18 @@ public class ElementInitializers {
/**
* @generated
*/
+ public void init_PrimitiveType_2009(PrimitiveType instance) {
+ try {
+ Object value_0 = name_PrimitiveType_2009(instance);
+ instance.setName((String)value_0);
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
public void init_DataType_2010(DataType instance) {
try {
Object value_0 = name_DataType_2010(instance);
@@ -143,6 +169,18 @@ public class ElementInitializers {
/**
* @generated
*/
+ public void init_PrimitiveType_3026(PrimitiveType instance) {
+ try {
+ Object value_0 = name_PrimitiveType_3026(instance);
+ instance.setName((String)value_0);
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
public void init_Operation_3019(Operation instance) {
try {
Object value_0 = name_Operation_3019(instance);
@@ -427,6 +465,13 @@ public class ElementInitializers {
/**
* @generated
*/
+ private String name_PrimitiveType_2009(PrimitiveType self) {
+ return NamedElementHelper.EINSTANCE.getNewUMLElementName(self.getOwner(), self.eClass());
+ }
+
+ /**
+ * @generated
+ */
private String name_DataType_2010(DataType self) {
return NamedElementHelper.EINSTANCE.getNewUMLElementName(self.getOwner(), self.eClass());
}
@@ -434,6 +479,13 @@ public class ElementInitializers {
/**
* @generated
*/
+ private String name_PrimitiveType_3026(PrimitiveType self) {
+ return NamedElementHelper.EINSTANCE.getNewUMLElementName(self.getOwner(), self.eClass());
+ }
+
+ /**
+ * @generated
+ */
private String name_Operation_3019(Operation self) {
return NamedElementHelper.EINSTANCE.getNewUMLElementName(self.getOwner(), self.eClass());
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLEditPartProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLEditPartProvider.java
index c0f29d1982f..fc56e2d470a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLEditPartProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLEditPartProvider.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.providers;
import java.lang.ref.WeakReference;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLElementTypes.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLElementTypes.java
index 1f06df1281c..e9a9fcf54f1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLElementTypes.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLElementTypes.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.providers;
import java.util.HashSet;
@@ -46,6 +59,8 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.ModelEditPartTN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageImportEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileApplicationEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileDiagramEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileEditPartCN;
@@ -141,6 +156,11 @@ public class UMLElementTypes {
/**
* @generated
*/
+ public static final IElementType PrimitiveType_2009 = getElementType("org.eclipse.papyrus.diagram.profile.PrimitiveType_2009"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
public static final IElementType DataType_2010 = getElementType("org.eclipse.papyrus.diagram.profile.DataType_2010"); //$NON-NLS-1$
/**
@@ -151,6 +171,11 @@ public class UMLElementTypes {
/**
* @generated
*/
+ public static final IElementType PrimitiveType_3026 = getElementType("org.eclipse.papyrus.diagram.profile.PrimitiveType_3026"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
public static final IElementType Operation_3019 = getElementType("org.eclipse.papyrus.diagram.profile.DataTypeOperation_3019"); //$NON-NLS-1$
/**
@@ -412,12 +437,18 @@ public class UMLElementTypes {
elements.put(Enumeration_2006, UMLPackage.eINSTANCE.getEnumeration());
+ elements.put(PrimitiveType_2009, UMLPackage.eINSTANCE.getPrimitiveType());
+
+
elements.put(DataType_2010, UMLPackage.eINSTANCE.getDataType());
elements.put(Diagram_2016, NotationPackage.eINSTANCE.getDiagram());
+ elements.put(PrimitiveType_3026, UMLPackage.eINSTANCE.getPrimitiveType());
+
+
elements.put(Operation_3019, UMLPackage.eINSTANCE.getOperation());
@@ -517,8 +548,10 @@ public class UMLElementTypes {
KNOWN_ELEMENT_TYPES.add(Profile_1030);
KNOWN_ELEMENT_TYPES.add(Package_2007);
KNOWN_ELEMENT_TYPES.add(Enumeration_2006);
+ KNOWN_ELEMENT_TYPES.add(PrimitiveType_2009);
KNOWN_ELEMENT_TYPES.add(DataType_2010);
KNOWN_ELEMENT_TYPES.add(Diagram_2016);
+ KNOWN_ELEMENT_TYPES.add(PrimitiveType_3026);
KNOWN_ELEMENT_TYPES.add(Operation_3019);
KNOWN_ELEMENT_TYPES.add(EnumerationLiteral_1037);
KNOWN_ELEMENT_TYPES.add(Property_3018);
@@ -575,10 +608,14 @@ public class UMLElementTypes {
return Package_2007;
case EnumerationEditPart.VISUAL_ID:
return Enumeration_2006;
+ case PrimitiveTypeEditPart.VISUAL_ID:
+ return PrimitiveType_2009;
case DataTypeEditPart.VISUAL_ID:
return DataType_2010;
case ShortCutDiagramEditPart.VISUAL_ID:
return Diagram_2016;
+ case PrimitiveTypeEditPartCN.VISUAL_ID:
+ return PrimitiveType_3026;
case DataTypeOperationEditPart.VISUAL_ID:
return Operation_3019;
case EnumerationLiteralEditPart.VISUAL_ID:
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLIconProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLIconProvider.java
index c88816b799e..9363b09ae7b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLIconProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLIconProvider.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.providers;
import org.eclipse.core.runtime.IAdaptable;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLModelingAssistantProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLModelingAssistantProvider.java
index 9921d9fad82..15110b70ce9 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLModelingAssistantProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLModelingAssistantProvider.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.providers;
import java.util.ArrayList;
@@ -37,6 +50,8 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.PackageEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileDiagramEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileEditPartTN;
@@ -61,7 +76,7 @@ public class UMLModelingAssistantProvider extends ModelingAssistantProvider {
public List getTypesForPopupBar(IAdaptable host) {
IGraphicalEditPart editPart = (IGraphicalEditPart)host.getAdapter(IGraphicalEditPart.class);
if(editPart instanceof ProfileDiagramEditPart) {
- ArrayList<IElementType> types = new ArrayList<IElementType>(12);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(13);
types.add(UMLElementTypes.Dependency_2014);
types.add(UMLElementTypes.Association_2015);
types.add(UMLElementTypes.Stereotype_1026);
@@ -72,6 +87,7 @@ public class UMLModelingAssistantProvider extends ModelingAssistantProvider {
types.add(UMLElementTypes.Profile_1030);
types.add(UMLElementTypes.Package_2007);
types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.DataType_2010);
types.add(UMLElementTypes.Diagram_2016);
return types;
@@ -116,72 +132,78 @@ public class UMLModelingAssistantProvider extends ModelingAssistantProvider {
return types;
}
if(editPart instanceof PackagePackageableElementCompartmentEditPart) {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(8);
types.add(UMLElementTypes.Comment_1007);
types.add(UMLElementTypes.Model_1027);
types.add(UMLElementTypes.Profile_1024);
types.add(UMLElementTypes.Package_1012);
types.add(UMLElementTypes.Constraint_1028);
types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.DataType_3027);
return types;
}
if(editPart instanceof PackagePackageableElementCompartmentEditPartCN) {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(8);
types.add(UMLElementTypes.Comment_1007);
types.add(UMLElementTypes.Model_1027);
types.add(UMLElementTypes.Profile_1024);
types.add(UMLElementTypes.Package_1012);
types.add(UMLElementTypes.Constraint_1028);
types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.DataType_3027);
return types;
}
if(editPart instanceof ProfilePackageableElementCompartmentEditPartTN) {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(10);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Model_1027);
types.add(UMLElementTypes.Profile_1024);
types.add(UMLElementTypes.Package_1012);
types.add(UMLElementTypes.Constraint_1028);
types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.DataType_3027);
types.add(UMLElementTypes.Comment_1007);
types.add(UMLElementTypes.Class_3028);
return types;
}
if(editPart instanceof ProfilePackageableElementCompartmentEditPartCN) {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(10);
types.add(UMLElementTypes.Stereotype_1023);
types.add(UMLElementTypes.Model_1027);
types.add(UMLElementTypes.Profile_1024);
types.add(UMLElementTypes.Package_1012);
types.add(UMLElementTypes.Constraint_1028);
types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.DataType_3027);
types.add(UMLElementTypes.Comment_1007);
types.add(UMLElementTypes.Class_3028);
return types;
}
if(editPart instanceof ModelPackageableElementCompartmentEditPartTN) {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(8);
+ types.add(UMLElementTypes.Comment_1007);
types.add(UMLElementTypes.Model_1027);
types.add(UMLElementTypes.Profile_1024);
types.add(UMLElementTypes.Package_1012);
types.add(UMLElementTypes.Constraint_1028);
types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.DataType_3027);
- types.add(UMLElementTypes.Comment_1007);
return types;
}
if(editPart instanceof ModelPackageableElementCompartmentEditPartCN) {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(8);
+ types.add(UMLElementTypes.Comment_1007);
types.add(UMLElementTypes.Model_1027);
types.add(UMLElementTypes.Profile_1024);
types.add(UMLElementTypes.Package_1012);
- types.add(UMLElementTypes.Comment_1007);
types.add(UMLElementTypes.Constraint_1028);
types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.PrimitiveType_3026);
types.add(UMLElementTypes.DataType_3027);
return types;
}
@@ -223,9 +245,15 @@ public class UMLModelingAssistantProvider extends ModelingAssistantProvider {
if(sourceEditPart instanceof EnumerationEditPart) {
return ((EnumerationEditPart)sourceEditPart).getMARelTypesOnSource();
}
+ if(sourceEditPart instanceof PrimitiveTypeEditPart) {
+ return ((PrimitiveTypeEditPart)sourceEditPart).getMARelTypesOnSource();
+ }
if(sourceEditPart instanceof DataTypeEditPart) {
return ((DataTypeEditPart)sourceEditPart).getMARelTypesOnSource();
}
+ if(sourceEditPart instanceof PrimitiveTypeEditPartCN) {
+ return ((PrimitiveTypeEditPartCN)sourceEditPart).getMARelTypesOnSource();
+ }
if(sourceEditPart instanceof StereotypeEditPartCN) {
return ((StereotypeEditPartCN)sourceEditPart).getMARelTypesOnSource();
}
@@ -291,9 +319,15 @@ public class UMLModelingAssistantProvider extends ModelingAssistantProvider {
if(targetEditPart instanceof EnumerationEditPart) {
return ((EnumerationEditPart)targetEditPart).getMARelTypesOnTarget();
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ return ((PrimitiveTypeEditPart)targetEditPart).getMARelTypesOnTarget();
+ }
if(targetEditPart instanceof DataTypeEditPart) {
return ((DataTypeEditPart)targetEditPart).getMARelTypesOnTarget();
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ return ((PrimitiveTypeEditPartCN)targetEditPart).getMARelTypesOnTarget();
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
return ((StereotypeEditPartCN)targetEditPart).getMARelTypesOnTarget();
}
@@ -360,9 +394,15 @@ public class UMLModelingAssistantProvider extends ModelingAssistantProvider {
if(sourceEditPart instanceof EnumerationEditPart) {
return ((EnumerationEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
}
+ if(sourceEditPart instanceof PrimitiveTypeEditPart) {
+ return ((PrimitiveTypeEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
+ }
if(sourceEditPart instanceof DataTypeEditPart) {
return ((DataTypeEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
}
+ if(sourceEditPart instanceof PrimitiveTypeEditPartCN) {
+ return ((PrimitiveTypeEditPartCN)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
+ }
if(sourceEditPart instanceof StereotypeEditPartCN) {
return ((StereotypeEditPartCN)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
}
@@ -428,9 +468,15 @@ public class UMLModelingAssistantProvider extends ModelingAssistantProvider {
if(targetEditPart instanceof EnumerationEditPart) {
return ((EnumerationEditPart)targetEditPart).getMATypesForSource(relationshipType);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ return ((PrimitiveTypeEditPart)targetEditPart).getMATypesForSource(relationshipType);
+ }
if(targetEditPart instanceof DataTypeEditPart) {
return ((DataTypeEditPart)targetEditPart).getMATypesForSource(relationshipType);
}
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ return ((PrimitiveTypeEditPartCN)targetEditPart).getMATypesForSource(relationshipType);
+ }
if(targetEditPart instanceof StereotypeEditPartCN) {
return ((StereotypeEditPartCN)targetEditPart).getMATypesForSource(relationshipType);
}
@@ -496,9 +542,15 @@ public class UMLModelingAssistantProvider extends ModelingAssistantProvider {
if(sourceEditPart instanceof EnumerationEditPart) {
return ((EnumerationEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
}
+ if(sourceEditPart instanceof PrimitiveTypeEditPart) {
+ return ((PrimitiveTypeEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
+ }
if(sourceEditPart instanceof DataTypeEditPart) {
return ((DataTypeEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
}
+ if(sourceEditPart instanceof PrimitiveTypeEditPartCN) {
+ return ((PrimitiveTypeEditPartCN)sourceEditPart).getMATypesForTarget(relationshipType);
+ }
if(sourceEditPart instanceof StereotypeEditPartCN) {
return ((StereotypeEditPartCN)sourceEditPart).getMATypesForTarget(relationshipType);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLParserProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLParserProvider.java
index 846bb62f8fc..cea223adf20 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLParserProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLParserProvider.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.providers;
import org.eclipse.emf.ecore.EAttribute;
@@ -184,6 +197,23 @@ public class UMLParserProvider {
/**
* @generated
*/
+ private IParser primitiveTypeName_5032Parser;
+
+ /**
+ * @generated
+ */
+ public IParser getPrimitiveTypeName_5032Parser() {
+ if(primitiveTypeName_5032Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ primitiveTypeName_5032Parser = parser;
+ }
+ return primitiveTypeName_5032Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser dataTypeName_5035Parser;
/**
@@ -219,6 +249,23 @@ public class UMLParserProvider {
/**
* @generated
*/
+ private IParser primitiveTypeName_5058Parser;
+
+ /**
+ * @generated
+ */
+ public IParser getPrimitiveTypeName_5058Parser() {
+ if(primitiveTypeName_5058Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ primitiveTypeName_5058Parser = parser;
+ }
+ return primitiveTypeName_5058Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser operation_3019Parser;
/**
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLViewProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLViewProvider.java
index ace42a7a4c4..7bbe77a8021 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLViewProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/providers/UMLViewProvider.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.providers;
import java.util.ArrayList;
@@ -110,6 +123,10 @@ import org.eclipse.papyrus.diagram.profile.edit.parts.PackageNameEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackageNameEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeEditPartCN;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeNameEditPart;
+import org.eclipse.papyrus.diagram.profile.edit.parts.PrimitiveTypeNameEditPartCN;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileApplicationEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileDiagramEditPart;
import org.eclipse.papyrus.diagram.profile.edit.parts.ProfileEditPartCN;
@@ -223,6 +240,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
case EnumerationEditPart.VISUAL_ID:
case DataTypeEditPart.VISUAL_ID:
case ShortCutDiagramEditPart.VISUAL_ID:
+ case PrimitiveTypeEditPartCN.VISUAL_ID:
case DataTypeOperationEditPart.VISUAL_ID:
case EnumerationLiteralEditPart.VISUAL_ID:
case DataTypePropertyEditPart.VISUAL_ID:
@@ -234,6 +252,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
case PackageEditPartCN.VISUAL_ID:
case ConstraintEditPartCN.VISUAL_ID:
case MetaclassEditPart.VISUAL_ID:
+ case PrimitiveTypeEditPart.VISUAL_ID:
case ModelEditPartCN.VISUAL_ID:
case ProfileEditPartCN.VISUAL_ID:
case EnumerationEditPartCN.VISUAL_ID:
@@ -247,7 +266,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
}
}
}
- return DependencyNodeEditPart.VISUAL_ID == visualID || AssociationNodeEditPart.VISUAL_ID == visualID || StereotypeEditPart.VISUAL_ID == visualID || MetaclassEditPart.VISUAL_ID == visualID || CommentEditPart.VISUAL_ID == visualID || ConstraintEditPart.VISUAL_ID == visualID || ModelEditPartTN.VISUAL_ID == visualID || ProfileEditPartTN.VISUAL_ID == visualID || PackageEditPart.VISUAL_ID == visualID || EnumerationEditPart.VISUAL_ID == visualID || DataTypeEditPart.VISUAL_ID == visualID || ShortCutDiagramEditPart.VISUAL_ID == visualID || DataTypeOperationEditPart.VISUAL_ID == visualID || EnumerationLiteralEditPart.VISUAL_ID == visualID || DataTypePropertyEditPart.VISUAL_ID == visualID || ClassPropertyEditPart.VISUAL_ID == visualID || ClassOperationEditPart.VISUAL_ID == visualID || StereotypeEditPartCN.VISUAL_ID == visualID || MetaclassEditPartCN.VISUAL_ID == visualID || CommentEditPartCN.VISUAL_ID == visualID || ModelEditPartCN.VISUAL_ID == visualID || ProfileEditPartCN.VISUAL_ID == visualID || PackageEditPartCN.VISUAL_ID == visualID || ConstraintEditPartCN.VISUAL_ID == visualID || EnumerationEditPartCN.VISUAL_ID == visualID || DataTypeEditPartCN.VISUAL_ID == visualID;
+ return DependencyNodeEditPart.VISUAL_ID == visualID || AssociationNodeEditPart.VISUAL_ID == visualID || StereotypeEditPart.VISUAL_ID == visualID || MetaclassEditPart.VISUAL_ID == visualID || CommentEditPart.VISUAL_ID == visualID || ConstraintEditPart.VISUAL_ID == visualID || ModelEditPartTN.VISUAL_ID == visualID || ProfileEditPartTN.VISUAL_ID == visualID || PackageEditPart.VISUAL_ID == visualID || EnumerationEditPart.VISUAL_ID == visualID || PrimitiveTypeEditPart.VISUAL_ID == visualID || DataTypeEditPart.VISUAL_ID == visualID || ShortCutDiagramEditPart.VISUAL_ID == visualID || PrimitiveTypeEditPartCN.VISUAL_ID == visualID || DataTypeOperationEditPart.VISUAL_ID == visualID || EnumerationLiteralEditPart.VISUAL_ID == visualID || DataTypePropertyEditPart.VISUAL_ID == visualID || ClassPropertyEditPart.VISUAL_ID == visualID || ClassOperationEditPart.VISUAL_ID == visualID || StereotypeEditPartCN.VISUAL_ID == visualID || MetaclassEditPartCN.VISUAL_ID == visualID || CommentEditPartCN.VISUAL_ID == visualID || ModelEditPartCN.VISUAL_ID == visualID || ProfileEditPartCN.VISUAL_ID == visualID || PackageEditPartCN.VISUAL_ID == visualID || ConstraintEditPartCN.VISUAL_ID == visualID || EnumerationEditPartCN.VISUAL_ID == visualID || DataTypeEditPartCN.VISUAL_ID == visualID;
}
/**
@@ -314,10 +333,14 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
return createPackage_2007(domainElement, containerView, index, persisted, preferencesHint);
case EnumerationEditPart.VISUAL_ID:
return createEnumeration_2006(domainElement, containerView, index, persisted, preferencesHint);
+ case PrimitiveTypeEditPart.VISUAL_ID:
+ return createPrimitiveType_2009(domainElement, containerView, index, persisted, preferencesHint);
case DataTypeEditPart.VISUAL_ID:
return createDataType_2010(domainElement, containerView, index, persisted, preferencesHint);
case ShortCutDiagramEditPart.VISUAL_ID:
return createDiagram_2016(domainElement, containerView, index, persisted, preferencesHint);
+ case PrimitiveTypeEditPartCN.VISUAL_ID:
+ return createPrimitiveType_3026(domainElement, containerView, index, persisted, preferencesHint);
case DataTypeOperationEditPart.VISUAL_ID:
return createOperation_3019(domainElement, containerView, index, persisted, preferencesHint);
case EnumerationLiteralEditPart.VISUAL_ID:
@@ -657,6 +680,33 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
+ public Node createPrimitiveType_2009(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(PrimitiveTypeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ stampShortcut(containerView, node);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
+
+
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "PrimitiveType");
+
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "PrimitiveType");
+
+
+
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "PrimitiveType");
+
+ Node label5032 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPart.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
public Node createDataType_2010(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
@@ -718,6 +768,32 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
+ public Node createPrimitiveType_3026(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(PrimitiveTypeEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
+
+
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "PrimitiveType");
+
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "PrimitiveType");
+
+
+
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "PrimitiveType");
+
+ Node label5058 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPartCN.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
public Node createOperation_3019(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
Node node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/sheet/UMLPropertySection.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/sheet/UMLPropertySection.java
index 85f1c8499fd..1db8556ec6c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/sheet/UMLPropertySection.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/sheet/UMLPropertySection.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.sheet;
import java.util.ArrayList;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/sheet/UMLSheetLabelProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/sheet/UMLSheetLabelProvider.java
index 2e44d062e83..7a5ebafa302 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/sheet/UMLSheetLabelProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.profile/src/org/eclipse/papyrus/diagram/profile/sheet/UMLSheetLabelProvider.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.diagram.profile.sheet;
import org.eclipse.core.runtime.IAdaptable;

Back to the top