Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationBranchCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationNodeCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassCreateCommand.java110
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassCreateCommandCN.java110
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassOperationCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementReorientCommand.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentCreateCommandCN.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentEditPartCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementReorientCommand.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommandCN.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkReorientCommand.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommandCN.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyBranchCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyNodeCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ElementImportCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommandCN.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ExtensionCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/GeneralizationCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommandCN.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandCN.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandTN.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommandCN.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageImportCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileApplicationCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandCN.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandTN.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommandCN.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/ClassEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/UMLBaseEditHelper.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AppliedStereotypeElementImportEditPart.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationAppliedStereotypeEditPart.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchEditPart.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchMultiplicityEditPart.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchRoleEditPart.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationEditPart.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicitySourceEditPart.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicityTargetEditPart.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNameEditPart.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNodeEditPart.java147
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleSourceEditPart.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleTargetEditPart.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassAttributeCompartmentEditPart.java128
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassAttributeCompartmentEditPartCN.java128
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPart.java301
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPartCN.java298
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassNameEditPart.java803
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassNameEditPartCN.java786
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationCompartmentEditPart.java128
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationCompartmentEditPartCN.java128
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationEditPart.java46
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassPropertyEditPart.java46
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentAnnotatedElementEditPart.java35
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPart.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPartCN.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPart.java32
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPartCN.java32
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPart.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPartCN.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintConstrainedElementEditPart.java35
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPart.java32
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPartCN.java32
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPart.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPartCN.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ContextLinkEditPart.java35
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPartCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPart.java35
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPartCN.java35
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPart.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPartCN.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPartCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationEditPart.java46
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypePropertyEditPart.java46
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyAppliedStereotypeEditPart.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyBranchEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyEditPart.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNameEditPart.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNodeEditPart.java85
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DiagramNameEditPart.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportAliasEditPart.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportEditPart.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPart.java34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPartCN.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationLiteralEditPart.java46
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPart.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPartCN.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ExtensionEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationAppliedStereotypeEditPart.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationEditPart.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPart.java32
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPartCN.java32
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPart.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPartCN.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartCN.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartTN.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPart.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPartCN.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartCN.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartTN.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MultiDependencyLabelEditPart.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPart.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPartCN.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportAppliedStereotypeEditPart.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportEditPart.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPart.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPartCN.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPart.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPartCN.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPart.java32
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java32
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPart.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPartCN.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileApplicationEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileDiagramEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartCN.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartTN.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartCN.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartTN.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartCN.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartTN.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ShortCutDiagramEditPart.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPartCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPart.java35
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPartCN.java34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPart.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPartCN.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPartCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/UMLEditPartFactory.java126
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicy.java46
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicyCN.java46
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassItemSemanticEditPolicyCN.java373
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationCompartmentItemSemanticEditPolicy.java46
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationCompartmentItemSemanticEditPolicyCN.java46
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationItemSemanticEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassPropertyItemSemanticEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClasseItemSemanticEditPolicy.java373
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentEditPartItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ContextLinkItemSemanticEditPolicy.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java15
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java15
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationItemSemanticEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypePropertyItemSemanticEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyBranchItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyNodeItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ElementImportItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationLiteralItemSemanticEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/GeneralizationItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java83
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java83
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java69
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java69
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageImportItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java88
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java113
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java75
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java75
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileApplicationItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java98
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java94
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java94
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java81
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java81
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java15
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java15
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextNonResizableEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextSelectionEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLAbstractNavigatorItem.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorContentProvider.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorItem.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorLabelProvider.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorActionProvider.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorContentProvider.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorGroup.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorItem.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLabelProvider.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLinkHelper.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorSorter.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/parsers/MessageFormatParser.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/DiagramEditorContextMenuProvider.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/LoadResourceAction.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/Messages.java60
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ModelElementSelectionPage.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLCreationWizard.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramActionBarContributor.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramContentInitializer.java73
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditor.java39
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorPlugin.java32
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorUtil.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdateCommand.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdater.java295
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDocumentProvider.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLLinkDescriptor.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLMatchingStrategy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNewDiagramFileWizard.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNodeDescriptor.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLPaletteFactory.java80
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLUriEditorInputTester.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLVisualIDRegistry.java237
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ValidateAction.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/preferences/DiagramPreferenceInitializer.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/ElementInitializers.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLEditPartProvider.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLElementTypes.java99
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLIconProvider.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLParserProvider.java41
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationDecoratorProvider.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationProvider.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLViewProvider.java126
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLPropertySection.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLSheetLabelProvider.java1
261 files changed, 5060 insertions, 4083 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationBranchCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationBranchCreateCommand.java
index 0a61cc5c967..63522499bd9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationBranchCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationBranchCreateCommand.java
@@ -89,9 +89,7 @@ public class AssociationBranchCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
throw new UnsupportedOperationException();
-
}
/**
@@ -154,5 +152,4 @@ public class AssociationBranchCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationCreateCommand.java
index 82ec1d93e20..a91aec08bee 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationCreateCommand.java
@@ -89,9 +89,7 @@ public class AssociationCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
throw new UnsupportedOperationException();
-
}
/**
@@ -154,5 +152,4 @@ public class AssociationCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationNodeCreateCommand.java
index b59c7179907..67f430bc989 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationNodeCreateCommand.java
@@ -32,8 +32,6 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -65,21 +63,16 @@ public class AssociationNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getAssociation());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Association newElement = UMLFactory.eINSTANCE.createAssociation();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -87,19 +80,13 @@ public class AssociationNodeCreateCommand extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -117,5 +104,4 @@ public class AssociationNodeCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassCreateCommand.java
new file mode 100644
index 00000000000..df9b3858718
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassCreateCommand.java
@@ -0,0 +1,110 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.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.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.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ClassCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public ClassCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ * @generated
+ */
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest)getRequest()).getContainer();
+ if(container instanceof View) {
+ container = ((View)container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
+ return data.isPermitted();
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Class newElement = UMLFactory.eINSTANCE.createClass();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
+ ElementInitializers.getInstance().init_Class_2008(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest)getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Class 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/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassCreateCommandCN.java
new file mode 100644
index 00000000000..c1512900728
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassCreateCommandCN.java
@@ -0,0 +1,110 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.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.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.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ClassCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public ClassCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ * @generated
+ */
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest)getRequest()).getContainer();
+ if(container instanceof View) {
+ container = ((View)container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
+ return data.isPermitted();
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Class newElement = UMLFactory.eINSTANCE.createClass();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
+ ElementInitializers.getInstance().init_Class_3010(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest)getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Class 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/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassOperationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassOperationCreateCommand.java
index 337c258f933..cfb643982fa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassOperationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassOperationCreateCommand.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ClassOperationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOperation());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Operation newElement = UMLFactory.eINSTANCE.createOperation();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ClassOperationCreateCommand extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getOwnedOperations().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Operation_3020(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ClassOperationCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java
index 3c80dbade84..0e72f51c66e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.StructuredClassifier;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ClassPropertyCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Property newElement = UMLFactory.eINSTANCE.createProperty();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ClassPropertyCreateCommand extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
StructuredClassifier qualifiedTarget = (StructuredClassifier)target;
qualifiedTarget.getOwnedAttributes().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Property_3002(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ClassPropertyCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementCreateCommand.java
index 435f6793da1..bc3ac0a0b3d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementCreateCommand.java
@@ -75,15 +75,12 @@ public class CommentAnnotatedElementCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
if(getSource() != null && getTarget() != null) {
getSource().getAnnotatedElements().add(getTarget());
}
return CommandResult.newOKCommandResult();
-
}
-
/**
* @generated
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementReorientCommand.java
index 4db5f3daeb6..0bef382f5be 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementReorientCommand.java
@@ -158,5 +158,4 @@ public class CommentAnnotatedElementReorientCommand extends EditElementCommand {
protected Element getNewTarget() {
return (Element)newEnd;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentCreateCommandCN.java
index d64bb838bd7..5ca750477e6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentCreateCommandCN.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class CommentCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Comment newElement = UMLFactory.eINSTANCE.createComment();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class CommentCreateCommandCN extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Element qualifiedTarget = (Element)target;
qualifiedTarget.getOwnedComments().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Comment_1007(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class CommentCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentEditPartCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentEditPartCreateCommand.java
index 413d59c131d..593ff38f1ca 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentEditPartCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentEditPartCreateCommand.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class CommentEditPartCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Comment newElement = UMLFactory.eINSTANCE.createComment();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class CommentEditPartCreateCommand extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Element qualifiedTarget = (Element)target;
qualifiedTarget.getOwnedComments().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Comment_1002(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class CommentEditPartCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementCreateCommand.java
index b645391714a..33071ee2341 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementCreateCommand.java
@@ -75,15 +75,12 @@ public class ConstraintConstrainedElementCreateCommand extends EditElementComman
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
if(getSource() != null && getTarget() != null) {
getSource().getConstrainedElements().add(getTarget());
}
return CommandResult.newOKCommandResult();
-
}
-
/**
* @generated
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementReorientCommand.java
index cb22bc71350..de3b4f5751c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementReorientCommand.java
@@ -158,5 +158,4 @@ public class ConstraintConstrainedElementReorientCommand extends EditElementComm
protected Element getNewTarget() {
return (Element)newEnd;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommand.java
index 5b4be588e20..101d2f2f981 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommand.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ConstraintCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ConstraintCreateCommand extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Constraint_1014(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ConstraintCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommandCN.java
index 836dafb564e..04bfe228107 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommandCN.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Constraint_1028(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkCreateCommand.java
index f44a6b52b28..8c7240ea8ab 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkCreateCommand.java
@@ -75,15 +75,12 @@ public class ContextLinkCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
if(getSource() != null && getTarget() != null) {
getSource().setContext(getTarget());
}
return CommandResult.newOKCommandResult();
-
}
-
/**
* @generated
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkReorientCommand.java
index c23e627f096..933bf7f797b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkReorientCommand.java
@@ -157,5 +157,4 @@ public class ContextLinkReorientCommand extends EditElementCommand {
protected Namespace getNewTarget() {
return (Namespace)newEnd;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommand.java
index 83fd15cd159..043fc1ad697 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommand.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class DataTypeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
DataType newElement = UMLFactory.eINSTANCE.createDataType();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class DataTypeCreateCommand extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_DataType_2010(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class DataTypeCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommandCN.java
index e072ce05c07..1d205fd190c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommandCN.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class DataTypeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
DataType newElement = UMLFactory.eINSTANCE.createDataType();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class DataTypeCreateCommandCN extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_DataType_3027(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class DataTypeCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java
index 97cd607f769..5c7b65deb8a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class DataTypeOperationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOperation());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Operation newElement = UMLFactory.eINSTANCE.createOperation();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class DataTypeOperationCreateCommand extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
DataType qualifiedTarget = (DataType)target;
qualifiedTarget.getOwnedOperations().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Operation_3019(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class DataTypeOperationCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java
index ef02018fdcf..8dc32e87276 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class DataTypePropertyCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Property newElement = UMLFactory.eINSTANCE.createProperty();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class DataTypePropertyCreateCommand extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
DataType qualifiedTarget = (DataType)target;
qualifiedTarget.getOwnedAttributes().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Property_3018(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class DataTypePropertyCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyBranchCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyBranchCreateCommand.java
index 7e00f3964c5..6becd0049d1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyBranchCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyBranchCreateCommand.java
@@ -91,7 +91,6 @@ public class DependencyBranchCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Dependency newElement = UMLFactory.eINSTANCE.createDependency();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -100,7 +99,6 @@ public class DependencyBranchCreateCommand extends EditElementCommand {
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -163,5 +161,4 @@ public class DependencyBranchCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyCreateCommand.java
index e4333b4baa4..4d0a46b8329 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyCreateCommand.java
@@ -91,7 +91,6 @@ public class DependencyCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Dependency newElement = UMLFactory.eINSTANCE.createDependency();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -100,7 +99,6 @@ public class DependencyCreateCommand extends EditElementCommand {
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -163,5 +161,4 @@ public class DependencyCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyNodeCreateCommand.java
index 2c1215acf3a..6e47d944af6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyNodeCreateCommand.java
@@ -32,8 +32,6 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -65,21 +63,16 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDependency());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Dependency newElement = UMLFactory.eINSTANCE.createDependency();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -87,19 +80,13 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -117,5 +104,4 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ElementImportCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ElementImportCreateCommand.java
index 459304750b9..f531a696af7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ElementImportCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ElementImportCreateCommand.java
@@ -91,7 +91,6 @@ public class ElementImportCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
ElementImport newElement = UMLFactory.eINSTANCE.createElementImport();
getContainer().getElementImports().add(newElement);
newElement.setImportingNamespace(getSource());
@@ -100,7 +99,6 @@ public class ElementImportCreateCommand extends EditElementCommand {
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -163,5 +161,4 @@ public class ElementImportCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommand.java
index 22748d14264..ccb341040d1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommand.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class EnumerationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class EnumerationCreateCommand extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Enumeration_2006(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class EnumerationCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommandCN.java
index 1704ad8e8b3..f9a2d9397d2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommandCN.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class EnumerationCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class EnumerationCreateCommandCN extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Enumeration_3025(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class EnumerationCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java
index 2b2f82b3955..90a36c78006 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.EnumerationLiteral;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class EnumerationLiteralCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumerationLiteral());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
EnumerationLiteral newElement = UMLFactory.eINSTANCE.createEnumerationLiteral();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class EnumerationLiteralCreateCommand extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Enumeration qualifiedTarget = (Enumeration)target;
qualifiedTarget.getOwnedLiterals().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_EnumerationLiteral_1037(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class EnumerationLiteralCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ExtensionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ExtensionCreateCommand.java
index 472a45314de..61bcf8f5407 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ExtensionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ExtensionCreateCommand.java
@@ -90,9 +90,7 @@ public class ExtensionCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
throw new UnsupportedOperationException();
-
}
/**
@@ -155,5 +153,4 @@ public class ExtensionCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/GeneralizationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/GeneralizationCreateCommand.java
index 374a61bf617..bb95c473e55 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/GeneralizationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/GeneralizationCreateCommand.java
@@ -80,14 +80,12 @@ public class GeneralizationCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Generalization newElement = UMLFactory.eINSTANCE.createGeneralization();
getSource().getGeneralizations().add(newElement);
newElement.setGeneral(getTarget());
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -126,5 +124,4 @@ public class GeneralizationCreateCommand extends EditElementCommand {
protected Classifier getTarget() {
return (Classifier)target;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommand.java
index a54a9777929..e698793eb37 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommand.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class MetaclassCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Class newElement = UMLFactory.eINSTANCE.createClass();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class MetaclassCreateCommand extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Class_1031(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class MetaclassCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommandCN.java
index dc044af0094..471c2834f65 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommandCN.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class MetaclassCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Class newElement = UMLFactory.eINSTANCE.createClass();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class MetaclassCreateCommandCN extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Class_3028(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class MetaclassCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandCN.java
index 334dba2223c..337158936fe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandCN.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ModelCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Model newElement = UMLFactory.eINSTANCE.createModel();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ModelCreateCommandCN extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Model_1027(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ModelCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandTN.java
index 7a2425853ad..30d7893401c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandTN.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ModelCreateCommandTN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Model newElement = UMLFactory.eINSTANCE.createModel();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ModelCreateCommandTN extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Model_2005(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ModelCreateCommandTN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommand.java
index eb8eafca6c8..a1b13c36b9a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommand.java
@@ -32,8 +32,6 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -65,21 +63,16 @@ public class PackageCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Package newElement = UMLFactory.eINSTANCE.createPackage();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -87,20 +80,14 @@ public class PackageCreateCommand extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Package_2007(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -118,5 +105,4 @@ public class PackageCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommandCN.java
index a650d8f4221..b4ab8bcadc3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommandCN.java
@@ -32,8 +32,6 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -65,21 +63,16 @@ public class PackageCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Package newElement = UMLFactory.eINSTANCE.createPackage();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -87,20 +80,14 @@ public class PackageCreateCommandCN extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Package_1012(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -118,5 +105,4 @@ public class PackageCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageImportCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageImportCreateCommand.java
index 1af43e5c7f7..8755f84dd5f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageImportCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageImportCreateCommand.java
@@ -90,7 +90,6 @@ public class PackageImportCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
PackageImport newElement = UMLFactory.eINSTANCE.createPackageImport();
getContainer().getPackageImports().add(newElement);
newElement.setImportingNamespace(getSource());
@@ -98,7 +97,6 @@ public class PackageImportCreateCommand extends EditElementCommand {
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -161,5 +159,4 @@ public class PackageImportCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java
index 1ebdcb58836..5c7da76fde8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_PrimitiveType_2009(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java
index 855860cd936..b3b6eb13e7a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_PrimitiveType_3026(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileApplicationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileApplicationCreateCommand.java
index 6f5c56b6477..084a930496c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileApplicationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileApplicationCreateCommand.java
@@ -90,7 +90,6 @@ public class ProfileApplicationCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
ProfileApplication newElement = UMLFactory.eINSTANCE.createProfileApplication();
getContainer().getProfileApplications().add(newElement);
newElement.setApplyingPackage(getSource());
@@ -98,7 +97,6 @@ public class ProfileApplicationCreateCommand extends EditElementCommand {
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -161,5 +159,4 @@ public class ProfileApplicationCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandCN.java
index 4f561d691c8..26cd4d76830 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandCN.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Profile;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ProfileCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProfile());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Profile newElement = UMLFactory.eINSTANCE.createProfile();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ProfileCreateCommandCN extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Profile_1024(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ProfileCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandTN.java
index 4ffa4c99cf6..e06a3852537 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandTN.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Profile;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ProfileCreateCommandTN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProfile());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Profile newElement = UMLFactory.eINSTANCE.createProfile();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ProfileCreateCommandTN extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Profile_1030(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ProfileCreateCommandTN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java
index e0609b812cb..efeb85148ba 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java
@@ -28,8 +28,6 @@ import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.NotationFactory;
import org.eclipse.gmf.runtime.notation.View;
-
-
/**
* @generated
*/
@@ -42,7 +40,6 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand {
*/
public ShortCutDiagramCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.diagram = diagram;
}
/**
@@ -68,7 +65,6 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand {
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
// Uncomment to put "phantom" objects into the diagram file.
// org.eclipse.emf.ecore.resource.Resource resource =
// ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getContainer().eResource();
@@ -78,10 +74,7 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand {
Resource resource = getElementToEdit().eResource();
Diagram newElement = NotationFactory.eINSTANCE.createDiagram();
resource.getContents().add(newElement);
-
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -99,5 +92,4 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommand.java
index 91bdf5c11ef..d3d00a90c91 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommand.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Stereotype;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class StereotypeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStereotype());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Stereotype newElement = UMLFactory.eINSTANCE.createStereotype();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class StereotypeCreateCommand extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getOwnedStereotypes().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Stereotype_1026(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class StereotypeCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommandCN.java
index c5113e1f432..5452526d7a7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommandCN.java
@@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Stereotype;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class StereotypeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStereotype());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Stereotype newElement = UMLFactory.eINSTANCE.createStereotype();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class StereotypeCreateCommandCN extends EditElementCommand {
if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getOwnedStereotypes().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Stereotype_1023(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class StereotypeCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/ClassEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/ClassEditHelper.java
new file mode 100644
index 00000000000..8ba38cf9988
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/ClassEditHelper.java
@@ -0,0 +1,20 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.helpers;
+
+import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
+
+/**
+ * @generated
+ */
+public class ClassEditHelper extends UMLBaseEditHelper {
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/UMLBaseEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/UMLBaseEditHelper.java
index 88f4878d19a..6a563bf9b73 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/UMLBaseEditHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/UMLBaseEditHelper.java
@@ -19,9 +19,4 @@ import org.eclipse.gmf.tooling.runtime.edit.helpers.GeneratedEditHelperBase;
* @generated
*/
public class UMLBaseEditHelper extends GeneratedEditHelperBase {
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AppliedStereotypeElementImportEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AppliedStereotypeElementImportEditPart.java
index 5e235ad7778..9bf8ddaaf2e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AppliedStereotypeElementImportEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AppliedStereotypeElementImportEditPart.java
@@ -121,8 +121,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -631,7 +623,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -716,7 +707,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
}
}
-
/**
* @generated
*/
@@ -746,7 +736,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
}
}
}
-
super.handleNotificationEvent(event);
}
@@ -757,5 +746,4 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart
// Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationAppliedStereotypeEditPart.java
index 9af712a1e2b..5f47e777e6c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationAppliedStereotypeEditPart.java
@@ -121,8 +121,6 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -708,7 +700,6 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
}
}
-
/**
* @generated
*/
@@ -738,7 +729,6 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
}
}
}
-
super.handleNotificationEvent(event);
}
@@ -749,5 +739,4 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i
// Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchEditPart.java
index dc4a0e5fd70..6547f6bd710 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchEditPart.java
@@ -116,5 +116,4 @@ public class AssociationBranchEditPart extends AbstractAssociationBranchEditPart
public AssociationFigure getPrimaryShape() {
return (AssociationFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchMultiplicityEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchMultiplicityEditPart.java
index e7bc40ab4f6..7127e3ba179 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchMultiplicityEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchMultiplicityEditPart.java
@@ -122,8 +122,6 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -156,7 +154,6 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart
return ConnectionLocator.SOURCE;
}
-
/**
* @generated
*/
@@ -324,7 +321,6 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -411,9 +407,7 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -446,7 +440,6 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -454,7 +447,6 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -710,7 +702,6 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart
}
}
-
/**
* @generated
*/
@@ -740,7 +731,6 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart
}
}
}
-
super.handleNotificationEvent(event);
}
@@ -751,5 +741,4 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart
// Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchRoleEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchRoleEditPart.java
index a567067f239..632121c0b3d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchRoleEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchRoleEditPart.java
@@ -122,8 +122,6 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -156,7 +154,6 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen
return ConnectionLocator.SOURCE;
}
-
/**
* @generated
*/
@@ -324,7 +321,6 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -411,9 +407,7 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -446,7 +440,6 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -454,7 +447,6 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -710,7 +702,6 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen
}
}
-
/**
* @generated
*/
@@ -740,7 +731,6 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen
}
}
}
-
super.handleNotificationEvent(event);
}
@@ -751,5 +741,4 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen
// Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationEditPart.java
index e2abcf54224..75df4180077 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationEditPart.java
@@ -142,5 +142,4 @@ public class AssociationEditPart extends AbstractAssociationEditPart implements
public AssociationFigure getPrimaryShape() {
return (AssociationFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicitySourceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicitySourceEditPart.java
index 20a5ee7afb5..74600483f2a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicitySourceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicitySourceEditPart.java
@@ -122,8 +122,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -156,7 +154,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart
return ConnectionLocator.TARGET;
}
-
/**
* @generated
*/
@@ -324,7 +321,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -411,9 +407,7 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -446,7 +440,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -454,7 +447,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -633,7 +625,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -718,7 +709,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart
}
}
-
/**
* @generated
*/
@@ -748,7 +738,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart
}
}
}
-
super.handleNotificationEvent(event);
}
@@ -759,5 +748,4 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart
// Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicityTargetEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicityTargetEditPart.java
index a782f787cf6..71c5996ec66 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicityTargetEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicityTargetEditPart.java
@@ -122,8 +122,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -156,7 +154,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart
return ConnectionLocator.SOURCE;
}
-
/**
* @generated
*/
@@ -324,7 +321,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -411,9 +407,7 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -446,7 +440,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -454,7 +447,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -633,7 +625,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -718,7 +709,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart
}
}
-
/**
* @generated
*/
@@ -748,7 +738,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart
}
}
}
-
super.handleNotificationEvent(event);
}
@@ -759,5 +748,4 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart
// Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNameEditPart.java
index 5922ff006e8..6248d9388ed 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNameEditPart.java
@@ -121,8 +121,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe
return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -631,7 +623,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -716,7 +707,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe
}
}
-
/**
* @generated
*/
@@ -746,7 +736,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe
}
}
}
-
super.handleNotificationEvent(event);
}
@@ -757,5 +746,4 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe
// Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNodeEditPart.java
index 55065db2cb9..2c73d8f0063 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNodeEditPart.java
@@ -34,7 +34,10 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.DiamondNode;
import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomAssociationNodeItemSemanticEditPolicy;
@@ -45,7 +48,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class AssociationNodeEditPart extends ShapeNodeEditPart {
+public class AssociationNodeEditPart extends NodeEditPart {
/**
* @generated
@@ -107,40 +110,29 @@ public class AssociationNodeEditPart extends ShapeNodeEditPart {
return lep;
}
-
-
-
/**
* @generated
*/
protected IFigure createNodeShape() {
- return primaryShape = new AssociationNodeDescriptor();
+ return primaryShape = new DiamondNode();
}
/**
* AssociationNodeDescriptor
* @generated
*/
- public AssociationNodeDescriptor getPrimaryShape() {
- return (AssociationNodeDescriptor)primaryShape;
+ public DiamondNode getPrimaryShape() {
+ return (DiamondNode)primaryShape;
}
-
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "AssociationNode";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(20, 20);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -150,12 +142,7 @@ public class AssociationNodeEditPart extends ShapeNodeEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -187,14 +174,11 @@ public class AssociationNodeEditPart extends ShapeNodeEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -205,115 +189,4 @@ public class AssociationNodeEditPart extends ShapeNodeEditPart {
((NodeFigure)primaryShape).setLineStyle(style);
}
}
-
-
-
-
-
- /**
- * @generated
- */
- public class AssociationNodeDescriptor extends Shape {
-
-
-
-
- /**
- * @generated
- */
- public AssociationNodeDescriptor() {
- this.addPoint(new Point(getMapMode().DPtoLP(5), getMapMode().DPtoLP(0)));
- this.addPoint(new Point(getMapMode().DPtoLP(10), getMapMode().DPtoLP(5)));
- this.addPoint(new Point(getMapMode().DPtoLP(5), getMapMode().DPtoLP(10)));
- this.addPoint(new Point(getMapMode().DPtoLP(0), getMapMode().DPtoLP(5)));
- this.setFill(true);
- this.setForegroundColor(ColorConstants.black);
- this.setBackgroundColor(ColorConstants.white);
- }
-
- /**
- * @generated
- */
- private final PointList myTemplate = new PointList();
-
- /**
- * @generated
- */
- private Rectangle myTemplateBounds;
-
- /**
- * @generated
- */
- public void addPoint(Point point) {
- myTemplate.addPoint(point);
- myTemplateBounds = null;
- }
-
- /**
- * @generated
- */
- protected void fillShape(Graphics graphics) {
- Rectangle bounds = getBounds();
- graphics.pushState();
- graphics.translate(bounds.x, bounds.y);
- graphics.fillPolygon(scalePointList());
- graphics.popState();
- }
-
- /**
- * @generated
- */
- protected void outlineShape(Graphics graphics) {
- Rectangle bounds = getBounds();
- graphics.pushState();
- graphics.translate(bounds.x, bounds.y);
- graphics.drawPolygon(scalePointList());
- graphics.popState();
- }
-
- /**
- * @generated
- */
- private Rectangle getTemplateBounds() {
- if(myTemplateBounds == null) {
- myTemplateBounds = myTemplate.getBounds().getCopy().union(0, 0);
- //just safety -- we are going to use this as divider
- if(myTemplateBounds.width < 1) {
- myTemplateBounds.width = 1;
- }
- if(myTemplateBounds.height < 1) {
- myTemplateBounds.height = 1;
- }
- }
- return myTemplateBounds;
- }
-
- /**
- * @generated
- */
- private int[] scalePointList() {
- Rectangle pointsBounds = getTemplateBounds();
- Rectangle actualBounds = getBounds();
-
- float xScale = ((float)actualBounds.width) / pointsBounds.width;
- float yScale = ((float)actualBounds.height) / pointsBounds.height;
-
- if(xScale == 1 && yScale == 1) {
- return myTemplate.toIntArray();
- }
- int[] scaled = (int[])myTemplate.toIntArray().clone();
- for(int i = 0; i < scaled.length; i += 2) {
- scaled[i] = (int)Math.floor(scaled[i] * xScale);
- scaled[i + 1] = (int)Math.floor(scaled[i + 1] * yScale);
- }
- return scaled;
- }
-
-
-
-
-
- }
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleSourceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleSourceEditPart.java
index e8b2373f918..85900b89955 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleSourceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleSourceEditPart.java
@@ -122,8 +122,6 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -156,7 +154,6 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen
return ConnectionLocator.TARGET;
}
-
/**
* @generated
*/
@@ -324,7 +321,6 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -411,9 +407,7 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -446,7 +440,6 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -454,7 +447,6 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -710,7 +702,6 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen
}
}
-
/**
* @generated
*/
@@ -740,7 +731,6 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen
}
}
}
-
super.handleNotificationEvent(event);
}
@@ -751,5 +741,4 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen
// Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleTargetEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleTargetEditPart.java
index 5dff1c118d0..bbff6f0fe79 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleTargetEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleTargetEditPart.java
@@ -122,8 +122,6 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -156,7 +154,6 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen
return ConnectionLocator.SOURCE;
}
-
/**
* @generated
*/
@@ -324,7 +321,6 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -411,9 +407,7 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -446,7 +440,6 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -454,7 +447,6 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -710,7 +702,6 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen
}
}
-
/**
* @generated
*/
@@ -740,7 +731,6 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen
}
}
}
-
super.handleNotificationEvent(event);
}
@@ -751,5 +741,4 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen
// Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassAttributeCompartmentEditPart.java
new file mode 100644
index 00000000000..36a05504682
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassAttributeCompartmentEditPart.java
@@ -0,0 +1,128 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.parts;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ClassAttributeCompartmentItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.part.Messages;
+
+/**
+ * @generated
+ */
+public class ClassAttributeCompartmentEditPart extends ListCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7017;
+
+ /**
+ * @generated
+ */
+ public ClassAttributeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ClassAttributeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassAttributeCompartmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassAttributeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassAttributeCompartmentEditPartCN.java
new file mode 100644
index 00000000000..4e15881979d
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassAttributeCompartmentEditPartCN.java
@@ -0,0 +1,128 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.parts;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ClassAttributeCompartmentItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.profile.part.Messages;
+
+/**
+ * @generated
+ */
+public class ClassAttributeCompartmentEditPartCN extends ListCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7011;
+
+ /**
+ * @generated
+ */
+ public ClassAttributeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ClassAttributeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassAttributeCompartmentItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPart.java
new file mode 100644
index 00000000000..f6128f53351
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPart.java
@@ -0,0 +1,301 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+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.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+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.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomClassItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ClasseItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ClassEditPart extends NodeEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2008;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ClassEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClasseItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomClassItemSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ // 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);
+ }
+
+ /**
+ * @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 ClassifierFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure
+ * @generated
+ */
+ public ClassifierFigure getPrimaryShape() {
+ return (ClassifierFigure)primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if(childEditPart instanceof ClassNameEditPart) {
+ ((ClassNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if(childEditPart instanceof ClassOperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ClassOperationCompartmentEditPart)childEditPart).getFigure());
+ return true;
+ }
+ if(childEditPart instanceof ClassAttributeCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ClassAttributeCompartmentEditPart)childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if(childEditPart instanceof ClassNameEditPart) {
+ return true;
+ }
+ if(childEditPart instanceof ClassOperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ pane.remove(((ClassOperationCompartmentEditPart)childEditPart).getFigure());
+ return true;
+ }
+ if(childEditPart instanceof ClassAttributeCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
+ pane.remove(((ClassAttributeCompartmentEditPart)childEditPart).getFigure());
+ 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) {
+ if(editPart instanceof ClassOperationCompartmentEditPart) {
+ return getPrimaryShape().getOperationCompartmentFigure();
+ }
+ if(editPart instanceof ClassAttributeCompartmentEditPart) {
+ return getPrimaryShape().getAttributeCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ 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() {
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
+ }
+
+ /**
+ * 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) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLineType(int style) {
+ if(primaryShape instanceof NodeFigure) {
+ ((NodeFigure)primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ClassNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ if(request instanceof CreateViewAndElementRequest) {
+ CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ if(type == UMLElementTypes.Operation_3020) {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ClassOperationCompartmentEditPart.VISUAL_ID));
+ }
+ if(type == UMLElementTypes.Property_3002) {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ClassAttributeCompartmentEditPart.VISUAL_ID));
+ }
+ }
+ return super.getTargetEditPart(request);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPartCN.java
new file mode 100644
index 00000000000..f4bdaf9dc9f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPartCN.java
@@ -0,0 +1,298 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+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.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+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.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomClassItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ClassItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ClassEditPartCN extends NodeEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3010;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ClassEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomClassItemSemanticEditPolicyCN());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ // 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);
+ }
+
+ /**
+ * @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 ClassifierFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure
+ * @generated
+ */
+ public ClassifierFigure getPrimaryShape() {
+ return (ClassifierFigure)primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if(childEditPart instanceof ClassNameEditPartCN) {
+ ((ClassNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if(childEditPart instanceof ClassAttributeCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ClassAttributeCompartmentEditPartCN)childEditPart).getFigure());
+ return true;
+ }
+ if(childEditPart instanceof ClassOperationCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ClassOperationCompartmentEditPartCN)childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if(childEditPart instanceof ClassNameEditPartCN) {
+ return true;
+ }
+ if(childEditPart instanceof ClassAttributeCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
+ pane.remove(((ClassAttributeCompartmentEditPartCN)childEditPart).getFigure());
+ return true;
+ }
+ if(childEditPart instanceof ClassOperationCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ pane.remove(((ClassOperationCompartmentEditPartCN)childEditPart).getFigure());
+ 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) {
+ if(editPart instanceof ClassAttributeCompartmentEditPartCN) {
+ return getPrimaryShape().getAttributeCompartmentFigure();
+ }
+ if(editPart instanceof ClassOperationCompartmentEditPartCN) {
+ return getPrimaryShape().getOperationCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ 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() {
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
+ }
+
+ /**
+ * 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) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLineType(int style) {
+ if(primaryShape instanceof NodeFigure) {
+ ((NodeFigure)primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ClassNameEditPartCN.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ if(request instanceof CreateViewAndElementRequest) {
+ CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ if(type == UMLElementTypes.Property_3002) {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ClassAttributeCompartmentEditPartCN.VISUAL_ID));
+ }
+ if(type == UMLElementTypes.Operation_3020) {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ClassOperationCompartmentEditPartCN.VISUAL_ID));
+ }
+ }
+ return super.getTargetEditPart(request);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassNameEditPart.java
new file mode 100644
index 00000000000..0f798ca3168
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassNameEditPart.java
@@ -0,0 +1,803 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.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.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.gmf.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
+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.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
+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.infra.emf.appearance.helper.AppearanceHelper;
+import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLParserProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Feature;
+
+/**
+ * @generated
+ */
+public class ClassNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5029;
+
+ /**
+ * @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 ClassNameEditPart(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 DefaultNodeLabelDragPolicy());
+ }
+
+ /**
+ * @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(IFigure 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
+ */
+ public void setParser(IParser parser) {
+ this.parser = parser;
+ }
+
+ /**
+ * @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(AppearanceHelper.showElementIcon(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<java.lang.Object>() {
+
+ 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.getParser(UMLElementTypes.Class_2008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassNameEditPart.VISUAL_ID));
+ }
+ 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() {
+ BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
+
+ public void run() {
+ 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) {
+ // Create default edit manager
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
+ performDefaultDirectEditorEdit(theRequest);
+ } else {
+ configuration.preEditAction(resolveSemanticElement());
+ Dialog dialog = null;
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
+ initializeDirectEditManager(theRequest);
+ return;
+ } else 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:
+ initializeDirectEditManager(theRequest);
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void initializeDirectEditManager(final Request request) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ public void run() {
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @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());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
+ }
+ }
+ }
+
+ /**
+ * @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.uml.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.equals(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 && VisualInformationPapyrusConstants.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/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassNameEditPartCN.java
new file mode 100644
index 00000000000..70bac9b29b8
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassNameEditPartCN.java
@@ -0,0 +1,786 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.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.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.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.gmf.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
+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.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
+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.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLParserProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Feature;
+
+/**
+ * @generated
+ */
+public class ClassNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5014;
+
+ /**
+ * @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 ClassNameEditPartCN(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 DefaultNodeLabelDragPolicy());
+ }
+
+ /**
+ * @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(IFigure 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
+ */
+ public void setParser(IParser parser) {
+ this.parser = parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIcon() {
+ 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<java.lang.Object>() {
+
+ 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.getParser(UMLElementTypes.Class_3010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassNameEditPartCN.VISUAL_ID));
+ }
+ 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() {
+ BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
+
+ public void run() {
+ 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) {
+ // Create default edit manager
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
+ performDefaultDirectEditorEdit(theRequest);
+ } else {
+ configuration.preEditAction(resolveSemanticElement());
+ Dialog dialog = null;
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
+ initializeDirectEditManager(theRequest);
+ return;
+ } else 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:
+ initializeDirectEditManager(theRequest);
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void initializeDirectEditManager(final Request request) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ public void run() {
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @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());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
+ }
+ }
+ }
+
+ /**
+ * @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.uml.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.equals(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();
+ }
+ }
+ }
+ 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/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationCompartmentEditPart.java
new file mode 100644
index 00000000000..344e9c9a7db
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationCompartmentEditPart.java
@@ -0,0 +1,128 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.parts;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ClassOperationCompartmentItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.part.Messages;
+
+/**
+ * @generated
+ */
+public class ClassOperationCompartmentEditPart extends ListCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7018;
+
+ /**
+ * @generated
+ */
+ public ClassOperationCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ClassOperationCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassOperationCompartmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationCompartmentEditPartCN.java
new file mode 100644
index 00000000000..1b210764c0f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationCompartmentEditPartCN.java
@@ -0,0 +1,128 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.parts;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ClassOperationCompartmentItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.profile.part.Messages;
+
+/**
+ * @generated
+ */
+public class ClassOperationCompartmentEditPartCN extends ListCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7012;
+
+ /**
+ * @generated
+ */
+ public ClassOperationCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ClassOperationCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassOperationCompartmentItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationEditPart.java
index 746d29c5dd4..8218001024a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationEditPart.java
@@ -134,7 +134,6 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -165,7 +164,6 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText
installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new OperationLabelEditPolicy());
}
-
/**
* @generated
*/
@@ -333,7 +331,6 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -420,9 +417,7 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -455,7 +450,6 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -463,7 +457,6 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -625,7 +618,7 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText
* @generated
*/
private View getFontStyleOwnerView() {
- return (View)getModel();
+ return getPrimaryView();
}
/**
@@ -642,7 +635,6 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -727,7 +719,6 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText
}
}
-
/**
* @generated
*/
@@ -792,47 +783,14 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText
* @generated
*/
protected IFigure createFigurePrim() {
- return new OperationFigureDescriptor();
- }
-
-
- /**
- * @generated
- */
- public class OperationFigureDescriptor extends WrappingLabel {
-
-
-
-
- /**
- * @generated
- */
- public OperationFigureDescriptor() {
- this.setText("");
-
- this.setFont(THIS_FONT);
-
-
- }
-
-
-
-
-
+ return new WrappingLabel();
}
/**
* @generated
*/
- static final Font THIS_FONT = new Font(Display.getCurrent(), "Arial", 10, SWT.NORMAL);
-
-
- /**
- * @generated
- */
@Override
public boolean isSelectable() {
return getFigure().isShowing();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassPropertyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassPropertyEditPart.java
index 9805e783390..77d4b64c211 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassPropertyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassPropertyEditPart.java
@@ -134,7 +134,6 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -165,7 +164,6 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA
installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new PropertyLabelEditPolicy());
}
-
/**
* @generated
*/
@@ -333,7 +331,6 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -420,9 +417,7 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -455,7 +450,6 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -463,7 +457,6 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -625,7 +618,7 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA
* @generated
*/
private View getFontStyleOwnerView() {
- return (View)getModel();
+ return getPrimaryView();
}
/**
@@ -642,7 +635,6 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -727,7 +719,6 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA
}
}
-
/**
* @generated
*/
@@ -792,47 +783,14 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA
* @generated
*/
protected IFigure createFigurePrim() {
- return new PropertyFigureDescriptor();
- }
-
-
- /**
- * @generated
- */
- public class PropertyFigureDescriptor extends WrappingLabel {
-
-
-
-
- /**
- * @generated
- */
- public PropertyFigureDescriptor() {
- this.setText("");
-
- this.setFont(THIS_FONT);
-
-
- }
-
-
-
-
-
+ return new WrappingLabel();
}
/**
* @generated
*/
- static final Font THIS_FONT = new Font(Display.getCurrent(), "Arial", 10, SWT.NORMAL);
-
-
- /**
- * @generated
- */
@Override
public boolean isSelectable() {
return getFigure().isShowing();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentAnnotatedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentAnnotatedElementEditPart.java
index 3b89e97d9d7..92b702c1f22 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentAnnotatedElementEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentAnnotatedElementEditPart.java
@@ -21,6 +21,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ConnectionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.profile.edit.policies.CommentAnnotatedElementItemSemanticEditPolicy;
@@ -50,10 +51,6 @@ public class CommentAnnotatedElementEditPart extends ConnectionEditPart implemen
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
-
-
-
-
/**
* Creates figure for this edit part.
*
@@ -63,37 +60,13 @@ public class CommentAnnotatedElementEditPart extends ConnectionEditPart implemen
* @generated
*/
protected Connection createConnectionFigure() {
- return new CommentLinkDescriptor();
+ return new SimpleDashedEdgeFigure();
}
/**
* @generated
*/
- public CommentLinkDescriptor getPrimaryShape() {
- return (CommentLinkDescriptor)getFigure();
+ public SimpleDashedEdgeFigure getPrimaryShape() {
+ return (SimpleDashedEdgeFigure)getFigure();
}
-
-
- /**
- * @generated
- */
- public class CommentLinkDescriptor extends PolylineConnectionEx {
-
-
-
-
- /**
- * @generated
- */
- public CommentLinkDescriptor() {
- this.setLineStyle(Graphics.LINE_DASH);
-
- }
-
-
-
-
- }
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPart.java
index 69b278c177a..d4fc9ec4d3f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPart.java
@@ -122,7 +122,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPartCN.java
index ed4e5b7d17c..cc9c005577a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPartCN.java
@@ -122,7 +122,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPart.java
index d742ed38009..55f23a99127 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPart.java
@@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -107,17 +108,14 @@ public class CommentEditPart extends AbstractCommentEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -141,8 +139,6 @@ public class CommentEditPart extends AbstractCommentEditPart {
((CommentBodyEditPart)childEditPart).setLabel(getPrimaryShape().getCornerBentFigure());
return true;
}
-
-
return false;
}
@@ -183,21 +179,14 @@ public class CommentEditPart extends AbstractCommentEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Comment";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -207,12 +196,7 @@ public class CommentEditPart extends AbstractCommentEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -249,14 +233,11 @@ public class CommentEditPart extends AbstractCommentEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -274,9 +255,4 @@ public class CommentEditPart extends AbstractCommentEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(CommentBodyEditPart.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPartCN.java
index b66f8f682c7..1d71972a5a0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPartCN.java
@@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -107,17 +108,14 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -141,8 +139,6 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
((CommentBodyEditPartCN)childEditPart).setLabel(getPrimaryShape().getCornerBentFigure());
return true;
}
-
-
return false;
}
@@ -183,21 +179,14 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Comment";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -207,12 +196,7 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -249,14 +233,11 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -274,9 +255,4 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(CommentBodyEditPartCN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPart.java
index 10143251ac8..78689f10c86 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPart.java
@@ -122,7 +122,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPartCN.java
index 08dc55731f1..0b27a18e796 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPartCN.java
@@ -122,7 +122,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintConstrainedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintConstrainedElementEditPart.java
index 7c21f13d789..d2d7d03dc5c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintConstrainedElementEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintConstrainedElementEditPart.java
@@ -21,6 +21,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ConnectionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ConstraintConstrainedElementItemSemanticEditPolicy;
@@ -50,10 +51,6 @@ public class ConstraintConstrainedElementEditPart extends ConnectionEditPart imp
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
-
-
-
-
/**
* Creates figure for this edit part.
*
@@ -63,37 +60,13 @@ public class ConstraintConstrainedElementEditPart extends ConnectionEditPart imp
* @generated
*/
protected Connection createConnectionFigure() {
- return new CommentLinkDescriptor();
+ return new SimpleDashedEdgeFigure();
}
/**
* @generated
*/
- public CommentLinkDescriptor getPrimaryShape() {
- return (CommentLinkDescriptor)getFigure();
+ public SimpleDashedEdgeFigure getPrimaryShape() {
+ return (SimpleDashedEdgeFigure)getFigure();
}
-
-
- /**
- * @generated
- */
- public class CommentLinkDescriptor extends PolylineConnectionEx {
-
-
-
-
- /**
- * @generated
- */
- public CommentLinkDescriptor() {
- this.setLineStyle(Graphics.LINE_DASH);
-
- }
-
-
-
-
- }
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPart.java
index f3c04731aa5..b63d587d3ff 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPart.java
@@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -108,17 +109,14 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -146,8 +144,6 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
((ConstraintBodyEditPart)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -191,21 +187,14 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Constraint";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -215,12 +204,7 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -257,14 +241,11 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -282,9 +263,4 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPartCN.java
index 0970e118ba7..d25ac1cfcbb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPartCN.java
@@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure;
@@ -104,17 +105,14 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -142,8 +140,6 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
((ConstraintBodyEditPartCN)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -187,21 +183,14 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Constraint";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -211,12 +200,7 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -253,14 +237,11 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -278,9 +259,4 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ConstraintNameEditPartCN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPart.java
index dcdfcd390ed..5779525cec9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPart.java
@@ -122,7 +122,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPartCN.java
index 5fe8b72a8ff..c8aed569898 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPartCN.java
@@ -122,7 +122,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ContextLinkEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ContextLinkEditPart.java
index 7d2d90ebd86..489455d5a93 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ContextLinkEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ContextLinkEditPart.java
@@ -21,6 +21,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ConnectionEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.custom.figure.CustomContextLinkFigure;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ContextLinkItemSemanticEditPolicy;
@@ -50,10 +51,6 @@ public class ContextLinkEditPart extends ConnectionEditPart implements ITreeBran
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
-
-
-
-
/**
* Creates figure for this edit part.
*
@@ -63,37 +60,13 @@ public class ContextLinkEditPart extends ConnectionEditPart implements ITreeBran
* @generated
*/
protected Connection createConnectionFigure() {
- return new ContextLinkDescriptor();
+ return new CustomContextLinkFigure();
}
/**
* @generated
*/
- public ContextLinkDescriptor getPrimaryShape() {
- return (ContextLinkDescriptor)getFigure();
+ public CustomContextLinkFigure getPrimaryShape() {
+ return (CustomContextLinkFigure)getFigure();
}
-
-
- /**
- * @generated
- */
- public class ContextLinkDescriptor extends PolylineConnectionEx {
-
-
-
-
- /**
- * @generated
- */
- public ContextLinkDescriptor() {
- this.setLineStyle(Graphics.LINE_DASHDOT);
-
- }
-
-
-
-
- }
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPart.java
index 3be37cf8650..7880ccdf1fa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPart.java
@@ -66,7 +66,6 @@ public class DataTypeAttributeCompartmentEditPart extends ResizeableListCompartm
return Messages.DataTypeAttributeCompartmentEditPart_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class DataTypeAttributeCompartmentEditPart extends ResizeableListCompartm
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class DataTypeAttributeCompartmentEditPart extends ResizeableListCompartm
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPartCN.java
index 7b576b5cc89..f125d8872c0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPartCN.java
@@ -66,7 +66,6 @@ public class DataTypeAttributeCompartmentEditPartCN extends ResizeableListCompar
return Messages.DataTypeAttributeCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class DataTypeAttributeCompartmentEditPartCN extends ResizeableListCompar
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class DataTypeAttributeCompartmentEditPartCN extends ResizeableListCompar
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPart.java
index bef204a4d9c..ba324022156 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPart.java
@@ -33,6 +33,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -121,17 +122,14 @@ public class DataTypeEditPart extends ClassifierEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -155,22 +153,18 @@ public class DataTypeEditPart extends ClassifierEditPart {
((DataTypeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof DataTypeAttributeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((DataTypeAttributeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
if(childEditPart instanceof DataTypeOperationCompartmentEditPart) {
IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((DataTypeOperationCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -227,21 +221,14 @@ public class DataTypeEditPart extends ClassifierEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "DataType";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -251,12 +238,7 @@ public class DataTypeEditPart extends ClassifierEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -293,14 +275,11 @@ public class DataTypeEditPart extends ClassifierEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -319,8 +298,6 @@ public class DataTypeEditPart extends ClassifierEditPart {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DataTypeNameEditPart.VISUAL_ID));
}
-
-
/**
* @generated
*/
@@ -337,8 +314,4 @@ public class DataTypeEditPart extends ClassifierEditPart {
}
return super.getTargetEditPart(request);
}
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPartCN.java
index 93cf5b370ee..6748687b521 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPartCN.java
@@ -33,6 +33,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -89,7 +90,6 @@ public class DataTypeEditPartCN extends ClassifierEditPart {
installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDataTypeItemSemanticEditPolicyCN());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
@@ -121,17 +121,14 @@ public class DataTypeEditPartCN extends ClassifierEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -155,22 +152,18 @@ public class DataTypeEditPartCN extends ClassifierEditPart {
((DataTypeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof DataTypeAttributeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((DataTypeAttributeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
if(childEditPart instanceof DataTypeOperationCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((DataTypeOperationCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -227,21 +220,14 @@ public class DataTypeEditPartCN extends ClassifierEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "DataType";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -251,12 +237,7 @@ public class DataTypeEditPartCN extends ClassifierEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -293,14 +274,11 @@ public class DataTypeEditPartCN extends ClassifierEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -319,8 +297,6 @@ public class DataTypeEditPartCN extends ClassifierEditPart {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DataTypeNameEditPartCN.VISUAL_ID));
}
-
-
/**
* @generated
*/
@@ -337,7 +313,4 @@ public class DataTypeEditPartCN extends ClassifierEditPart {
}
return super.getTargetEditPart(request);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPart.java
index d72afd0c50e..ce6e3e3f9fe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPart.java
@@ -122,7 +122,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPartCN.java
index 44c8df3f634..7d8ee346023 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPartCN.java
@@ -122,7 +122,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPart.java
index c3ac6dde8e4..ff46c867609 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPart.java
@@ -66,7 +66,6 @@ public class DataTypeOperationCompartmentEditPart extends ResizeableListCompartm
return Messages.DataTypeOperationCompartmentEditPart_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class DataTypeOperationCompartmentEditPart extends ResizeableListCompartm
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class DataTypeOperationCompartmentEditPart extends ResizeableListCompartm
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPartCN.java
index fc317f91c74..8de44cfdccc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPartCN.java
@@ -66,7 +66,6 @@ public class DataTypeOperationCompartmentEditPartCN extends ResizeableListCompar
return Messages.DataTypeOperationCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class DataTypeOperationCompartmentEditPartCN extends ResizeableListCompar
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class DataTypeOperationCompartmentEditPartCN extends ResizeableListCompar
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationEditPart.java
index 8bf1cca9870..61dc5a37713 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationEditPart.java
@@ -134,7 +134,6 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -165,7 +164,6 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT
installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new OperationLabelEditPolicy());
}
-
/**
* @generated
*/
@@ -333,7 +331,6 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -420,9 +417,7 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -455,7 +450,6 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -463,7 +457,6 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -625,7 +618,7 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT
* @generated
*/
private View getFontStyleOwnerView() {
- return (View)getModel();
+ return getPrimaryView();
}
/**
@@ -642,7 +635,6 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -727,7 +719,6 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT
}
}
-
/**
* @generated
*/
@@ -792,47 +783,14 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT
* @generated
*/
protected IFigure createFigurePrim() {
- return new OperationFigureDescriptor();
- }
-
-
- /**
- * @generated
- */
- public class OperationFigureDescriptor extends WrappingLabel {
-
-
-
-
- /**
- * @generated
- */
- public OperationFigureDescriptor() {
- this.setText("");
-
- this.setFont(THIS_FONT);
-
-
- }
-
-
-
-
-
+ return new WrappingLabel();
}
/**
* @generated
*/
- static final Font THIS_FONT = new Font(Display.getCurrent(), "Arial", 10, SWT.NORMAL);
-
-
- /**
- * @generated
- */
@Override
public boolean isSelectable() {
return getFigure().isShowing();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypePropertyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypePropertyEditPart.java
index 7da48448c3e..594880a076b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypePropertyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypePropertyEditPart.java
@@ -134,7 +134,6 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -165,7 +164,6 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe
installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new PropertyLabelEditPolicy());
}
-
/**
* @generated
*/
@@ -333,7 +331,6 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -420,9 +417,7 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -455,7 +450,6 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -463,7 +457,6 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -625,7 +618,7 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe
* @generated
*/
private View getFontStyleOwnerView() {
- return (View)getModel();
+ return getPrimaryView();
}
/**
@@ -642,7 +635,6 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -727,7 +719,6 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe
}
}
-
/**
* @generated
*/
@@ -792,47 +783,14 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe
* @generated
*/
protected IFigure createFigurePrim() {
- return new PropertyFigureDescriptor();
- }
-
-
- /**
- * @generated
- */
- public class PropertyFigureDescriptor extends WrappingLabel {
-
-
-
-
- /**
- * @generated
- */
- public PropertyFigureDescriptor() {
- this.setText("");
-
- this.setFont(THIS_FONT);
-
-
- }
-
-
-
-
-
+ return new WrappingLabel();
}
/**
* @generated
*/
- static final Font THIS_FONT = new Font(Display.getCurrent(), "Arial", 10, SWT.NORMAL);
-
-
- /**
- * @generated
- */
@Override
public boolean isSelectable() {
return getFigure().isShowing();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyAppliedStereotypeEditPart.java
index 96dba6c6a7c..8314df2f160 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyAppliedStereotypeEditPart.java
@@ -121,8 +121,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -708,7 +700,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
}
}
-
/**
* @generated
*/
@@ -738,7 +729,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
}
}
}
-
super.handleNotificationEvent(event);
}
@@ -749,5 +739,4 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im
// Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyBranchEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyBranchEditPart.java
index 259b9bc3d81..2eeaa5b7c39 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyBranchEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyBranchEditPart.java
@@ -49,10 +49,6 @@ public class DependencyBranchEditPart extends ConnectionEditPart implements ITre
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
-
-
-
-
/**
* Creates figure for this edit part.
*
@@ -71,5 +67,4 @@ public class DependencyBranchEditPart extends ConnectionEditPart implements ITre
public DashedEdgeFigure getPrimaryShape() {
return (DashedEdgeFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyEditPart.java
index 1caa6c5a8db..fb9a04c6116 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyEditPart.java
@@ -116,5 +116,4 @@ public class DependencyEditPart extends UMLConnectionNodeEditPart implements ITr
public DashedEdgeFigure getPrimaryShape() {
return (DashedEdgeFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNameEditPart.java
index f1739d68f9d..cc1d188c683 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNameEditPart.java
@@ -121,8 +121,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -631,7 +623,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -716,7 +707,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
}
}
-
/**
* @generated
*/
@@ -746,7 +736,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
}
}
}
-
super.handleNotificationEvent(event);
}
@@ -757,5 +746,4 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex
// Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNodeEditPart.java
index 4f091983536..8ca1b1b99f9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNodeEditPart.java
@@ -40,7 +40,10 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.DependencyNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.profile.edit.policies.DependencyNodeItemSemanticEditPolicy;
@@ -51,7 +54,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class DependencyNodeEditPart extends AbstractBorderedShapeEditPart {
+public class DependencyNodeEditPart extends NodeEditPart {
/**
* @generated
@@ -124,25 +127,21 @@ public class DependencyNodeEditPart extends AbstractBorderedShapeEditPart {
return lep;
}
-
-
-
/**
* @generated
*/
protected IFigure createNodeShape() {
- return primaryShape = new DependencyNodeDescriptor();
+ return primaryShape = new DependencyNodeFigure();
}
/**
* DependencyNodeDescriptor
* @generated
*/
- public DependencyNodeDescriptor getPrimaryShape() {
- return (DependencyNodeDescriptor)primaryShape;
+ public DependencyNodeFigure getPrimaryShape() {
+ return (DependencyNodeFigure)primaryShape;
}
-
/**
* @generated
*/
@@ -160,16 +159,10 @@ public class DependencyNodeEditPart extends AbstractBorderedShapeEditPart {
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Dependency";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(10, 10);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -179,12 +172,7 @@ public class DependencyNodeEditPart extends AbstractBorderedShapeEditPart {
* @generated
*/
protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -216,14 +204,11 @@ public class DependencyNodeEditPart extends AbstractBorderedShapeEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -241,54 +226,4 @@ public class DependencyNodeEditPart extends AbstractBorderedShapeEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(MultiDependencyLabelEditPart.VISUAL_ID));
}
-
-
-
-
-
- /**
- * @generated
- */
- public class DependencyNodeDescriptor extends Ellipse {
-
-
-
-
- /**
- * @generated
- */
- public DependencyNodeDescriptor() {
- this.setForegroundColor(ColorConstants.black);
- this.setBackgroundColor(ColorConstants.black);
- this.setMaximumSize(new Dimension(getMapMode().DPtoLP(10), getMapMode().DPtoLP(10)));
- this.setMinimumSize(new Dimension(getMapMode().DPtoLP(10), getMapMode().DPtoLP(10)));
- }
-
-
- /**
- * @generated
- */
- private boolean myUseLocalCoordinates = false;
-
- /**
- * @generated
- */
- protected boolean useLocalCoordinates() {
- return myUseLocalCoordinates;
- }
-
- /**
- * @generated
- */
- protected void setUseLocalCoordinates(boolean useLocalCoordinates) {
- myUseLocalCoordinates = useLocalCoordinates;
- }
-
-
-
-
-
- }
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DiagramNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DiagramNameEditPart.java
index 0ebb987382c..3379f1feb65 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DiagramNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DiagramNameEditPart.java
@@ -123,8 +123,6 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -171,7 +169,6 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit
getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
}
-
/**
* @generated
*/
@@ -339,7 +336,6 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -426,9 +422,7 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -461,7 +455,6 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -469,7 +462,6 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -648,7 +640,6 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -733,7 +724,6 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit
}
}
-
/**
* @generated
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportAliasEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportAliasEditPart.java
index a2a283a7110..cc228fa2b65 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportAliasEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportAliasEditPart.java
@@ -121,8 +121,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements
return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -631,7 +623,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -716,7 +707,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements
}
}
-
/**
* @generated
*/
@@ -746,7 +736,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements
}
}
}
-
super.handleNotificationEvent(event);
}
@@ -757,5 +746,4 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements
// Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportEditPart.java
index acee381da7f..d767be60971 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportEditPart.java
@@ -117,5 +117,4 @@ public class ElementImportEditPart extends UMLConnectionNodeEditPart implements
public DashedEdgeFigure getPrimaryShape() {
return (DashedEdgeFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPart.java
index 24bdd4c09aa..013b2adfa96 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPart.java
@@ -33,6 +33,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -121,17 +122,14 @@ public class EnumerationEditPart extends ClassifierEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -155,15 +153,12 @@ public class EnumerationEditPart extends ClassifierEditPart {
((EnumerationNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof EnumerationEnumerationLiteralCompartmentEditPart) {
IFigure pane = getPrimaryShape().getEnumerationLiteralCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((EnumerationEnumerationLiteralCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -212,21 +207,14 @@ public class EnumerationEditPart extends ClassifierEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Enumeration";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -236,12 +224,7 @@ public class EnumerationEditPart extends ClassifierEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -278,14 +261,11 @@ public class EnumerationEditPart extends ClassifierEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -304,8 +284,6 @@ public class EnumerationEditPart extends ClassifierEditPart {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(EnumerationNameEditPart.VISUAL_ID));
}
-
-
/**
* @generated
*/
@@ -319,8 +297,4 @@ public class EnumerationEditPart extends ClassifierEditPart {
}
return super.getTargetEditPart(request);
}
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPartCN.java
index 37bfe0630ea..4c98ba1ed5c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPartCN.java
@@ -33,6 +33,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -119,17 +120,14 @@ public class EnumerationEditPartCN extends ClassifierEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -153,15 +151,12 @@ public class EnumerationEditPartCN extends ClassifierEditPart {
((EnumerationNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof EnumerationEnumerationLiteralCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getEnumerationLiteralCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((EnumerationEnumerationLiteralCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -210,21 +205,14 @@ public class EnumerationEditPartCN extends ClassifierEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Enumeration";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -234,12 +222,7 @@ public class EnumerationEditPartCN extends ClassifierEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -276,14 +259,11 @@ public class EnumerationEditPartCN extends ClassifierEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -302,8 +282,6 @@ public class EnumerationEditPartCN extends ClassifierEditPart {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(EnumerationNameEditPartCN.VISUAL_ID));
}
-
-
/**
* @generated
*/
@@ -317,7 +295,4 @@ public class EnumerationEditPartCN extends ClassifierEditPart {
}
return super.getTargetEditPart(request);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java
index e70200e5ffc..b9e31186dc0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java
@@ -66,7 +66,6 @@ public class EnumerationEnumerationLiteralCompartmentEditPart extends Resizeable
return Messages.EnumerationEnumerationLiteralCompartmentEditPart_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class EnumerationEnumerationLiteralCompartmentEditPart extends Resizeable
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class EnumerationEnumerationLiteralCompartmentEditPart extends Resizeable
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java
index 0b265c9dfae..b3bbb29a596 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java
@@ -66,7 +66,6 @@ public class EnumerationEnumerationLiteralCompartmentEditPartCN extends Resizeab
return Messages.EnumerationEnumerationLiteralCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class EnumerationEnumerationLiteralCompartmentEditPartCN extends Resizeab
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class EnumerationEnumerationLiteralCompartmentEditPartCN extends Resizeab
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationLiteralEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationLiteralEditPart.java
index 875a11a6815..1234c8a2dfc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationLiteralEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationLiteralEditPart.java
@@ -131,7 +131,6 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -160,7 +159,6 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
}
-
/**
* @generated
*/
@@ -328,7 +326,6 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -415,9 +412,7 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -450,7 +445,6 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -458,7 +452,6 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -620,7 +613,7 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I
* @generated
*/
private View getFontStyleOwnerView() {
- return (View)getModel();
+ return getPrimaryView();
}
/**
@@ -637,7 +630,6 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -722,7 +714,6 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I
}
}
-
/**
* @generated
*/
@@ -787,47 +778,14 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I
* @generated
*/
protected IFigure createFigurePrim() {
- return new LiteralEnumerationDescriptor();
- }
-
-
- /**
- * @generated
- */
- public class LiteralEnumerationDescriptor extends WrappingLabel {
-
-
-
-
- /**
- * @generated
- */
- public LiteralEnumerationDescriptor() {
- this.setText("");
-
- this.setFont(THIS_FONT);
-
-
- }
-
-
-
-
-
+ return new WrappingLabel();
}
/**
* @generated
*/
- static final Font THIS_FONT = new Font(Display.getCurrent(), "Arial", 10, SWT.NORMAL);
-
-
- /**
- * @generated
- */
@Override
public boolean isSelectable() {
return getFigure().isShowing();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPart.java
index 9ee95636634..297b1ecfd5a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPart.java
@@ -122,7 +122,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPartCN.java
index 3776b29321f..0f717050b42 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPartCN.java
@@ -122,7 +122,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ExtensionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ExtensionEditPart.java
index 30dc9d24831..55aa9fa7ec0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ExtensionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ExtensionEditPart.java
@@ -50,10 +50,6 @@ public class ExtensionEditPart extends UMLConnectionNodeEditPart implements ITre
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomExtensionItemSemanticEditPolicy());
}
-
-
-
-
/**
* Creates figure for this edit part.
*
@@ -72,5 +68,4 @@ public class ExtensionEditPart extends UMLConnectionNodeEditPart implements ITre
public ExtensionFigure getPrimaryShape() {
return (ExtensionFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationAppliedStereotypeEditPart.java
index 5bbe9d3c4a8..334853310b0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationAppliedStereotypeEditPart.java
@@ -121,8 +121,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -708,7 +700,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
}
}
-
/**
* @generated
*/
@@ -738,7 +729,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
}
}
}
-
super.handleNotificationEvent(event);
}
@@ -749,5 +739,4 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar
// Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationEditPart.java
index 06c2f944afe..407eee37d78 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationEditPart.java
@@ -112,5 +112,4 @@ public class GeneralizationEditPart extends UMLConnectionNodeEditPart implements
public GeneralizationFigure getPrimaryShape() {
return (GeneralizationFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPart.java
index 5aab0be87f8..d24a5d58c12 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPart.java
@@ -31,6 +31,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -112,7 +113,6 @@ public class MetaclassEditPart extends ClassifierEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
@@ -126,10 +126,8 @@ public class MetaclassEditPart extends ClassifierEditPart {
refreshVisuals();
}
}
-
}
-
/**
* @generated
*/
@@ -153,8 +151,6 @@ public class MetaclassEditPart extends ClassifierEditPart {
((MetaclassNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -195,21 +191,14 @@ public class MetaclassEditPart extends ClassifierEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Metaclass";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -219,12 +208,7 @@ public class MetaclassEditPart extends ClassifierEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -261,14 +245,11 @@ public class MetaclassEditPart extends ClassifierEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -286,9 +267,4 @@ public class MetaclassEditPart extends ClassifierEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(MetaclassNameEditPart.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPartCN.java
index b294d9675f6..cfa78eaeae8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPartCN.java
@@ -31,6 +31,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -112,7 +113,6 @@ public class MetaclassEditPartCN extends ClassifierEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
@@ -126,10 +126,8 @@ public class MetaclassEditPartCN extends ClassifierEditPart {
refreshVisuals();
}
}
-
}
-
/**
* @generated
*/
@@ -153,8 +151,6 @@ public class MetaclassEditPartCN extends ClassifierEditPart {
((MetaclassNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -195,21 +191,14 @@ public class MetaclassEditPartCN extends ClassifierEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Metaclass";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -219,12 +208,7 @@ public class MetaclassEditPartCN extends ClassifierEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -261,14 +245,11 @@ public class MetaclassEditPartCN extends ClassifierEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -286,9 +267,4 @@ public class MetaclassEditPartCN extends ClassifierEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(MetaclassNameEditPartCN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPart.java
index 6a0479af1d0..63eed10bf85 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPart.java
@@ -122,7 +122,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPartCN.java
index 4e4e5c01920..c3445789a17 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPartCN.java
@@ -122,7 +122,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartCN.java
index d9c968d54ff..48ee62c2b3e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartCN.java
@@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -113,17 +114,14 @@ public class ModelEditPartCN extends NamedElementEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -147,15 +145,12 @@ public class ModelEditPartCN extends NamedElementEditPart {
((ModelNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ModelPackageableElementCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getPackageableElementFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ModelPackageableElementCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -204,21 +199,14 @@ public class ModelEditPartCN extends NamedElementEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Model";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -228,12 +216,7 @@ public class ModelEditPartCN extends NamedElementEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -270,14 +253,11 @@ public class ModelEditPartCN extends NamedElementEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -295,9 +275,4 @@ public class ModelEditPartCN extends NamedElementEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ModelNameEditPartCN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartTN.java
index 87dbe6c81fd..e1d2f55f23e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartTN.java
@@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -113,17 +114,14 @@ public class ModelEditPartTN extends NamedElementEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -147,15 +145,12 @@ public class ModelEditPartTN extends NamedElementEditPart {
((ModelNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ModelPackageableElementCompartmentEditPartTN) {
IFigure pane = getPrimaryShape().getPackageableElementFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ModelPackageableElementCompartmentEditPartTN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -204,21 +199,14 @@ public class ModelEditPartTN extends NamedElementEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Model";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -228,12 +216,7 @@ public class ModelEditPartTN extends NamedElementEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -270,14 +253,11 @@ public class ModelEditPartTN extends NamedElementEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -295,9 +275,4 @@ public class ModelEditPartTN extends NamedElementEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ModelNameEditPart.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPart.java
index 3658d98aae9..0406815db38 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPart.java
@@ -122,7 +122,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPartCN.java
index 847078ebd98..8bf8ae0db12 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPartCN.java
@@ -122,7 +122,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartCN.java
index 10c66008ab1..c4f8913b12d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartCN.java
@@ -53,7 +53,6 @@ public class ModelPackageableElementCompartmentEditPartCN extends ShapeCompartme
super(view);
}
-
/**
* @generated
*/
@@ -61,7 +60,6 @@ public class ModelPackageableElementCompartmentEditPartCN extends ShapeCompartme
return Messages.ModelPackageableElementCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -77,9 +75,6 @@ public class ModelPackageableElementCompartmentEditPartCN extends ShapeCompartme
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomCreationRoleEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -93,7 +88,6 @@ public class ModelPackageableElementCompartmentEditPartCN extends ShapeCompartme
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartTN.java
index 4d8ecd851f3..fa0c1f40bae 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartTN.java
@@ -53,7 +53,6 @@ public class ModelPackageableElementCompartmentEditPartTN extends ShapeCompartme
super(view);
}
-
/**
* @generated
*/
@@ -61,7 +60,6 @@ public class ModelPackageableElementCompartmentEditPartTN extends ShapeCompartme
return Messages.ModelPackageableElementCompartmentEditPartTN_title;
}
-
/**
* @generated
*/
@@ -77,9 +75,6 @@ public class ModelPackageableElementCompartmentEditPartTN extends ShapeCompartme
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomCreationRoleEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -93,7 +88,6 @@ public class ModelPackageableElementCompartmentEditPartTN extends ShapeCompartme
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MultiDependencyLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MultiDependencyLabelEditPart.java
index 2c137d96115..8cd212aa799 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MultiDependencyLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MultiDependencyLabelEditPart.java
@@ -122,8 +122,6 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -170,7 +168,6 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText
getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
}
-
/**
* @generated
*/
@@ -338,7 +335,6 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -425,9 +421,7 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -460,7 +454,6 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -468,7 +461,6 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -647,7 +639,6 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -732,7 +723,6 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText
}
}
-
/**
* @generated
*/
@@ -780,5 +770,4 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText
protected IFigure createFigurePrim() {
return new WrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPart.java
index aad02c5a9c0..4f345a47a43 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPart.java
@@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -113,17 +114,14 @@ public class PackageEditPart extends NamedElementEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -147,15 +145,12 @@ public class PackageEditPart extends NamedElementEditPart {
((PackageNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof PackagePackageableElementCompartmentEditPart) {
IFigure pane = getPrimaryShape().getPackageableElementFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((PackagePackageableElementCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -204,21 +199,14 @@ public class PackageEditPart extends NamedElementEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Package";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -228,12 +216,7 @@ public class PackageEditPart extends NamedElementEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -270,14 +253,11 @@ public class PackageEditPart extends NamedElementEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -295,9 +275,4 @@ public class PackageEditPart extends NamedElementEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(PackageNameEditPart.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPartCN.java
index f8bb9075a1c..637b54831e5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPartCN.java
@@ -31,6 +31,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -117,17 +118,14 @@ public class PackageEditPartCN extends NamedElementEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -151,15 +149,12 @@ public class PackageEditPartCN extends NamedElementEditPart {
((PackageNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof PackagePackageableElementCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getPackageableElementFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((PackagePackageableElementCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -208,21 +203,14 @@ public class PackageEditPartCN extends NamedElementEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Package";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -232,12 +220,7 @@ public class PackageEditPartCN extends NamedElementEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -274,14 +257,11 @@ public class PackageEditPartCN extends NamedElementEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -299,9 +279,4 @@ public class PackageEditPartCN extends NamedElementEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(PackageNameEditPartCN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportAppliedStereotypeEditPart.java
index 3232dbccac6..8c9085a8504 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportAppliedStereotypeEditPart.java
@@ -121,8 +121,6 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart
return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -708,7 +700,6 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart
}
}
-
/**
* @generated
*/
@@ -738,7 +729,6 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart
}
}
}
-
super.handleNotificationEvent(event);
}
@@ -749,5 +739,4 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart
// Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportEditPart.java
index 47a688ebe18..5d8c295c200 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportEditPart.java
@@ -111,5 +111,4 @@ public class PackageImportEditPart extends UMLConnectionNodeEditPart implements
public DashedEdgeFigure getPrimaryShape() {
return (DashedEdgeFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPart.java
index f16650a83df..ffef0cbe88f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPart.java
@@ -122,7 +122,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPartCN.java
index f984efc0f2b..586a0bb3702 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPartCN.java
@@ -122,7 +122,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPart.java
index 3abeec1e518..8225d880562 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPart.java
@@ -52,7 +52,6 @@ public class PackagePackageableElementCompartmentEditPart extends ShapeCompartme
super(view);
}
-
/**
* @generated
*/
@@ -60,7 +59,6 @@ public class PackagePackageableElementCompartmentEditPart extends ShapeCompartme
return Messages.PackagePackageableElementCompartmentEditPart_title;
}
-
/**
* @generated
*/
@@ -75,9 +73,6 @@ public class PackagePackageableElementCompartmentEditPart extends ShapeCompartme
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomCreationRoleEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -91,7 +86,6 @@ public class PackagePackageableElementCompartmentEditPart extends ShapeCompartme
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPartCN.java
index c86baabcf92..98b0207075e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPartCN.java
@@ -52,7 +52,6 @@ public class PackagePackageableElementCompartmentEditPartCN extends ShapeCompart
super(view);
}
-
/**
* @generated
*/
@@ -60,7 +59,6 @@ public class PackagePackageableElementCompartmentEditPartCN extends ShapeCompart
return Messages.PackagePackageableElementCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -75,9 +73,6 @@ public class PackagePackageableElementCompartmentEditPartCN extends ShapeCompart
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomCreationRoleEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -91,7 +86,6 @@ public class PackagePackageableElementCompartmentEditPartCN extends ShapeCompart
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPart.java
index b31fc91a344..72f6d2700bf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPart.java
@@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -111,17 +112,14 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -145,8 +143,6 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
((PrimitiveTypeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -187,21 +183,14 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "PrimitiveType";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -211,12 +200,7 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -253,14 +237,11 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -278,9 +259,4 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPart.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java
index 9eec1fd62ea..5caa875a776 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java
@@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -111,17 +112,14 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -145,8 +143,6 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart {
((PrimitiveTypeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -187,21 +183,14 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "PrimitiveType";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -211,12 +200,7 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -253,14 +237,11 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -278,9 +259,4 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPartCN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPart.java
index 42fa38fad2f..fc92b7e8b1c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPart.java
@@ -61,6 +61,7 @@ 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.infra.emf.appearance.helper.AppearanceHelper;
import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
@@ -126,7 +127,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -144,7 +144,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -246,7 +245,7 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
for(View view : views) {
- if(NameLabelIconHelper.showLabelIcon(view)) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -322,7 +321,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +407,7 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +440,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +447,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -631,7 +625,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -716,7 +709,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
}
}
-
/**
* @generated
*/
@@ -733,7 +725,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -778,13 +769,11 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -798,7 +787,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -807,16 +795,12 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPartCN.java
index 05011f7d133..0eae6d1c23f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPartCN.java
@@ -61,6 +61,7 @@ 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.infra.emf.appearance.helper.AppearanceHelper;
import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
@@ -126,7 +127,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -144,7 +144,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -246,7 +245,7 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
}
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
for(View view : views) {
- if(NameLabelIconHelper.showLabelIcon(view)) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -322,7 +321,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +407,7 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +440,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +447,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -631,7 +625,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -716,7 +709,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
}
}
-
/**
* @generated
*/
@@ -733,7 +725,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -778,13 +769,11 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -798,7 +787,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -807,16 +795,12 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileApplicationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileApplicationEditPart.java
index 74e06f5729b..23a1a1dc1b3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileApplicationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileApplicationEditPart.java
@@ -46,10 +46,6 @@ public class ProfileApplicationEditPart extends UMLConnectionNodeEditPart implem
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ProfileApplicationItemSemanticEditPolicy());
}
-
-
-
-
/**
* Creates figure for this edit part.
*
@@ -68,5 +64,4 @@ public class ProfileApplicationEditPart extends UMLConnectionNodeEditPart implem
public DashedEdgeFigure getPrimaryShape() {
return (DashedEdgeFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileDiagramEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileDiagramEditPart.java
index eb13d3b6ce5..9f36f7316d3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileDiagramEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileDiagramEditPart.java
@@ -50,17 +50,12 @@ public class ProfileDiagramEditPart extends PapyrusDiagramEditPart {
*/
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
-
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
-
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ProfileDiagramItemSemanticEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomCreationRoleEditPolicy());
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartCN.java
index c15a360a54c..c0b51459c08 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartCN.java
@@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -113,17 +114,14 @@ public class ProfileEditPartCN extends NamedElementEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -147,15 +145,12 @@ public class ProfileEditPartCN extends NamedElementEditPart {
((ProfileNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ProfilePackageableElementCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getPackageableElementFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ProfilePackageableElementCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -204,21 +199,14 @@ public class ProfileEditPartCN extends NamedElementEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Profile";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -228,12 +216,7 @@ public class ProfileEditPartCN extends NamedElementEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -270,14 +253,11 @@ public class ProfileEditPartCN extends NamedElementEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -295,9 +275,4 @@ public class ProfileEditPartCN extends NamedElementEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ProfileNameEditPartCN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartTN.java
index 7a1c2358cd8..d39a6930296 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartTN.java
@@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -113,17 +114,14 @@ public class ProfileEditPartTN extends NamedElementEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -147,15 +145,12 @@ public class ProfileEditPartTN extends NamedElementEditPart {
((ProfileNameEditPartTN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ProfilePackageableElementCompartmentEditPartTN) {
IFigure pane = getPrimaryShape().getPackageableElementFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ProfilePackageableElementCompartmentEditPartTN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -204,21 +199,14 @@ public class ProfileEditPartTN extends NamedElementEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Profile";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -228,12 +216,7 @@ public class ProfileEditPartTN extends NamedElementEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -270,14 +253,11 @@ public class ProfileEditPartTN extends NamedElementEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -295,9 +275,4 @@ public class ProfileEditPartTN extends NamedElementEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ProfileNameEditPartTN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartCN.java
index f38de49e71c..bfe120a2b6d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartCN.java
@@ -122,7 +122,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartTN.java
index 5b36defa6a5..b4f165a9cb3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartTN.java
@@ -122,7 +122,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartCN.java
index 3b967ff87d7..970450ebeed 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartCN.java
@@ -52,7 +52,6 @@ public class ProfilePackageableElementCompartmentEditPartCN extends ShapeCompart
super(view);
}
-
/**
* @generated
*/
@@ -60,7 +59,6 @@ public class ProfilePackageableElementCompartmentEditPartCN extends ShapeCompart
return Messages.ProfilePackageableElementCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -75,9 +73,6 @@ public class ProfilePackageableElementCompartmentEditPartCN extends ShapeCompart
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomCreationRoleEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -91,7 +86,6 @@ public class ProfilePackageableElementCompartmentEditPartCN extends ShapeCompart
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartTN.java
index be9bf7869eb..03f39ce72a4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartTN.java
@@ -52,7 +52,6 @@ public class ProfilePackageableElementCompartmentEditPartTN extends ShapeCompart
super(view);
}
-
/**
* @generated
*/
@@ -60,7 +59,6 @@ public class ProfilePackageableElementCompartmentEditPartTN extends ShapeCompart
return Messages.ProfilePackageableElementCompartmentEditPartTN_title;
}
-
/**
* @generated
*/
@@ -75,9 +73,6 @@ public class ProfilePackageableElementCompartmentEditPartTN extends ShapeCompart
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomCreationRoleEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -91,7 +86,6 @@ public class ProfilePackageableElementCompartmentEditPartTN extends ShapeCompart
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ShortCutDiagramEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ShortCutDiagramEditPart.java
index b7f2ccdf91d..69353c7f897 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ShortCutDiagramEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ShortCutDiagramEditPart.java
@@ -40,6 +40,7 @@ import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortCutDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShortCutDiagramEditPolicy;
@@ -130,7 +131,6 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
@@ -150,10 +150,8 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart {
}
}
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -169,7 +167,6 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart {
return (DiagramNodeFigure)primaryShape;
}
-
/**
* @generated
*/
@@ -187,16 +184,10 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart {
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "ShortCutDiagram";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(20, 20);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -206,12 +197,7 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart {
* @generated
*/
protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -243,14 +229,11 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -268,9 +251,4 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart {
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DiagramNameEditPart.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPart.java
index 6a91b10cfb8..db3bf16ecdf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPart.java
@@ -66,7 +66,6 @@ public class StereotypeAttributeCompartmentEditPart extends ResizeableListCompar
return Messages.StereotypeAttributeCompartmentEditPart_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class StereotypeAttributeCompartmentEditPart extends ResizeableListCompar
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class StereotypeAttributeCompartmentEditPart extends ResizeableListCompar
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPartCN.java
index 04a89d851b2..512580eb161 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPartCN.java
@@ -66,7 +66,6 @@ public class StereotypeAttributeCompartmentEditPartCN extends ResizeableListComp
return Messages.StereotypeAttributeCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class StereotypeAttributeCompartmentEditPartCN extends ResizeableListComp
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class StereotypeAttributeCompartmentEditPartCN extends ResizeableListComp
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPart.java
index cc812cac391..b542bcdee42 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPart.java
@@ -34,6 +34,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy;
@@ -122,7 +123,6 @@ public class StereotypeEditPart extends ClassifierEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
@@ -136,10 +136,8 @@ public class StereotypeEditPart extends ClassifierEditPart {
refreshVisuals();
}
}
-
}
-
/**
* @generated
*/
@@ -163,22 +161,18 @@ public class StereotypeEditPart extends ClassifierEditPart {
((StereotypeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof StereotypeAttributeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((StereotypeAttributeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
if(childEditPart instanceof StereotypeOperationCompartmentEditPart) {
IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((StereotypeOperationCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -235,21 +229,14 @@ public class StereotypeEditPart extends ClassifierEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Stereotype";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -259,12 +246,7 @@ public class StereotypeEditPart extends ClassifierEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -301,14 +283,11 @@ public class StereotypeEditPart extends ClassifierEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -327,8 +306,6 @@ public class StereotypeEditPart extends ClassifierEditPart {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(StereotypeNameEditPart.VISUAL_ID));
}
-
-
/**
* @generated
*/
@@ -345,8 +322,4 @@ public class StereotypeEditPart extends ClassifierEditPart {
}
return super.getTargetEditPart(request);
}
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPartCN.java
index 072b4416aae..ce1142beb52 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPartCN.java
@@ -34,6 +34,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy;
@@ -122,7 +123,6 @@ public class StereotypeEditPartCN extends ClassifierEditPart {
return lep;
}
-
/**
*Papyrus codeGen
*@generated
@@ -136,10 +136,8 @@ public class StereotypeEditPartCN extends ClassifierEditPart {
refreshVisuals();
}
}
-
}
-
/**
* @generated
*/
@@ -163,22 +161,18 @@ public class StereotypeEditPartCN extends ClassifierEditPart {
((StereotypeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof StereotypeAttributeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((StereotypeAttributeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
if(childEditPart instanceof StereotypeOperationCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((StereotypeOperationCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -235,21 +229,14 @@ public class StereotypeEditPartCN extends ClassifierEditPart {
return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Stereotype";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -259,12 +246,7 @@ public class StereotypeEditPartCN extends ClassifierEditPart {
* @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -301,14 +283,11 @@ public class StereotypeEditPartCN extends ClassifierEditPart {
}
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -327,8 +306,6 @@ public class StereotypeEditPartCN extends ClassifierEditPart {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(StereotypeNameEditPartCN.VISUAL_ID));
}
-
-
/**
* @generated
*/
@@ -345,7 +322,4 @@ public class StereotypeEditPartCN extends ClassifierEditPart {
}
return super.getTargetEditPart(request);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPart.java
index b022e39d148..f19d066cf02 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPart.java
@@ -122,7 +122,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPartCN.java
index 24e9df037c9..518b874f996 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPartCN.java
@@ -122,7 +122,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme
*/
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme
if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme
}
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme
removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme
return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme
*/
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme
public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPart.java
index a20a190c15e..33ca2464088 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPart.java
@@ -66,7 +66,6 @@ public class StereotypeOperationCompartmentEditPart extends ResizeableListCompar
return Messages.StereotypeOperationCompartmentEditPart_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class StereotypeOperationCompartmentEditPart extends ResizeableListCompar
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class StereotypeOperationCompartmentEditPart extends ResizeableListCompar
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPartCN.java
index 009f6f2f6de..b6a9cbb6fcf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPartCN.java
@@ -66,7 +66,6 @@ public class StereotypeOperationCompartmentEditPartCN extends ResizeableListComp
return Messages.StereotypeOperationCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class StereotypeOperationCompartmentEditPartCN extends ResizeableListComp
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class StereotypeOperationCompartmentEditPartCN extends ResizeableListComp
* @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/UMLEditPartFactory.java
index d5a74bef912..33d2fdafeef 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/UMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/UMLEditPartFactory.java
@@ -39,303 +39,212 @@ public class UMLEditPartFactory implements EditPartFactory {
if(model instanceof View) {
View view = (View)model;
switch(UMLVisualIDRegistry.getVisualID(view)) {
-
case ProfileDiagramEditPart.VISUAL_ID:
return new ProfileDiagramEditPart(view);
-
case DependencyNodeEditPart.VISUAL_ID:
return new DependencyNodeEditPart(view);
-
case MultiDependencyLabelEditPart.VISUAL_ID:
return new MultiDependencyLabelEditPart(view);
-
case AssociationNodeEditPart.VISUAL_ID:
return new AssociationNodeEditPart(view);
-
case StereotypeEditPart.VISUAL_ID:
return new StereotypeEditPart(view);
-
case StereotypeNameEditPart.VISUAL_ID:
return new StereotypeNameEditPart(view);
-
+ case ClassEditPart.VISUAL_ID:
+ return new ClassEditPart(view);
+ case ClassNameEditPart.VISUAL_ID:
+ return new ClassNameEditPart(view);
case MetaclassEditPart.VISUAL_ID:
return new MetaclassEditPart(view);
-
case MetaclassNameEditPart.VISUAL_ID:
return new MetaclassNameEditPart(view);
-
case CommentEditPart.VISUAL_ID:
return new CommentEditPart(view);
-
case CommentBodyEditPart.VISUAL_ID:
return new CommentBodyEditPart(view);
-
case ConstraintEditPart.VISUAL_ID:
return new ConstraintEditPart(view);
-
case ConstraintNameEditPart.VISUAL_ID:
return new ConstraintNameEditPart(view);
-
case ConstraintBodyEditPart.VISUAL_ID:
return new ConstraintBodyEditPart(view);
-
case ModelEditPartTN.VISUAL_ID:
return new ModelEditPartTN(view);
-
case ModelNameEditPart.VISUAL_ID:
return new ModelNameEditPart(view);
-
case ProfileEditPartTN.VISUAL_ID:
return new ProfileEditPartTN(view);
-
case ProfileNameEditPartTN.VISUAL_ID:
return new ProfileNameEditPartTN(view);
-
case PackageEditPart.VISUAL_ID:
return new PackageEditPart(view);
-
case PackageNameEditPart.VISUAL_ID:
return new PackageNameEditPart(view);
-
case EnumerationEditPart.VISUAL_ID:
return new EnumerationEditPart(view);
-
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);
-
case DataTypeNameEditPart.VISUAL_ID:
return new DataTypeNameEditPart(view);
-
case ShortCutDiagramEditPart.VISUAL_ID:
return new ShortCutDiagramEditPart(view);
-
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);
-
case EnumerationLiteralEditPart.VISUAL_ID:
return new EnumerationLiteralEditPart(view);
-
case DataTypePropertyEditPart.VISUAL_ID:
return new DataTypePropertyEditPart(view);
-
case ClassPropertyEditPart.VISUAL_ID:
return new ClassPropertyEditPart(view);
-
case ClassOperationEditPart.VISUAL_ID:
return new ClassOperationEditPart(view);
-
case StereotypeEditPartCN.VISUAL_ID:
return new StereotypeEditPartCN(view);
-
case StereotypeNameEditPartCN.VISUAL_ID:
return new StereotypeNameEditPartCN(view);
-
+ case ClassEditPartCN.VISUAL_ID:
+ return new ClassEditPartCN(view);
+ case ClassNameEditPartCN.VISUAL_ID:
+ return new ClassNameEditPartCN(view);
case MetaclassEditPartCN.VISUAL_ID:
return new MetaclassEditPartCN(view);
-
case MetaclassNameEditPartCN.VISUAL_ID:
return new MetaclassNameEditPartCN(view);
-
case CommentEditPartCN.VISUAL_ID:
return new CommentEditPartCN(view);
-
case CommentBodyEditPartCN.VISUAL_ID:
return new CommentBodyEditPartCN(view);
-
case ModelEditPartCN.VISUAL_ID:
return new ModelEditPartCN(view);
-
case ModelNameEditPartCN.VISUAL_ID:
return new ModelNameEditPartCN(view);
-
case ProfileEditPartCN.VISUAL_ID:
return new ProfileEditPartCN(view);
-
case ProfileNameEditPartCN.VISUAL_ID:
return new ProfileNameEditPartCN(view);
-
case PackageEditPartCN.VISUAL_ID:
return new PackageEditPartCN(view);
-
case PackageNameEditPartCN.VISUAL_ID:
return new PackageNameEditPartCN(view);
-
case ConstraintEditPartCN.VISUAL_ID:
return new ConstraintEditPartCN(view);
-
case ConstraintNameEditPartCN.VISUAL_ID:
return new ConstraintNameEditPartCN(view);
-
case ConstraintBodyEditPartCN.VISUAL_ID:
return new ConstraintBodyEditPartCN(view);
-
case EnumerationEditPartCN.VISUAL_ID:
return new EnumerationEditPartCN(view);
-
case EnumerationNameEditPartCN.VISUAL_ID:
return new EnumerationNameEditPartCN(view);
-
case DataTypeEditPartCN.VISUAL_ID:
return new DataTypeEditPartCN(view);
-
case DataTypeNameEditPartCN.VISUAL_ID:
return new DataTypeNameEditPartCN(view);
-
case PackagePackageableElementCompartmentEditPart.VISUAL_ID:
return new PackagePackageableElementCompartmentEditPart(view);
-
case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
return new PackagePackageableElementCompartmentEditPartCN(view);
-
case ProfilePackageableElementCompartmentEditPartTN.VISUAL_ID:
return new ProfilePackageableElementCompartmentEditPartTN(view);
-
case ProfilePackageableElementCompartmentEditPartCN.VISUAL_ID:
return new ProfilePackageableElementCompartmentEditPartCN(view);
-
case StereotypeAttributeCompartmentEditPart.VISUAL_ID:
return new StereotypeAttributeCompartmentEditPart(view);
-
case StereotypeAttributeCompartmentEditPartCN.VISUAL_ID:
return new StereotypeAttributeCompartmentEditPartCN(view);
-
case StereotypeOperationCompartmentEditPart.VISUAL_ID:
return new StereotypeOperationCompartmentEditPart(view);
-
case StereotypeOperationCompartmentEditPartCN.VISUAL_ID:
return new StereotypeOperationCompartmentEditPartCN(view);
-
case ModelPackageableElementCompartmentEditPartTN.VISUAL_ID:
return new ModelPackageableElementCompartmentEditPartTN(view);
-
case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
return new ModelPackageableElementCompartmentEditPartCN(view);
-
case EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID:
return new EnumerationEnumerationLiteralCompartmentEditPartCN(view);
-
case EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID:
return new EnumerationEnumerationLiteralCompartmentEditPart(view);
-
case DataTypeAttributeCompartmentEditPart.VISUAL_ID:
return new DataTypeAttributeCompartmentEditPart(view);
-
case DataTypeAttributeCompartmentEditPartCN.VISUAL_ID:
return new DataTypeAttributeCompartmentEditPartCN(view);
-
case DataTypeOperationCompartmentEditPart.VISUAL_ID:
return new DataTypeOperationCompartmentEditPart(view);
-
case DataTypeOperationCompartmentEditPartCN.VISUAL_ID:
return new DataTypeOperationCompartmentEditPartCN(view);
-
+ case ClassAttributeCompartmentEditPart.VISUAL_ID:
+ return new ClassAttributeCompartmentEditPart(view);
+ case ClassAttributeCompartmentEditPartCN.VISUAL_ID:
+ return new ClassAttributeCompartmentEditPartCN(view);
+ case ClassOperationCompartmentEditPart.VISUAL_ID:
+ return new ClassOperationCompartmentEditPart(view);
+ case ClassOperationCompartmentEditPartCN.VISUAL_ID:
+ return new ClassOperationCompartmentEditPartCN(view);
case ExtensionEditPart.VISUAL_ID:
return new ExtensionEditPart(view);
-
-
case AssociationEditPart.VISUAL_ID:
return new AssociationEditPart(view);
-
case AssociationAppliedStereotypeEditPart.VISUAL_ID:
return new AssociationAppliedStereotypeEditPart(view);
-
case AssociationNameEditPart.VISUAL_ID:
return new AssociationNameEditPart(view);
-
case AssociationRoleTargetEditPart.VISUAL_ID:
return new AssociationRoleTargetEditPart(view);
-
case AssociationRoleSourceEditPart.VISUAL_ID:
return new AssociationRoleSourceEditPart(view);
-
case AssociationMultiplicitySourceEditPart.VISUAL_ID:
return new AssociationMultiplicitySourceEditPart(view);
-
case AssociationMultiplicityTargetEditPart.VISUAL_ID:
return new AssociationMultiplicityTargetEditPart(view);
-
-
case ProfileApplicationEditPart.VISUAL_ID:
return new ProfileApplicationEditPart(view);
-
-
case AssociationBranchEditPart.VISUAL_ID:
return new AssociationBranchEditPart(view);
-
case AssociationBranchRoleEditPart.VISUAL_ID:
return new AssociationBranchRoleEditPart(view);
-
case AssociationBranchMultiplicityEditPart.VISUAL_ID:
return new AssociationBranchMultiplicityEditPart(view);
-
-
case GeneralizationEditPart.VISUAL_ID:
return new GeneralizationEditPart(view);
-
case GeneralizationAppliedStereotypeEditPart.VISUAL_ID:
return new GeneralizationAppliedStereotypeEditPart(view);
-
-
case DependencyEditPart.VISUAL_ID:
return new DependencyEditPart(view);
-
case DependencyNameEditPart.VISUAL_ID:
return new DependencyNameEditPart(view);
-
case DependencyAppliedStereotypeEditPart.VISUAL_ID:
return new DependencyAppliedStereotypeEditPart(view);
-
-
case DependencyBranchEditPart.VISUAL_ID:
return new DependencyBranchEditPart(view);
-
-
case ElementImportEditPart.VISUAL_ID:
return new ElementImportEditPart(view);
-
case ElementImportAliasEditPart.VISUAL_ID:
return new ElementImportAliasEditPart(view);
-
case AppliedStereotypeElementImportEditPart.VISUAL_ID:
return new AppliedStereotypeElementImportEditPart(view);
-
-
case PackageImportEditPart.VISUAL_ID:
return new PackageImportEditPart(view);
-
case PackageImportAppliedStereotypeEditPart.VISUAL_ID:
return new PackageImportAppliedStereotypeEditPart(view);
-
-
case CommentAnnotatedElementEditPart.VISUAL_ID:
return new CommentAnnotatedElementEditPart(view);
-
-
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return new ConstraintConstrainedElementEditPart(view);
-
-
case ContextLinkEditPart.VISUAL_ID:
return new ContextLinkEditPart(view);
-
}
}
return createUnrecognizedEditPart(context, model);
@@ -357,11 +266,9 @@ public class UMLEditPartFactory implements EditPartFactory {
return new MultilineCellEditorLocator((IMultilineEditableFigure)source.getFigure());
} else {
return CellEditorLocatorAccess.INSTANCE.getTextCellEditorLocator(source);
-
}
}
-
/**
* @generated
*/
@@ -403,5 +310,4 @@ public class UMLEditPartFactory implements EditPartFactory {
}
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java
index abadefbd1f4..f11f46670ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java
@@ -72,7 +72,6 @@ public class AssociationBranchItemSemanticEditPolicy extends UMLBaseItemSemantic
super(UMLElementTypes.Association_4019);
}
-
/**
* @generated
*/
@@ -87,7 +86,6 @@ public class AssociationBranchItemSemanticEditPolicy extends UMLBaseItemSemantic
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -293,5 +291,4 @@ public class AssociationBranchItemSemanticEditPolicy extends UMLBaseItemSemantic
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java
index 43ce16eec12..efa62ed52d1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java
@@ -72,7 +72,6 @@ public class AssociationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
super(UMLElementTypes.Association_4001);
}
-
/**
* @generated
*/
@@ -87,7 +86,6 @@ public class AssociationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -293,5 +291,4 @@ public class AssociationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java
index 99ae290849a..1f41c5400dc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java
@@ -74,8 +74,6 @@ public class AssociationNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEd
super(UMLElementTypes.Association_2015);
}
-
-
/**
* @generated
*/
@@ -98,8 +96,6 @@ public class AssociationNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEd
return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -305,5 +301,4 @@ public class AssociationNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEd
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicy.java
new file mode 100644
index 00000000000..1eda0c59a65
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicy.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassPropertyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ClassAttributeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ClassAttributeCompartmentItemSemanticEditPolicy() {
+ super(UMLElementTypes.Class_2008);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return super.getCreateCommand(req);
+ }
+ if(UMLElementTypes.Property_3002 == requestElementType) {
+ return getGEFWrapper(new ClassPropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
+ }
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicyCN.java
new file mode 100644
index 00000000000..c552dff164b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicyCN.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassPropertyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ClassAttributeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ClassAttributeCompartmentItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Class_3010);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return super.getCreateCommand(req);
+ }
+ if(UMLElementTypes.Property_3002 == requestElementType) {
+ return getGEFWrapper(new ClassPropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
+ }
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassItemSemanticEditPolicyCN.java
new file mode 100644
index 00000000000..dbf6e48d70f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassItemSemanticEditPolicyCN.java
@@ -0,0 +1,373 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.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.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+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.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationBranchReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ElementImportCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ElementImportReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ExtensionCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ExtensionReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.GeneralizationReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.PackageImportCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.PackageImportReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassAttributeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ExtensionEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageImportEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ClassItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ClassItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Class_3010);
+ }
+
+ /**
+ * @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
+ addDestroyChildNodesCommand(cmd);
+ 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 void addDestroyChildNodesCommand(ICompositeCommand cmd) {
+ View view = (View)getHost().getModel();
+ for(Iterator<?> nit = view.getChildren().iterator(); nit.hasNext();) {
+ Node node = (Node)nit.next();
+ switch(UMLVisualIDRegistry.getVisualID(node)) {
+ case ClassAttributeCompartmentEditPartCN.VISUAL_ID:
+ for(Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node)cit.next();
+ switch(UMLVisualIDRegistry.getVisualID(cnode)) {
+ case ClassPropertyEditPart.VISUAL_ID:
+ for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
+ Edge outgoingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
+ }
+ }
+ 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;
+ }
+ }
+ break;
+ case ClassOperationCompartmentEditPartCN.VISUAL_ID:
+ for(Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node)cit.next();
+ switch(UMLVisualIDRegistry.getVisualID(cnode)) {
+ case ClassOperationEditPart.VISUAL_ID:
+ for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
+ Edge outgoingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
+ }
+ }
+ 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;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * @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) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return null;
+ }
+ IElementType baseElementType = requestElementType;
+ boolean isExtendedType = false;
+ if(requestElementType instanceof IExtendedHintedElementType) {
+ baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
+ if(baseElementType != null) {
+ isExtendedType = true;
+ } else {
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
+ baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
+ isExtendedType = true;
+ }
+ }
+ if(UMLElementTypes.Extension_1013 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.Association_4001 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4019 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Generalization_4002 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4008 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4018 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ElementImport_1064 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ElementImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.PackageImport_1065 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new PackageImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.CommentAnnotatedElement_1022 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return null;
+ }
+ IElementType baseElementType = requestElementType;
+ boolean isExtendedType = false;
+ if(requestElementType instanceof IExtendedHintedElementType) {
+ baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
+ if(baseElementType != null) {
+ isExtendedType = true;
+ } else {
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
+ baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
+ isExtendedType = true;
+ }
+ }
+ if(UMLElementTypes.Extension_1013 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ExtensionCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4001 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4019 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Generalization_4002 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4008 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4018 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ElementImport_1064 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ElementImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.PackageImport_1065 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.CommentAnnotatedElement_1022 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(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 ExtensionEditPart.VISUAL_ID:
+ return getGEFWrapper(new ExtensionReorientCommand(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));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationCompartmentItemSemanticEditPolicy.java
new file mode 100644
index 00000000000..19e0953d970
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationCompartmentItemSemanticEditPolicy.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassOperationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ClassOperationCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ClassOperationCompartmentItemSemanticEditPolicy() {
+ super(UMLElementTypes.Class_2008);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return super.getCreateCommand(req);
+ }
+ if(UMLElementTypes.Operation_3020 == requestElementType) {
+ return getGEFWrapper(new ClassOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
+ }
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationCompartmentItemSemanticEditPolicyCN.java
new file mode 100644
index 00000000000..d5eee625610
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationCompartmentItemSemanticEditPolicyCN.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassOperationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ClassOperationCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ClassOperationCompartmentItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Class_3010);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return super.getCreateCommand(req);
+ }
+ if(UMLElementTypes.Operation_3020 == requestElementType) {
+ return getGEFWrapper(new ClassOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
+ }
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationItemSemanticEditPolicy.java
index 23e37f57d33..9c1604ec0b2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationItemSemanticEditPolicy.java
@@ -38,8 +38,6 @@ public class ClassOperationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
super(UMLElementTypes.Operation_3020);
}
-
-
/**
* @generated
*/
@@ -61,6 +59,4 @@ public class ClassOperationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
}
return getGEFWrapper(cmd.reduce());
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassPropertyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassPropertyItemSemanticEditPolicy.java
index 486ee9652c6..fc69483d018 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassPropertyItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassPropertyItemSemanticEditPolicy.java
@@ -38,8 +38,6 @@ public class ClassPropertyItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
super(UMLElementTypes.Property_3002);
}
-
-
/**
* @generated
*/
@@ -61,6 +59,4 @@ public class ClassPropertyItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
}
return getGEFWrapper(cmd.reduce());
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClasseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClasseItemSemanticEditPolicy.java
new file mode 100644
index 00000000000..972f4875f8e
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClasseItemSemanticEditPolicy.java
@@ -0,0 +1,373 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.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.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+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.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationBranchReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ElementImportCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ElementImportReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ExtensionCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ExtensionReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.GeneralizationReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.PackageImportCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.PackageImportReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassAttributeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ExtensionEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageImportEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ClasseItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ClasseItemSemanticEditPolicy() {
+ super(UMLElementTypes.Class_2008);
+ }
+
+ /**
+ * @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
+ addDestroyChildNodesCommand(cmd);
+ 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 void addDestroyChildNodesCommand(ICompositeCommand cmd) {
+ View view = (View)getHost().getModel();
+ for(Iterator<?> nit = view.getChildren().iterator(); nit.hasNext();) {
+ Node node = (Node)nit.next();
+ switch(UMLVisualIDRegistry.getVisualID(node)) {
+ case ClassOperationCompartmentEditPart.VISUAL_ID:
+ for(Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node)cit.next();
+ switch(UMLVisualIDRegistry.getVisualID(cnode)) {
+ case ClassOperationEditPart.VISUAL_ID:
+ for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
+ Edge outgoingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
+ }
+ }
+ 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;
+ }
+ }
+ break;
+ case ClassAttributeCompartmentEditPart.VISUAL_ID:
+ for(Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node)cit.next();
+ switch(UMLVisualIDRegistry.getVisualID(cnode)) {
+ case ClassPropertyEditPart.VISUAL_ID:
+ for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
+ Edge outgoingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
+ }
+ }
+ 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;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * @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) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return null;
+ }
+ IElementType baseElementType = requestElementType;
+ boolean isExtendedType = false;
+ if(requestElementType instanceof IExtendedHintedElementType) {
+ baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
+ if(baseElementType != null) {
+ isExtendedType = true;
+ } else {
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
+ baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
+ isExtendedType = true;
+ }
+ }
+ if(UMLElementTypes.Extension_1013 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.Association_4001 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4019 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Generalization_4002 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4008 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4018 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ElementImport_1064 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ElementImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.PackageImport_1065 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new PackageImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.CommentAnnotatedElement_1022 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return null;
+ }
+ IElementType baseElementType = requestElementType;
+ boolean isExtendedType = false;
+ if(requestElementType instanceof IExtendedHintedElementType) {
+ baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
+ if(baseElementType != null) {
+ isExtendedType = true;
+ } else {
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
+ baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
+ isExtendedType = true;
+ }
+ }
+ if(UMLElementTypes.Extension_1013 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ExtensionCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4001 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4019 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Generalization_4002 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4008 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4018 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ElementImport_1064 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ElementImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.PackageImport_1065 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.CommentAnnotatedElement_1022 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(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 ExtensionEditPart.VISUAL_ID:
+ return getGEFWrapper(new ExtensionReorientCommand(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));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
index 204c25cb190..dd2cc469ad0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
@@ -36,5 +36,4 @@ public class CommentAnnotatedElementItemSemanticEditPolicy extends UMLBaseItemSe
protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
return getGEFWrapper(new DestroyReferenceCommand(req));
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentEditPartItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentEditPartItemSemanticEditPolicy.java
index 3682f47cfb9..fbd51f27f3c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentEditPartItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentEditPartItemSemanticEditPolicy.java
@@ -49,8 +49,6 @@ public class CommentEditPartItemSemanticEditPolicy extends UMLBaseItemSemanticEd
super(UMLElementTypes.Comment_1002);
}
-
-
/**
* @generated
*/
@@ -73,8 +71,6 @@ public class CommentEditPartItemSemanticEditPolicy extends UMLBaseItemSemanticEd
return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -165,5 +161,4 @@ public class CommentEditPartItemSemanticEditPolicy extends UMLBaseItemSemanticEd
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentItemSemanticEditPolicyCN.java
index 7b61c8a2cf8..62e89ad14bf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentItemSemanticEditPolicyCN.java
@@ -49,8 +49,6 @@ public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
super(UMLElementTypes.Comment_1007);
}
-
-
/**
* @generated
*/
@@ -73,8 +71,6 @@ public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -165,5 +161,4 @@ public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
index 8b5b3ceb8ef..1377ef10c62 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
@@ -36,5 +36,4 @@ public class ConstraintConstrainedElementItemSemanticEditPolicy extends UMLBaseI
protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
return getGEFWrapper(new DestroyReferenceCommand(req));
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java
index 1a3d93bbf23..93b2b30cac1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java
@@ -62,8 +62,6 @@ public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
super(UMLElementTypes.Constraint_1014);
}
-
-
/**
* @generated
*/
@@ -86,8 +84,6 @@ public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -240,5 +236,4 @@ public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java
index eabbacb6b19..882cea3fb3f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java
@@ -62,8 +62,6 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
super(UMLElementTypes.Constraint_1028);
}
-
-
/**
* @generated
*/
@@ -86,8 +84,6 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -240,5 +236,4 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ContextLinkItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ContextLinkItemSemanticEditPolicy.java
index 905d11c19aa..29617e158cf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ContextLinkItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ContextLinkItemSemanticEditPolicy.java
@@ -36,5 +36,4 @@ public class ContextLinkItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
return getGEFWrapper(new DestroyReferenceCommand(req));
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
index 35a8c7bdd69..eda7ec86ca8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
@@ -34,7 +34,6 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicy extends UMLBaseI
super(UMLElementTypes.DataType_2010);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicy extends UMLBaseI
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Property_3018 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Property_3018 == requestElementType) {
return getGEFWrapper(new DataTypePropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
index a358aba6c43..84746dd3ce0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
@@ -34,7 +34,6 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicyCN extends UMLBas
super(UMLElementTypes.DataType_3027);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicyCN extends UMLBas
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Property_3018 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Property_3018 == requestElementType) {
return getGEFWrapper(new DataTypePropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java
index 98d286f74ae..42a7af45613 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java
@@ -84,8 +84,6 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
super(UMLElementTypes.DataType_2010);
}
-
-
/**
* @generated
*/
@@ -122,11 +120,6 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case DataTypePropertyEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -144,11 +137,6 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case DataTypeOperationEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -165,8 +153,6 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
}
}
-
-
/**
* @generated
*/
@@ -372,5 +358,4 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java
index 947df98c0eb..fc0238e16de 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java
@@ -84,8 +84,6 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol
super(UMLElementTypes.DataType_3027);
}
-
-
/**
* @generated
*/
@@ -122,11 +120,6 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case DataTypePropertyEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -144,11 +137,6 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case DataTypeOperationEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -165,8 +153,6 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol
}
}
-
-
/**
* @generated
*/
@@ -372,5 +358,4 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
index af5fada501e..ae875a4c543 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
@@ -34,7 +34,6 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicy extends UMLBaseI
super(UMLElementTypes.DataType_2010);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicy extends UMLBaseI
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Operation_3019 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Operation_3019 == requestElementType) {
return getGEFWrapper(new DataTypeOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
index 04ed0e0b7ca..cff9529ccf5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
@@ -34,7 +34,6 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicyCN extends UMLBas
super(UMLElementTypes.DataType_3027);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicyCN extends UMLBas
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Operation_3019 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Operation_3019 == requestElementType) {
return getGEFWrapper(new DataTypeOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationItemSemanticEditPolicy.java
index 3f656745d3d..908d768da76 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationItemSemanticEditPolicy.java
@@ -38,8 +38,6 @@ public class DataTypeOperationItemSemanticEditPolicy extends UMLBaseItemSemantic
super(UMLElementTypes.Operation_3019);
}
-
-
/**
* @generated
*/
@@ -61,6 +59,4 @@ public class DataTypeOperationItemSemanticEditPolicy extends UMLBaseItemSemantic
}
return getGEFWrapper(cmd.reduce());
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypePropertyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypePropertyItemSemanticEditPolicy.java
index 144940f6c98..e2428a79b18 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypePropertyItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypePropertyItemSemanticEditPolicy.java
@@ -38,8 +38,6 @@ public class DataTypePropertyItemSemanticEditPolicy extends UMLBaseItemSemanticE
super(UMLElementTypes.Property_3018);
}
-
-
/**
* @generated
*/
@@ -61,6 +59,4 @@ public class DataTypePropertyItemSemanticEditPolicy extends UMLBaseItemSemanticE
}
return getGEFWrapper(cmd.reduce());
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyBranchItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyBranchItemSemanticEditPolicy.java
index 4b3be50dc81..d68f165520a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyBranchItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyBranchItemSemanticEditPolicy.java
@@ -57,7 +57,6 @@ public class DependencyBranchItemSemanticEditPolicy extends UMLBaseItemSemanticE
super(UMLElementTypes.Dependency_4018);
}
-
/**
* @generated
*/
@@ -72,7 +71,6 @@ public class DependencyBranchItemSemanticEditPolicy extends UMLBaseItemSemanticE
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -211,5 +209,4 @@ public class DependencyBranchItemSemanticEditPolicy extends UMLBaseItemSemanticE
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyItemSemanticEditPolicy.java
index 7fae065942c..ae504815e36 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyItemSemanticEditPolicy.java
@@ -57,7 +57,6 @@ public class DependencyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
super(UMLElementTypes.Dependency_4008);
}
-
/**
* @generated
*/
@@ -72,7 +71,6 @@ public class DependencyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -211,5 +209,4 @@ public class DependencyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyNodeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyNodeItemSemanticEditPolicy.java
index eef5320301a..8488ea28068 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyNodeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyNodeItemSemanticEditPolicy.java
@@ -59,8 +59,6 @@ public class DependencyNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
super(UMLElementTypes.Dependency_2014);
}
-
-
/**
* @generated
*/
@@ -83,8 +81,6 @@ public class DependencyNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -223,5 +219,4 @@ public class DependencyNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ElementImportItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ElementImportItemSemanticEditPolicy.java
index 48fdc3dda26..69436a4fb2a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ElementImportItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ElementImportItemSemanticEditPolicy.java
@@ -47,7 +47,6 @@ public class ElementImportItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
super(UMLElementTypes.ElementImport_1064);
}
-
/**
* @generated
*/
@@ -62,7 +61,6 @@ public class ElementImportItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -147,5 +145,4 @@ public class ElementImportItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
index 50492423176..0da4caeecb4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
@@ -34,7 +34,6 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy exte
super(UMLElementTypes.Enumeration_2006);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy exte
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.EnumerationLiteral_1037 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.EnumerationLiteral_1037 == requestElementType) {
return getGEFWrapper(new EnumerationLiteralCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
index 44e573194b3..215791a5737 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
@@ -34,7 +34,6 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN ex
super(UMLElementTypes.Enumeration_3025);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN ex
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.EnumerationLiteral_1037 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.EnumerationLiteral_1037 == requestElementType) {
return getGEFWrapper(new EnumerationLiteralCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java
index f88bb5c1733..e8fb4f5572e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java
@@ -82,8 +82,6 @@ public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
super(UMLElementTypes.Enumeration_2006);
}
-
-
/**
* @generated
*/
@@ -120,11 +118,6 @@ public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case EnumerationLiteralEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -141,8 +134,6 @@ public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
}
}
-
-
/**
* @generated
*/
@@ -348,5 +339,4 @@ public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java
index 76a20f96a07..23f4d8df53c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java
@@ -82,8 +82,6 @@ public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdit
super(UMLElementTypes.Enumeration_3025);
}
-
-
/**
* @generated
*/
@@ -120,11 +118,6 @@ public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdit
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case EnumerationLiteralEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -141,8 +134,6 @@ public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdit
}
}
-
-
/**
* @generated
*/
@@ -348,5 +339,4 @@ public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdit
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationLiteralItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationLiteralItemSemanticEditPolicy.java
index 1298b928c9e..c3b8a3b254e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationLiteralItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationLiteralItemSemanticEditPolicy.java
@@ -38,8 +38,6 @@ public class EnumerationLiteralItemSemanticEditPolicy extends UMLBaseItemSemanti
super(UMLElementTypes.EnumerationLiteral_1037);
}
-
-
/**
* @generated
*/
@@ -61,6 +59,4 @@ public class EnumerationLiteralItemSemanticEditPolicy extends UMLBaseItemSemanti
}
return getGEFWrapper(cmd.reduce());
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java
index 3515d90c4a0..286cc77efbe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java
@@ -72,7 +72,6 @@ public class ExtensionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli
super(UMLElementTypes.Extension_1013);
}
-
/**
* @generated
*/
@@ -87,7 +86,6 @@ public class ExtensionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -293,5 +291,4 @@ public class ExtensionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/GeneralizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/GeneralizationItemSemanticEditPolicy.java
index 396beeea1b4..17ab3705cff 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/GeneralizationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/GeneralizationItemSemanticEditPolicy.java
@@ -47,7 +47,6 @@ public class GeneralizationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
super(UMLElementTypes.Generalization_4002);
}
-
/**
* @generated
*/
@@ -62,7 +61,6 @@ public class GeneralizationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -147,5 +145,4 @@ public class GeneralizationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java
index 8e4ad3babac..8c15c0575dc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java
@@ -77,8 +77,6 @@ public class MetaclassItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli
super(UMLElementTypes.Class_1031);
}
-
-
/**
* @generated
*/
@@ -101,8 +99,6 @@ public class MetaclassItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli
return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -319,5 +315,4 @@ public class MetaclassItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java
index 35da586cf23..011f900d96b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java
@@ -77,8 +77,6 @@ public class MetaclassItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPo
super(UMLElementTypes.Class_3028);
}
-
-
/**
* @generated
*/
@@ -101,8 +99,6 @@ public class MetaclassItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPo
return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -319,5 +315,4 @@ public class MetaclassItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPo
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java
index e32a19ad2fd..c08eb53255b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java
@@ -55,6 +55,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationC
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
@@ -65,6 +66,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPa
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ExtensionEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.GeneralizationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelPackageableElementCompartmentEditPartCN;
@@ -88,8 +90,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
super(UMLElementTypes.Model_1027);
}
-
-
/**
* @generated
*/
@@ -126,11 +126,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
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)) {
@@ -142,17 +137,11 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
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:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -173,17 +162,11 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
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 ProfileEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -205,17 +188,11 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
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 PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -236,17 +213,11 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
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 ConstraintEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -265,17 +236,11 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
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 EnumerationEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -298,17 +263,11 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
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)) {
@@ -331,17 +290,11 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
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 DataTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -364,7 +317,34 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
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 ClassEditPartCN.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:
+ case ContextLinkEditPart.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 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 org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ 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));
@@ -376,8 +356,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
}
}
-
-
/**
* @generated
*/
@@ -555,5 +533,4 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java
index a7bdf0c93d5..ca7e33c9a82 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java
@@ -55,6 +55,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationC
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
@@ -65,6 +66,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPa
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ExtensionEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.GeneralizationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelPackageableElementCompartmentEditPartTN;
@@ -88,8 +90,6 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
super(UMLElementTypes.Model_2005);
}
-
-
/**
* @generated
*/
@@ -126,11 +126,6 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
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)) {
@@ -142,17 +137,11 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
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:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -173,17 +162,11 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
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 ProfileEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -205,17 +188,11 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
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 PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -236,17 +213,11 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
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 ConstraintEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -265,17 +236,11 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
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 EnumerationEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -298,17 +263,11 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
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)) {
@@ -331,17 +290,11 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
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 DataTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -364,7 +317,34 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
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 ClassEditPartCN.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:
+ case ContextLinkEditPart.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 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 org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ 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));
@@ -376,8 +356,6 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
}
}
-
-
/**
* @generated
*/
@@ -555,5 +533,4 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
index 6046efebcb2..4fa2833a1a5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
@@ -19,6 +19,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -41,7 +42,6 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyCN extends
super(UMLElementTypes.Model_1027);
}
-
/**
* @generated
*/
@@ -50,78 +50,33 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyCN extends
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Comment_1007 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Comment_1007 == requestElementType) {
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Model_1027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Model_1027 == requestElementType) {
return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Profile_1024 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Profile_1024 == requestElementType) {
return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Package_1012 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_1012 == requestElementType) {
return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Constraint_1028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Constraint_1028 == requestElementType) {
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Enumeration_3025 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Enumeration_3025 == requestElementType) {
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.PrimitiveType_3026 == requestElementType) {
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.DataType_3027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.DataType_3027 == requestElementType) {
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
+ }
+ if(UMLElementTypes.Class_3010 == requestElementType) {
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java
index 4abdd3f1c79..6098f2185ec 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java
@@ -19,6 +19,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -41,7 +42,6 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyTN extends
super(UMLElementTypes.Model_2005);
}
-
/**
* @generated
*/
@@ -50,78 +50,33 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyTN extends
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Comment_1007 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Comment_1007 == requestElementType) {
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Model_1027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Model_1027 == requestElementType) {
return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Profile_1024 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Profile_1024 == requestElementType) {
return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Package_1012 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_1012 == requestElementType) {
return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Constraint_1028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Constraint_1028 == requestElementType) {
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Enumeration_3025 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Enumeration_3025 == requestElementType) {
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.PrimitiveType_3026 == requestElementType) {
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.DataType_3027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.DataType_3027 == requestElementType) {
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
+ }
+ if(UMLElementTypes.Class_3010 == requestElementType) {
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageImportItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageImportItemSemanticEditPolicy.java
index 56b2267d1ae..0cceb2f2d92 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageImportItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageImportItemSemanticEditPolicy.java
@@ -47,7 +47,6 @@ public class PackageImportItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
super(UMLElementTypes.PackageImport_1065);
}
-
/**
* @generated
*/
@@ -62,7 +61,6 @@ public class PackageImportItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -147,5 +145,4 @@ public class PackageImportItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java
index 2f54afbfd90..8a45f4f940e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java
@@ -55,6 +55,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationC
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
@@ -90,8 +91,6 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
super(UMLElementTypes.Package_2007);
}
-
-
/**
* @generated
*/
@@ -128,11 +127,6 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
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)) {
@@ -144,17 +138,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
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:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -175,17 +163,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
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 ProfileEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -207,17 +189,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
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 PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -238,17 +214,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
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 ConstraintEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -267,17 +237,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
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 EnumerationEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -300,17 +264,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
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)) {
@@ -333,17 +291,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
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 DataTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -366,17 +318,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
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 StereotypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -400,7 +346,34 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
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 ClassEditPartCN.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:
+ case ContextLinkEditPart.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 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 org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ 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));
@@ -412,8 +385,6 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
}
}
-
-
/**
* @generated
*/
@@ -591,5 +562,4 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java
index 6b6b396dae8..7c3780648ee 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java
@@ -58,6 +58,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationC
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
@@ -93,7 +94,6 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
super(UMLElementTypes.Package_1012);
}
-
/**
* @generated
*/
@@ -102,30 +102,12 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Package_1012 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_1012 == requestElementType) {
return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
/**
* @generated
*/
@@ -158,11 +140,6 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
Node node = (Node)nit.next();
switch(UMLVisualIDRegistry.getVisualID(node)) {
case PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = node.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -183,7 +160,6 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), node.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of node as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
@@ -193,11 +169,6 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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)) {
@@ -209,17 +180,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -240,17 +205,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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 ProfileEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -272,17 +231,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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 PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -303,17 +256,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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 ConstraintEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -332,17 +279,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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 EnumerationEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -365,17 +306,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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)) {
@@ -398,17 +333,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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 DataTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -431,17 +360,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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 StereotypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -465,7 +388,34 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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 ClassEditPartCN.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:
+ case ContextLinkEditPart.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 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 org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ 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));
@@ -477,8 +427,6 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
}
}
-
-
/**
* @generated
*/
@@ -656,5 +604,4 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
index 0a7201a52e6..f982a35d310 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
@@ -19,6 +19,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -42,7 +43,6 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicy extends
super(UMLElementTypes.Package_2007);
}
-
/**
* @generated
*/
@@ -51,85 +51,36 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicy extends
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Comment_1007 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Comment_1007 == requestElementType) {
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Model_1027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Model_1027 == requestElementType) {
return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Profile_1024 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Profile_1024 == requestElementType) {
return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Package_1012 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_1012 == requestElementType) {
return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Constraint_1028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Constraint_1028 == requestElementType) {
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Enumeration_3025 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Enumeration_3025 == requestElementType) {
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.PrimitiveType_3026 == requestElementType) {
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.DataType_3027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.DataType_3027 == requestElementType) {
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Stereotype_1023 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Stereotype_1023 == requestElementType) {
return getGEFWrapper(new StereotypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
+ }
+ if(UMLElementTypes.Class_3010 == requestElementType) {
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
index 616329531e2..09ae126a4b2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
@@ -19,6 +19,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -42,7 +43,6 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicyCN extend
super(UMLElementTypes.Package_1012);
}
-
/**
* @generated
*/
@@ -51,85 +51,36 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicyCN extend
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Comment_1007 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Comment_1007 == requestElementType) {
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Model_1027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Model_1027 == requestElementType) {
return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Profile_1024 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Profile_1024 == requestElementType) {
return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Package_1012 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_1012 == requestElementType) {
return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Constraint_1028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Constraint_1028 == requestElementType) {
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Enumeration_3025 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Enumeration_3025 == requestElementType) {
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.PrimitiveType_3026 == requestElementType) {
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.DataType_3027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.DataType_3027 == requestElementType) {
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Stereotype_1023 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Stereotype_1023 == requestElementType) {
return getGEFWrapper(new StereotypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
+ }
+ if(UMLElementTypes.Class_3010 == requestElementType) {
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java
index 6fc687ce933..43f70473a8d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java
@@ -74,8 +74,6 @@ public class PrimitiveTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
super(UMLElementTypes.PrimitiveType_2009);
}
-
-
/**
* @generated
*/
@@ -98,8 +96,6 @@ public class PrimitiveTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -305,5 +301,4 @@ public class PrimitiveTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java
index b998bc75df8..0681ababcae 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java
@@ -74,8 +74,6 @@ public class PrimitiveTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEd
super(UMLElementTypes.PrimitiveType_3026);
}
-
-
/**
* @generated
*/
@@ -98,8 +96,6 @@ public class PrimitiveTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEd
return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -305,5 +301,4 @@ public class PrimitiveTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEd
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileApplicationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileApplicationItemSemanticEditPolicy.java
index 9340b22dfe0..f35202934bb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileApplicationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileApplicationItemSemanticEditPolicy.java
@@ -47,7 +47,6 @@ public class ProfileApplicationItemSemanticEditPolicy extends UMLBaseItemSemanti
super(UMLElementTypes.ProfileApplication_1045);
}
-
/**
* @generated
*/
@@ -62,7 +61,6 @@ public class ProfileApplicationItemSemanticEditPolicy extends UMLBaseItemSemanti
//return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -147,5 +145,4 @@ public class ProfileApplicationItemSemanticEditPolicy extends UMLBaseItemSemanti
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java
index a055956c5d9..1db1a600d23 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java
@@ -24,6 +24,7 @@ import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationNodeCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentEditPartCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommand;
@@ -50,7 +51,6 @@ public class ProfileDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
super(UMLElementTypes.Profile_1000);
}
-
/**
* @generated
*/
@@ -59,109 +59,47 @@ public class ProfileDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Dependency_2014 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Dependency_2014 == requestElementType) {
return getGEFWrapper(new DependencyNodeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Association_2015 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Association_2015 == requestElementType) {
return getGEFWrapper(new AssociationNodeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Stereotype_1026 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Stereotype_1026 == requestElementType) {
return getGEFWrapper(new StereotypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Class_1031 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Class_2008 == requestElementType) {
+ return getGEFWrapper(new ClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
+ }
+ if(UMLElementTypes.Class_1031 == requestElementType) {
return getGEFWrapper(new MetaclassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Comment_1002 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Comment_1002 == requestElementType) {
return getGEFWrapper(new CommentEditPartCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Constraint_1014 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Constraint_1014 == requestElementType) {
return getGEFWrapper(new ConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Model_2005 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Model_2005 == requestElementType) {
return getGEFWrapper(new ModelCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Profile_1030 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Profile_1030 == requestElementType) {
return getGEFWrapper(new ProfileCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Package_2007 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_2007 == requestElementType) {
return getGEFWrapper(new PackageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Enumeration_2006 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Enumeration_2006 == requestElementType) {
return getGEFWrapper(new EnumerationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.PrimitiveType_2009 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.PrimitiveType_2009 == requestElementType) {
return getGEFWrapper(new PrimitiveTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.DataType_2010 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.DataType_2010 == requestElementType) {
return getGEFWrapper(new DataTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Diagram_2016 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Diagram_2016 == requestElementType) {
return getGEFWrapper(new ShortCutDiagramCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -185,7 +123,5 @@ public class ProfileDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
public DuplicateAnythingCommand(TransactionalEditingDomain editingDomain, DuplicateElementsRequest req) {
super(editingDomain, req.getLabel(), req.getElementsToBeDuplicated(), req.getAllDuplicatedElementsMap());
}
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java
index 672621182e7..ec84e1582ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java
@@ -55,6 +55,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationC
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
@@ -91,8 +92,6 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
super(UMLElementTypes.Profile_1024);
}
-
-
/**
* @generated
*/
@@ -129,11 +128,6 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case StereotypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -157,17 +151,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -188,17 +176,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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 ProfileEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -220,17 +202,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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 PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -251,17 +227,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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 ConstraintEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -280,17 +250,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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 EnumerationEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -313,17 +277,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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)) {
@@ -346,17 +304,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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 DataTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -379,17 +331,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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 CommentEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -401,17 +347,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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 MetaclassEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -435,7 +375,34 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
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 ClassEditPartCN.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:
+ case ContextLinkEditPart.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 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 org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ 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));
@@ -447,8 +414,6 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
}
}
-
-
/**
* @generated
*/
@@ -629,5 +594,4 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java
index b053cc9eb0f..b5d96f7491b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java
@@ -55,6 +55,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationC
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
@@ -91,8 +92,6 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
super(UMLElementTypes.Profile_1030);
}
-
-
/**
* @generated
*/
@@ -129,11 +128,6 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case StereotypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -157,17 +151,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
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:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -188,17 +176,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
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 ProfileEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -220,17 +202,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
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 PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -251,17 +227,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
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 ConstraintEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -280,17 +250,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
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 EnumerationEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -313,17 +277,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
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)) {
@@ -346,17 +304,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
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 DataTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -379,17 +331,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
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 CommentEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -401,17 +347,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
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 MetaclassEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -435,7 +375,34 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
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 ClassEditPartCN.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:
+ case ContextLinkEditPart.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 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 org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ 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));
@@ -447,8 +414,6 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
}
}
-
-
/**
* @generated
*/
@@ -629,5 +594,4 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java
index 42e573f8d74..cf9eff6be3e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java
@@ -19,6 +19,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -43,7 +44,6 @@ public class ProfilePackageableElementCompartmentItemSemanticEditPolicyCN extend
super(UMLElementTypes.Profile_1024);
}
-
/**
* @generated
*/
@@ -52,92 +52,39 @@ public class ProfilePackageableElementCompartmentItemSemanticEditPolicyCN extend
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Stereotype_1023 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Stereotype_1023 == requestElementType) {
return getGEFWrapper(new StereotypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Model_1027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Model_1027 == requestElementType) {
return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Profile_1024 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Profile_1024 == requestElementType) {
return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Package_1012 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_1012 == requestElementType) {
return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Constraint_1028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Constraint_1028 == requestElementType) {
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Enumeration_3025 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Enumeration_3025 == requestElementType) {
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.PrimitiveType_3026 == requestElementType) {
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.DataType_3027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.DataType_3027 == requestElementType) {
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Comment_1007 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Comment_1007 == requestElementType) {
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Class_3028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Class_3028 == requestElementType) {
return getGEFWrapper(new MetaclassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
+ }
+ if(UMLElementTypes.Class_3010 == requestElementType) {
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java
index 18276f32499..c4875d4d881 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java
@@ -19,6 +19,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -43,7 +44,6 @@ public class ProfilePackageableElementCompartmentItemSemanticEditPolicyTN extend
super(UMLElementTypes.Profile_1030);
}
-
/**
* @generated
*/
@@ -52,92 +52,39 @@ public class ProfilePackageableElementCompartmentItemSemanticEditPolicyTN extend
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Stereotype_1023 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Stereotype_1023 == requestElementType) {
return getGEFWrapper(new StereotypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Model_1027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Model_1027 == requestElementType) {
return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Profile_1024 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Profile_1024 == requestElementType) {
return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Package_1012 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_1012 == requestElementType) {
return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Constraint_1028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Constraint_1028 == requestElementType) {
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Enumeration_3025 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Enumeration_3025 == requestElementType) {
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.PrimitiveType_3026 == requestElementType) {
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.DataType_3027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.DataType_3027 == requestElementType) {
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Comment_1007 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Comment_1007 == requestElementType) {
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Class_3028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Class_3028 == requestElementType) {
return getGEFWrapper(new MetaclassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
+ }
+ if(UMLElementTypes.Class_3010 == requestElementType) {
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java
index cb660d23acb..d9e1a684cc2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java
@@ -38,8 +38,6 @@ public class ShortCutDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEd
super(UMLElementTypes.Diagram_2016);
}
-
-
/**
* @generated
*/
@@ -61,6 +59,4 @@ public class ShortCutDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEd
}
return getGEFWrapper(cmd.reduce());
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java
index 15966f5f5d1..ea9fe30e3c5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java
@@ -34,7 +34,6 @@ public class StereotypeAttributeCompartmentItemSemanticEditPolicy extends UMLBas
super(UMLElementTypes.Stereotype_1026);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class StereotypeAttributeCompartmentItemSemanticEditPolicy extends UMLBas
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Property_3002 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Property_3002 == requestElementType) {
return getGEFWrapper(new ClassPropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java
index e29115e87c7..3c74db6304a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java
@@ -34,7 +34,6 @@ public class StereotypeAttributeCompartmentItemSemanticEditPolicyCN extends UMLB
super(UMLElementTypes.Stereotype_1023);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class StereotypeAttributeCompartmentItemSemanticEditPolicyCN extends UMLB
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Property_3002 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Property_3002 == requestElementType) {
return getGEFWrapper(new ClassPropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java
index 199dae79325..41dbacc7c9d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java
@@ -87,8 +87,6 @@ public class StereotypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
super(UMLElementTypes.Stereotype_1026);
}
-
-
/**
* @generated
*/
@@ -125,11 +123,6 @@ public class StereotypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case ClassPropertyEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -147,11 +140,6 @@ public class StereotypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case ClassOperationEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -168,8 +156,6 @@ public class StereotypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
}
}
-
-
/**
* @generated
*/
@@ -386,5 +372,4 @@ public class StereotypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java
index d1bb770552f..95886b8f4c0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java
@@ -87,8 +87,6 @@ public class StereotypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
super(UMLElementTypes.Stereotype_1023);
}
-
-
/**
* @generated
*/
@@ -125,11 +123,6 @@ public class StereotypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case ClassPropertyEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -147,11 +140,6 @@ public class StereotypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case ClassOperationEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -168,8 +156,6 @@ public class StereotypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
}
}
-
-
/**
* @generated
*/
@@ -386,5 +372,4 @@ public class StereotypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java
index a1f8c0669c9..c8ff839d32b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java
@@ -34,7 +34,6 @@ public class StereotypeOperationCompartmentItemSemanticEditPolicy extends UMLBas
super(UMLElementTypes.Stereotype_1026);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class StereotypeOperationCompartmentItemSemanticEditPolicy extends UMLBas
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Operation_3020 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Operation_3020 == requestElementType) {
return getGEFWrapper(new ClassOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java
index f39528eff31..c3954857edd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java
@@ -34,7 +34,6 @@ public class StereotypeOperationCompartmentItemSemanticEditPolicyCN extends UMLB
super(UMLElementTypes.Stereotype_1023);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class StereotypeOperationCompartmentItemSemanticEditPolicyCN extends UMLB
if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Operation_3020 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Operation_3020 == requestElementType) {
return getGEFWrapper(new ClassOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java
index e9866404a22..2e210206f9a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -236,7 +236,17 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
protected Command getCreateCommand(CreateElementRequest req) {
- // no more usage of the extended types here.
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType instanceof IExtendedHintedElementType) {
+ // try to get a semantic create command from the extended type
+ IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(req.getContainer());
+ if(commandProvider != null) {
+ ICommand command = commandProvider.getEditCommand(req);
+ if(command != null && command.canExecute()) {
+ return new ICommandProxy(command);
+ }
+ }
+ }
return null;
}
@@ -281,7 +291,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
}
// RS: End of add code for extended types
-
/**
* @generated
*/
@@ -334,7 +343,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
} else {
return getGEFWrapper(new MoveElementsCommand(req));
}
-
}
/**
@@ -381,7 +389,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
}
}
-
/**
* @generated
*/
@@ -476,7 +483,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
return false;
}
}
-
return canExistCommentAnnotatedElement_1022(source, target);
}
@@ -489,7 +495,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
return false;
}
}
-
return canExistConstraintConstrainedElement_4014(source, target);
}
@@ -505,7 +510,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
if(target != null && (target.getOwnedRules().contains(target))) {
return false;
}
-
return canExistConstraintContext_8500(source, target);
}
@@ -520,7 +524,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @see org.eclipse.papyrus.uml.diagram.profile.custom.policies.CUMLBaseItemSemanticEditPolicy for the good test!
*/
//ExtensionTarget
-
/**we can't make a test here, because, the source must be a Property (ExtensionEnd) and it's a Stereotype
*
* @see org.eclipse.papyrus.uml.diagram.profile.custom.policies.CUMLBaseItemSemanticEditPolicy for the good test!
@@ -756,5 +759,4 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
return true;
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextNonResizableEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextNonResizableEditPolicy.java
index cb17b89efa2..092403465d1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextNonResizableEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextNonResizableEditPolicy.java
@@ -205,7 +205,6 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
/**
* @generated
*/
-
public void refreshFeedback() {
refreshSelectionFeedback();
refreshFocusFeedback();
@@ -235,5 +234,4 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
return Collections.singletonList(moveHandle);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextSelectionEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextSelectionEditPolicy.java
index 23ab41f3218..c43584305db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextSelectionEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextSelectionEditPolicy.java
@@ -199,7 +199,6 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
/**
* @generated
*/
-
public void refreshFeedback() {
refreshSelectionFeedback();
refreshFocusFeedback();
@@ -219,5 +218,4 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
}
return hostPositionListener;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLAbstractNavigatorItem.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLAbstractNavigatorItem.java
index 9b4fcc84990..2ff0f5305b7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLAbstractNavigatorItem.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLAbstractNavigatorItem.java
@@ -70,5 +70,4 @@ public abstract class UMLAbstractNavigatorItem extends PlatformObject {
public Object getParent() {
return myParent;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorContentProvider.java
index 3c3446c21a7..8f54771183c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorContentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorContentProvider.java
@@ -144,12 +144,10 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider
myWorkspaceSynchronizer.dispose();
myWorkspaceSynchronizer = null;
myViewerRefreshRunnable = null;
-
for(Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
Resource resource = (Resource)it.next();
resource.unload();
}
-
((TransactionalEditingDomain)myEditingDomain).dispose();
myEditingDomain = null;
}
@@ -214,7 +212,6 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider
Resource resource = myEditingDomain.getResourceSet().getResource(fileURI, true);
return wrapEObjects(myAdapterFctoryContentProvier.getChildren(resource), parentElement);
}
-
if(parentElement instanceof UMLDomainNavigatorItem) {
return wrapEObjects(myAdapterFctoryContentProvier.getChildren(((UMLDomainNavigatorItem)parentElement).getEObject()), parentElement);
}
@@ -251,5 +248,4 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider
public boolean hasChildren(Object element) {
return element instanceof IFile || getChildren(element).length > 0;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorItem.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorItem.java
index 2315214ef5c..43dd86abed1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorItem.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorItem.java
@@ -46,7 +46,6 @@ public class UMLDomainNavigatorItem extends PlatformObject {
return domainNavigatorItem.getPropertySourceProvider().getPropertySource(eObject);
}
}
-
return null;
}
@@ -118,5 +117,4 @@ public class UMLDomainNavigatorItem extends PlatformObject {
public int hashCode() {
return EcoreUtil.getURI(getEObject()).hashCode();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorLabelProvider.java
index 693f7cc77fa..977209bdc9b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorLabelProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorLabelProvider.java
@@ -103,5 +103,4 @@ public class UMLDomainNavigatorLabelProvider implements ICommonLabelProvider {
public String getDescription(Object anElement) {
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorActionProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorActionProvider.java
index fd2c5561352..7ca26450347 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorActionProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorActionProvider.java
@@ -147,7 +147,6 @@ public class UMLNavigatorActionProvider extends CommonActionProvider {
if(myDiagram == null || myDiagram.eResource() == null) {
return;
}
-
IEditorInput editorInput = getEditorInput(myDiagram);
IWorkbenchPage page = myViewerSite.getPage();
try {
@@ -175,7 +174,5 @@ public class UMLNavigatorActionProvider extends CommonActionProvider {
IEditorInput editorInput = new URIEditorInput(uri, editorName);
return editorInput;
}
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorContentProvider.java
index 5b17947d4a1..d58c08ea778 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorContentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorContentProvider.java
@@ -133,8 +133,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
});
}
-
-
/**
* @generated
*/
@@ -142,12 +140,10 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
myWorkspaceSynchronizer.dispose();
myWorkspaceSynchronizer = null;
myViewerRefreshRunnable = null;
-
for(Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
Resource resource = (Resource)it.next();
resource.unload();
}
-
((TransactionalEditingDomain)myEditingDomain).dispose();
myEditingDomain = null;
}
@@ -219,12 +215,10 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
}
return result.toArray();
}
-
if(parentElement instanceof UMLNavigatorGroup) {
UMLNavigatorGroup group = (UMLNavigatorGroup)parentElement;
return group.getChildren();
}
-
if(parentElement instanceof UMLNavigatorItem) {
UMLNavigatorItem navigatorItem = (UMLNavigatorItem)parentElement;
if(navigatorItem.isLeaf() || !isOwnView(navigatorItem.getView())) {
@@ -232,7 +226,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
}
return getViewChildren(navigatorItem.getView(), parentElement);
}
-
return EMPTY_ARRAY;
}
@@ -245,7 +238,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
return EMPTY_ARRAY;
}
-
/**
* @generated
*/
@@ -253,7 +245,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
return ProfileDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
}
-
/**
* @generated
*/
@@ -271,5 +262,4 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
public boolean hasChildren(Object element) {
return element instanceof IFile || getChildren(element).length > 0;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorGroup.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorGroup.java
index aaca8e48a64..82f577e15be 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorGroup.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorGroup.java
@@ -106,5 +106,4 @@ public class UMLNavigatorGroup extends UMLAbstractNavigatorItem {
public int hashCode() {
return getGroupName().hashCode();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorItem.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorItem.java
index 6e0152eb105..e40ae84ce6d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorItem.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorItem.java
@@ -96,5 +96,4 @@ public class UMLNavigatorItem extends UMLAbstractNavigatorItem {
public int hashCode() {
return EcoreUtil.getURI(getView()).hashCode();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLabelProvider.java
index 12b0fbc344e..1ea9afe7dc7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLabelProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLabelProvider.java
@@ -63,7 +63,6 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL
UMLNavigatorGroup group = (UMLNavigatorGroup)element;
return UMLDiagramEditorPlugin.getInstance().getBundledImage(group.getIcon());
}
-
if(element instanceof UMLNavigatorItem) {
UMLNavigatorItem navigatorItem = (UMLNavigatorItem)element;
if(!isOwnView(navigatorItem.getView())) {
@@ -71,8 +70,6 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL
}
return getImage(navigatorItem.getView());
}
-
-
return super.getImage(element);
}
@@ -93,7 +90,6 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL
image = UMLElementTypes.getImage(elementType);
imageRegistry.put(key, image);
}
-
if(image == null) {
image = imageRegistry.get("Navigator?ImageNotFound"); //$NON-NLS-1$
imageRegistry.put(key, image);
@@ -109,7 +105,6 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL
UMLNavigatorGroup group = (UMLNavigatorGroup)element;
return group.getGroupName();
}
-
if(element instanceof UMLNavigatorItem) {
UMLNavigatorItem navigatorItem = (UMLNavigatorItem)element;
if(!isOwnView(navigatorItem.getView())) {
@@ -117,8 +112,6 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL
}
return getText(navigatorItem.getView());
}
-
-
return super.getText(element);
}
@@ -132,7 +125,6 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL
return getUnknownElementText(view);
}
-
/**
* @generated
*/
@@ -178,5 +170,4 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL
private boolean isOwnView(View view) {
return ProfileDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLinkHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLinkHelper.java
index 6d00ca4881a..cd0e589f8e9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLinkHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLinkHelper.java
@@ -63,7 +63,6 @@ public class UMLNavigatorLinkHelper implements ILinkHelper {
* @generated
*/
public IStructuredSelection findSelection(IEditorInput anInput) {
- IDiagramDocument document = UMLDiagramEditorPlugin.getInstance().getDocumentProvider().getDiagramDocument(anInput);
return StructuredSelection.EMPTY;
}
@@ -77,7 +76,6 @@ public class UMLNavigatorLinkHelper implements ILinkHelper {
if(false == aSelection.getFirstElement() instanceof UMLAbstractNavigatorItem) {
return;
}
-
UMLAbstractNavigatorItem abstractNavigatorItem = (UMLAbstractNavigatorItem)aSelection.getFirstElement();
View navigatorView = null;
if(abstractNavigatorItem instanceof UMLNavigatorItem) {
@@ -111,5 +109,4 @@ public class UMLNavigatorLinkHelper implements ILinkHelper {
}
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorSorter.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorSorter.java
index f92cfcd648b..326a7af387d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorSorter.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorSorter.java
@@ -36,5 +36,4 @@ public class UMLNavigatorSorter extends ViewerSorter {
}
return GROUP_CATEGORY;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/parsers/MessageFormatParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/parsers/MessageFormatParser.java
index 44ee95c5ebf..2e0d5c6275a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/parsers/MessageFormatParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/parsers/MessageFormatParser.java
@@ -199,5 +199,4 @@ public class MessageFormatParser extends AbstractAttributeParser {
EObject element = (EObject)adapter.getAdapter(EObject.class);
return getViewProcessor().format(getValues(element), new StringBuffer(), new FieldPosition(0)).toString();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/DiagramEditorContextMenuProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/DiagramEditorContextMenuProvider.java
index 1234fbe8748..4f54b81a24e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/DiagramEditorContextMenuProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/DiagramEditorContextMenuProvider.java
@@ -32,7 +32,6 @@ public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider
*/
private IWorkbenchPart part;
-
/**
* @generated
*/
@@ -41,7 +40,6 @@ public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider
this.part = part;
}
-
/**
* @generated
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/LoadResourceAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/LoadResourceAction.java
index a977692a4c3..11dd7faa8ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/LoadResourceAction.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/LoadResourceAction.java
@@ -28,5 +28,4 @@ public class LoadResourceAction extends DefaultLoadResourceAction {
public Object execute(ExecutionEvent event) throws ExecutionException {
return super.execute(event);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/Messages.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/Messages.java
index 3eb79b94ec4..26720741e5a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/Messages.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/Messages.java
@@ -33,7 +33,6 @@ public class Messages extends NLS {
private Messages() {
}
-
/**
* @generated
*/
@@ -327,72 +326,82 @@ public class Messages extends NLS {
/**
* @generated
*/
- public static String ImportMetaclass6CreationTool_title;
+ public static String Class6CreationTool_title;
/**
* @generated
*/
- public static String ImportMetaclass6CreationTool_desc;
+ public static String Class6CreationTool_desc;
/**
* @generated
*/
- public static String Enumeration7CreationTool_title;
+ public static String ImportMetaclass7CreationTool_title;
/**
* @generated
*/
- public static String Enumeration7CreationTool_desc;
+ public static String ImportMetaclass7CreationTool_desc;
/**
* @generated
*/
- public static String DataType8CreationTool_title;
+ public static String Enumeration8CreationTool_title;
/**
* @generated
*/
- public static String DataType8CreationTool_desc;
+ public static String Enumeration8CreationTool_desc;
/**
* @generated
*/
- public static String PrimitiveType9CreationTool_title;
+ public static String DataType9CreationTool_title;
/**
* @generated
*/
- public static String PrimitiveType9CreationTool_desc;
+ public static String DataType9CreationTool_desc;
/**
* @generated
*/
- public static String Property10CreationTool_title;
+ public static String PrimitiveType10CreationTool_title;
/**
* @generated
*/
- public static String Property10CreationTool_desc;
+ public static String PrimitiveType10CreationTool_desc;
/**
* @generated
*/
- public static String Operation11CreationTool_title;
+ public static String Property11CreationTool_title;
/**
* @generated
*/
- public static String Operation11CreationTool_desc;
+ public static String Property11CreationTool_desc;
/**
* @generated
*/
- public static String EnumerationLiteral12CreationTool_title;
+ public static String Operation12CreationTool_title;
/**
* @generated
*/
- public static String EnumerationLiteral12CreationTool_desc;
+ public static String Operation12CreationTool_desc;
+
+ /**
+ * @generated
+ */
+ public static String EnumerationLiteral13CreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String EnumerationLiteral13CreationTool_desc;
/**
* @generated
@@ -537,6 +546,26 @@ public class Messages extends NLS {
/**
* @generated
*/
+ public static String ClassAttributeCompartmentEditPart_title;
+
+ /**
+ * @generated
+ */
+ public static String ClassAttributeCompartmentEditPartCN_title;
+
+ /**
+ * @generated
+ */
+ public static String ClassOperationCompartmentEditPart_title;
+
+ /**
+ * @generated
+ */
+ public static String ClassOperationCompartmentEditPartCN_title;
+
+ /**
+ * @generated
+ */
public static String CommandName_OpenDiagram;
/**
@@ -558,6 +587,5 @@ public class Messages extends NLS {
* @generated
*/
public static String UMLModelingAssistantProviderMessage;
-
//TODO: put accessor fields manually
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ModelElementSelectionPage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ModelElementSelectionPage.java
index a41cc68ac2a..836771ca611 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ModelElementSelectionPage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ModelElementSelectionPage.java
@@ -28,9 +28,6 @@ public class ModelElementSelectionPage extends DefaultModelElementSelectionPage
super(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory(), pageName);
}
-
-
-
/**
* Override to provide custom model element description.
* @generated
@@ -38,7 +35,4 @@ public class ModelElementSelectionPage extends DefaultModelElementSelectionPage
protected String getSelectionTitle() {
return Messages.ModelElementSelectionPageMessage;
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLCreationWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLCreationWizard.java
index b9cf05600f5..34aaafa6da7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLCreationWizard.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLCreationWizard.java
@@ -116,7 +116,6 @@ public class UMLCreationWizard extends Wizard implements INewWizard {
diagramModelFilePage.setTitle(Messages.UMLCreationWizard_DiagramModelFilePageTitle);
diagramModelFilePage.setDescription(Messages.UMLCreationWizard_DiagramModelFilePageDescription);
addPage(diagramModelFilePage);
-
domainModelFilePage = new UMLCreationWizardPage("DomainModelFile", getSelection(), "PapyrusUMLProfile") { //$NON-NLS-1$ //$NON-NLS-2$
public void setVisible(boolean visible) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramActionBarContributor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramActionBarContributor.java
index f8c14b442f0..548f1dde5d0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramActionBarContributor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramActionBarContributor.java
@@ -29,7 +29,6 @@ public class UMLDiagramActionBarContributor extends DiagramActionBarContributor
/**
* @generated
*/
-
protected Class<UMLDiagramEditor> getEditorClass() {
return UMLDiagramEditor.class;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramContentInitializer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramContentInitializer.java
index 2c0093538db..b8f7906f3a0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramContentInitializer.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramContentInitializer.java
@@ -28,6 +28,12 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassAttributeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassAttributeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationCompartmentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPart;
@@ -151,6 +157,16 @@ public class UMLDiagramContentInitializer {
/**
* @generated
*/
+ private void createClass_2008Children(View view) {
+ myDomain2NotationMap.put(view.getElement(), view);
+ myLinkDescriptors.addAll(UMLDiagramUpdater.getClass_2008OutgoingLinks(view));
+ createClassOperations_7018Children(getCompartment(view, ClassOperationCompartmentEditPart.VISUAL_ID));
+ createClassAttributes_7017Children(getCompartment(view, ClassAttributeCompartmentEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
private void createClass_1031Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
myLinkDescriptors.addAll(UMLDiagramUpdater.getClass_1031OutgoingLinks(view));
@@ -295,6 +311,16 @@ public class UMLDiagramContentInitializer {
/**
* @generated
*/
+ private void createClass_3010Children(View view) {
+ myDomain2NotationMap.put(view.getElement(), view);
+ myLinkDescriptors.addAll(UMLDiagramUpdater.getClass_3010OutgoingLinks(view));
+ createClassAttributes_7011Children(getCompartment(view, ClassAttributeCompartmentEditPartCN.VISUAL_ID));
+ createClassOperations_7012Children(getCompartment(view, ClassOperationCompartmentEditPartCN.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
private void createClass_3028Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
myLinkDescriptors.addAll(UMLDiagramUpdater.getClass_3028OutgoingLinks(view));
@@ -529,6 +555,46 @@ public class UMLDiagramContentInitializer {
/**
* @generated
*/
+ private void createClassAttributes_7017Children(View view) {
+ Collection childNodeDescriptors = UMLDiagramUpdater.getClassAttributes_7017SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void createClassAttributes_7011Children(View view) {
+ Collection childNodeDescriptors = UMLDiagramUpdater.getClassAttributes_7011SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void createClassOperations_7018Children(View view) {
+ Collection childNodeDescriptors = UMLDiagramUpdater.getClassOperations_7018SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void createClassOperations_7012Children(View view) {
+ Collection childNodeDescriptors = UMLDiagramUpdater.getClassOperations_7012SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
+ }
+ }
+
+ /**
+ * @generated
+ */
private void createNode(View parentView, UMLNodeDescriptor nodeDescriptor) {
final String nodeType = UMLVisualIDRegistry.getType(nodeDescriptor.getVisualID());
Node node = ViewService.createNode(parentView, nodeDescriptor.getModelElement(), nodeType, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
@@ -542,6 +608,9 @@ public class UMLDiagramContentInitializer {
case StereotypeEditPart.VISUAL_ID:
createStereotype_1026Children(node);
return;
+ case ClassEditPart.VISUAL_ID:
+ createClass_2008Children(node);
+ return;
case MetaclassEditPart.VISUAL_ID:
createClass_1031Children(node);
return;
@@ -593,6 +662,9 @@ public class UMLDiagramContentInitializer {
case StereotypeEditPartCN.VISUAL_ID:
createStereotype_1023Children(node);
return;
+ case ClassEditPartCN.VISUAL_ID:
+ createClass_3010Children(node);
+ return;
case MetaclassEditPartCN.VISUAL_ID:
createClass_3028Children(node);
return;
@@ -690,5 +762,4 @@ public class UMLDiagramContentInitializer {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditor.java
index dc5eb7dcaa3..058ff3b924c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditor.java
@@ -78,7 +78,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
*/
public static final String CONTEXT_ID = "org.eclipse.papyrus.uml.diagram.profile.ui.diagramContext"; //$NON-NLS-1$
-
/**
* @generated
*/
@@ -109,17 +108,13 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
*/
public UMLDiagramEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws ServiceException {
super(servicesRegistry, diagram);
-
// adds a listener to the palette service, which reacts to palette customizations
PapyrusPaletteService.getInstance().addProviderChangeListener(this);
-
// Share the same editing provider
editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class);
documentProvider = new GmfMultiDiagramDocumentProvider(editingDomain);
-
// overrides editing domain created by super constructor
setDocumentProvider(documentProvider);
-
}
/**
@@ -158,7 +153,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
return UMLDiagramEditorPlugin.ID;
}
-
/**
* @generated
*/
@@ -231,12 +225,10 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
return new ShowInContext(getEditorInput(), getNavigatorSelection());
}
-
/**
* @generated
*/
private ISelection getNavigatorSelection() {
- IDiagramDocument document = getDiagramDocument();
return StructuredSelection.EMPTY;
}
@@ -250,8 +242,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
getSite().registerContextMenu(ActionIds.DIAGRAM_EDITOR_CONTEXT_MENU, provider, getDiagramGraphicalViewer());
}
-
-
/**
* @generated
*/
@@ -299,7 +289,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
dirtyState.dispose();
dirtyState = null;
}
-
super.setUndoContext(context);
}
@@ -327,12 +316,10 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
// remove palette service listener
// remove preference listener
PapyrusPaletteService.getInstance().removeProviderChangeListener(this);
-
if(dirtyState != null) {
dirtyState.dispose();
dirtyState = null;
}
-
super.dispose();
}
@@ -343,8 +330,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
return getEditDomain().getPaletteViewer();
}
-
-
/**
* @generated
*/
@@ -368,13 +353,10 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
*/
protected void configurePaletteViewer(PaletteViewer viewer) {
super.configurePaletteViewer(viewer);
-
// customize menu...
viewer.setContextMenu(new PapyrusPaletteContextMenuProvider(viewer));
-
viewer.getKeyHandler().setParent(getPaletteKeyHandler());
viewer.getControl().addMouseListener(getPaletteMouseListener());
-
// Add a transfer drag target listener that is supported on
// palette template entries whose template is a creation tool.
// This will enable drag and drop of the palette shape creation
@@ -395,9 +377,7 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
* @return Palette Key Handler for the palette
*/
private KeyHandler getPaletteKeyHandler() {
-
if(paletteKeyHandler == null) {
-
paletteKeyHandler = new KeyHandler() {
/**
@@ -411,27 +391,18 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
* @return <code>true</code> if KeyEvent was handled in some way
*/
public boolean keyReleased(KeyEvent event) {
-
if(event.keyCode == SWT.Selection) {
-
Tool tool = getPaletteViewer().getActiveTool().createTool();
-
if(toolSupportsAccessibility(tool)) {
-
tool.keyUp(event, getDiagramGraphicalViewer());
-
// deactivate current selection
getPaletteViewer().setActiveTool(null);
-
return true;
}
-
}
return super.keyReleased(event);
}
-
};
-
}
return paletteKeyHandler;
}
@@ -440,9 +411,7 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
* @return Palette Mouse listener for the palette
*/
private MouseListener getPaletteMouseListener() {
-
if(paletteMouseListener == null) {
-
paletteMouseListener = new MouseListener() {
/**
@@ -459,13 +428,10 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
*/
public void mouseDoubleClick(MouseEvent e) {
Tool tool = getPaletteViewer().getActiveTool().createTool();
-
if(toolSupportsAccessibility(tool)) {
-
tool.setViewer(getDiagramGraphicalViewer());
tool.setEditDomain(getDiagramGraphicalViewer().getEditDomain());
tool.mouseDoubleClick(e, getDiagramGraphicalViewer());
-
// Current active tool should be deactivated,
// but if it is down here it will get
// reactivated deep in GEF palette code after
@@ -485,14 +451,11 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
getPaletteViewer().setActiveTool(null);
clearActiveTool = false;
}
-
}
};
-
}
return paletteMouseListener;
}
-
};
}
@@ -510,7 +473,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
@Override
protected void initializeGraphicalViewer() {
super.initializeGraphicalViewer();
-
// Enable Drop
getDiagramGraphicalViewer().addDropTargetListener(new DropTargetListener(getDiagramGraphicalViewer(), LocalSelectionTransfer.getTransfer()) {
@@ -525,7 +487,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
return getEditingDomain();
}
});
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorPlugin.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorPlugin.java
index e4125be5c57..b289fbd673c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorPlugin.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorPlugin.java
@@ -29,6 +29,7 @@ import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.tooling.runtime.LogHelper;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.infra.gmfdiag.preferences.Activator;
@@ -53,6 +54,11 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
/**
* @generated
*/
+ private LogHelper myLogHelper;
+
+ /**
+ * @generated
+ */
public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(ID);
/**
@@ -96,7 +102,6 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
adapterFactory = createAdapterFactory();
DiagramPreferenceInitializer diagramPreferenceInitializer = new DiagramPreferenceInitializer();
diagramPreferenceInitializer.initializeDefaultPreferences();
-
}
/**
@@ -126,7 +131,6 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
return store;
}
-
/**
* @generated
*/
@@ -269,10 +273,14 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
* @generated
*/
public void logError(String error, Throwable throwable) {
- if(error == null && throwable != null) {
+ if (error == null && throwable != null) {
error = throwable.getMessage();
}
- getLog().log(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, IStatus.OK, error, throwable));
+ getLog().log(new Status(
+ IStatus.ERROR,
+ UMLDiagramEditorPlugin.ID,
+ IStatus.OK,
+ error, throwable));
debug(error, throwable);
}
@@ -287,10 +295,14 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
* @generated
*/
public void logInfo(String message, Throwable throwable) {
- if(message == null && throwable != null) {
+ if (message == null && throwable != null) {
message = throwable.getMessage();
}
- getLog().log(new Status(IStatus.INFO, UMLDiagramEditorPlugin.ID, IStatus.OK, message, throwable));
+ getLog().log(new Status(
+ IStatus.INFO,
+ UMLDiagramEditorPlugin.ID,
+ IStatus.OK,
+ message, throwable));
debug(message, throwable);
}
@@ -298,14 +310,14 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
* @generated
*/
private void debug(String message, Throwable throwable) {
- if(!isDebugging()) {
+ if (!isDebugging()) {
return;
}
- if(message != null) {
+ if (message != null) {
System.err.println(message);
}
- if(throwable != null) {
+ if (throwable != null) {
throwable.printStackTrace();
}
}
-}
+} \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorUtil.java
index 0c6ae7ad673..c17811dde1f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorUtil.java
@@ -115,7 +115,6 @@ public class UMLDiagramEditorUtil {
return DefaultDiagramEditorUtil.getUniqueFileName(containerFullPath, fileName, extension, DefaultDiagramEditorUtil.EXISTS_IN_WORKSPACE);
}
-
/**
* Runs the wizard in a dialog.
*
@@ -149,19 +148,16 @@ public class UMLDiagramEditorUtil {
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Profile model = createInitialModel();
attachModelToResource(model, modelResource);
-
Diagram diagram = ViewService.createDiagram(model, ProfileDiagramEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
if(diagram != null) {
diagramResource.getContents().add(diagram);
diagram.setName(diagramName);
diagram.setElement(model);
}
-
try {
modelResource.save(org.eclipse.papyrus.uml.diagram.profile.part.UMLDiagramEditorUtil.getSaveOptions());
diagramResource.save(org.eclipse.papyrus.uml.diagram.profile.part.UMLDiagramEditorUtil.getSaveOptions());
} catch (IOException e) {
-
UMLDiagramEditorPlugin.getInstance().logError("Unable to store model and diagram resources", e); //$NON-NLS-1$
}
return CommandResult.newOKCommandResult();
@@ -202,7 +198,6 @@ public class UMLDiagramEditorUtil {
*/
public static void selectElementsInDiagram(IDiagramWorkbenchPart diagramPart, List<EditPart> editParts) {
diagramPart.getDiagramGraphicalViewer().deselectAll();
-
EditPart firstPrimary = null;
for(EditPart nextPart : editParts) {
diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
@@ -210,7 +205,6 @@ public class UMLDiagramEditorUtil {
firstPrimary = nextPart;
}
}
-
if(!editParts.isEmpty()) {
diagramPart.getDiagramGraphicalViewer().reveal(firstPrimary != null ? firstPrimary : (EditPart)editParts.get(0));
}
@@ -222,7 +216,6 @@ public class UMLDiagramEditorUtil {
private static int findElementsInDiagramByID(DiagramEditPart diagramPart, EObject element, List<EditPart> editPartCollector) {
IDiagramGraphicalViewer viewer = (IDiagramGraphicalViewer)diagramPart.getViewer();
final int intialNumOfEditParts = editPartCollector.size();
-
if(element instanceof View) { // support notation element lookup
EditPart editPart = (EditPart)viewer.getEditPartRegistry().get(element);
if(editPart != null) {
@@ -230,7 +223,6 @@ public class UMLDiagramEditorUtil {
return 1;
}
}
-
String elementID = EMFCoreUtil.getProxyID(element);
@SuppressWarnings("unchecked")
List<EditPart> associatedParts = viewer.findEditPartsForElement(elementID, IGraphicalEditPart.class);
@@ -244,7 +236,6 @@ public class UMLDiagramEditorUtil {
editPartCollector.add(nextPart);
}
}
-
if(intialNumOfEditParts == editPartCollector.size()) {
if(!associatedParts.isEmpty()) {
editPartCollector.add(associatedParts.get(0));
@@ -265,7 +256,6 @@ public class UMLDiagramEditorUtil {
if(targetElement.eResource() instanceof XMLResource) {
hasStructuralURI = ((XMLResource)targetElement.eResource()).getID(targetElement) == null;
}
-
View view = null;
LinkedList<EditPart> editPartHolder = new LinkedList<EditPart>();
if(hasStructuralURI && !lazyElement2ViewMap.getElement2ViewMap().isEmpty()) {
@@ -274,7 +264,6 @@ public class UMLDiagramEditorUtil {
EditPart editPart = editPartHolder.get(0);
view = editPart.getModel() instanceof View ? (View)editPart.getModel() : null;
}
-
return (view == null) ? diagramEditPart.getDiagramView() : view;
}
@@ -322,7 +311,6 @@ public class UMLDiagramEditorUtil {
}
}
}
-
buildElement2ViewMap(scope, element2ViewMap, elementSet);
}
return element2ViewMap;
@@ -335,7 +323,6 @@ public class UMLDiagramEditorUtil {
if(elements.size() == element2ViewMap.size()) {
return true;
}
-
if(parentView.isSetElement() && !element2ViewMap.containsKey(parentView.getElement()) && elements.contains(parentView.getElement())) {
element2ViewMap.put(parentView.getElement(), parentView);
if(elements.size() == element2ViewMap.size()) {
@@ -355,5 +342,4 @@ public class UMLDiagramEditorUtil {
return complete;
}
} //LazyElement2ViewMap
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdateCommand.java
index ae7322e45a7..27c03a9f41e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdateCommand.java
@@ -62,7 +62,6 @@ public class UMLDiagramUpdateCommand implements IHandler {
CanonicalEditPolicy nextEditPolicy = (CanonicalEditPolicy)it.next();
nextEditPolicy.refresh();
}
-
}
}
return null;
@@ -87,5 +86,4 @@ public class UMLDiagramUpdateCommand implements IHandler {
*/
public void removeHandlerListener(IHandlerListener handlerListener) {
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdater.java
index 83d6a4ecaf9..e27fe6b7d76 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdater.java
@@ -27,6 +27,12 @@ import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassAttributeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassAttributeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationCompartmentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
@@ -156,6 +162,14 @@ public class UMLDiagramUpdater {
return getDataTypeOperations_1068SemanticChildren(view);
case DataTypeOperationCompartmentEditPartCN.VISUAL_ID:
return getDataTypeOperations_1070SemanticChildren(view);
+ case ClassAttributeCompartmentEditPart.VISUAL_ID:
+ return getClassAttributes_7017SemanticChildren(view);
+ case ClassAttributeCompartmentEditPartCN.VISUAL_ID:
+ return getClassAttributes_7011SemanticChildren(view);
+ case ClassOperationCompartmentEditPart.VISUAL_ID:
+ return getClassOperations_7018SemanticChildren(view);
+ case ClassOperationCompartmentEditPartCN.VISUAL_ID:
+ return getClassOperations_7012SemanticChildren(view);
}
return Collections.emptyList();
}
@@ -180,6 +194,10 @@ public class UMLDiagramUpdater {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == ClassEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
if(visualID == MetaclassEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
@@ -304,6 +322,10 @@ public class UMLDiagramUpdater {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == ClassEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
for(Iterator<?> it = modelElement.getOwnedStereotypes().iterator(); it.hasNext();) {
Stereotype childElement = (Stereotype)it.next();
@@ -368,6 +390,10 @@ public class UMLDiagramUpdater {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == ClassEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
for(Iterator<?> it = modelElement.getOwnedStereotypes().iterator(); it.hasNext();) {
Stereotype childElement = (Stereotype)it.next();
@@ -436,6 +462,10 @@ public class UMLDiagramUpdater {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == ClassEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
Comment childElement = (Comment)it.next();
@@ -504,6 +534,10 @@ public class UMLDiagramUpdater {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == ClassEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
Comment childElement = (Comment)it.next();
@@ -664,6 +698,10 @@ public class UMLDiagramUpdater {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == ClassEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
return result;
}
@@ -720,6 +758,10 @@ public class UMLDiagramUpdater {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == ClassEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
return result;
}
@@ -868,6 +910,101 @@ public class UMLDiagramUpdater {
return result;
}
+ /**
+ * @generated
+ */
+ public static List<UMLNodeDescriptor> getClassAttributes_7017SemanticChildren(View view) {
+ if(false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Class modelElement = (Class)containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if(visualID == ClassPropertyEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public static List<UMLNodeDescriptor> getClassAttributes_7011SemanticChildren(View view) {
+ if(false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Class modelElement = (Class)containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if(visualID == ClassPropertyEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public static List<UMLNodeDescriptor> getClassOperations_7018SemanticChildren(View view) {
+ if(false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Class modelElement = (Class)containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for(Iterator<?> it = modelElement.getOwnedOperations().iterator(); it.hasNext();) {
+ Operation childElement = (Operation)it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if(visualID == ClassOperationEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public static List<UMLNodeDescriptor> getClassOperations_7012SemanticChildren(View view) {
+ if(false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Class modelElement = (Class)containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for(Iterator<?> it = modelElement.getOwnedOperations().iterator(); it.hasNext();) {
+ Operation childElement = (Operation)it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if(visualID == ClassOperationEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
/**
* @generated
@@ -882,6 +1019,8 @@ public class UMLDiagramUpdater {
return getAssociation_2015ContainedLinks(view);
case StereotypeEditPart.VISUAL_ID:
return getStereotype_1026ContainedLinks(view);
+ case ClassEditPart.VISUAL_ID:
+ return getClass_2008ContainedLinks(view);
case MetaclassEditPart.VISUAL_ID:
return getClass_1031ContainedLinks(view);
case CommentEditPart.VISUAL_ID:
@@ -916,6 +1055,8 @@ public class UMLDiagramUpdater {
return getOperation_3020ContainedLinks(view);
case StereotypeEditPartCN.VISUAL_ID:
return getStereotype_1023ContainedLinks(view);
+ case ClassEditPartCN.VISUAL_ID:
+ return getClass_3010ContainedLinks(view);
case MetaclassEditPartCN.VISUAL_ID:
return getClass_3028ContainedLinks(view);
case CommentEditPartCN.VISUAL_ID:
@@ -965,6 +1106,8 @@ public class UMLDiagramUpdater {
return getAssociation_2015IncomingLinks(view);
case StereotypeEditPart.VISUAL_ID:
return getStereotype_1026IncomingLinks(view);
+ case ClassEditPart.VISUAL_ID:
+ return getClass_2008IncomingLinks(view);
case MetaclassEditPart.VISUAL_ID:
return getClass_1031IncomingLinks(view);
case CommentEditPart.VISUAL_ID:
@@ -999,6 +1142,8 @@ public class UMLDiagramUpdater {
return getOperation_3020IncomingLinks(view);
case StereotypeEditPartCN.VISUAL_ID:
return getStereotype_1023IncomingLinks(view);
+ case ClassEditPartCN.VISUAL_ID:
+ return getClass_3010IncomingLinks(view);
case MetaclassEditPartCN.VISUAL_ID:
return getClass_3028IncomingLinks(view);
case CommentEditPartCN.VISUAL_ID:
@@ -1048,6 +1193,8 @@ public class UMLDiagramUpdater {
return getAssociation_2015OutgoingLinks(view);
case StereotypeEditPart.VISUAL_ID:
return getStereotype_1026OutgoingLinks(view);
+ case ClassEditPart.VISUAL_ID:
+ return getClass_2008OutgoingLinks(view);
case MetaclassEditPart.VISUAL_ID:
return getClass_1031OutgoingLinks(view);
case CommentEditPart.VISUAL_ID:
@@ -1082,6 +1229,8 @@ public class UMLDiagramUpdater {
return getOperation_3020OutgoingLinks(view);
case StereotypeEditPartCN.VISUAL_ID:
return getStereotype_1023OutgoingLinks(view);
+ case ClassEditPartCN.VISUAL_ID:
+ return getClass_3010OutgoingLinks(view);
case MetaclassEditPartCN.VISUAL_ID:
return getClass_3028OutgoingLinks(view);
case CommentEditPartCN.VISUAL_ID:
@@ -1171,6 +1320,18 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
+ public static List<UMLLinkDescriptor> getClass_2008ContainedLinks(View view) {
+ Class modelElement = (Class)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> getClass_1031ContainedLinks(View view) {
Class modelElement = (Class)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
@@ -1365,6 +1526,18 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
+ public static List<UMLLinkDescriptor> getClass_3010ContainedLinks(View view) {
+ Class modelElement = (Class)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> getClass_3028ContainedLinks(View view) {
Class modelElement = (Class)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
@@ -1605,6 +1778,26 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
+ public static List<UMLLinkDescriptor> getClass_2008IncomingLinks(View view) {
+ Class modelElement = (Class)view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingTypeModelFacetLinks_Extension_1013(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_4001(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List<UMLLinkDescriptor> getClass_1031IncomingLinks(View view) {
Class modelElement = (Class)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
@@ -1842,6 +2035,26 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
+ public static List<UMLLinkDescriptor> getClass_3010IncomingLinks(View view) {
+ Class modelElement = (Class)view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingTypeModelFacetLinks_Extension_1013(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_4001(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List<UMLLinkDescriptor> getClass_3028IncomingLinks(View view) {
Class modelElement = (Class)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
@@ -2157,6 +2370,22 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
+ public static List<UMLLinkDescriptor> getClass_2008OutgoingLinks(View view) {
+ Class modelElement = (Class)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> getClass_1031OutgoingLinks(View view) {
Class modelElement = (Class)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
@@ -2360,6 +2589,22 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
+ public static List<UMLLinkDescriptor> getClass_3010OutgoingLinks(View view) {
+ Class modelElement = (Class)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> getClass_3028OutgoingLinks(View view) {
Class modelElement = (Class)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
@@ -2583,7 +2828,7 @@ public class UMLDiagramUpdater {
continue;
}
Class dst = link.getMetaclass();
- List sources = link.getOwnedEnds();
+ List<?> sources = link.getOwnedEnds();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Property) {
continue;
@@ -2608,13 +2853,13 @@ public class UMLDiagramUpdater {
if(AssociationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getEndTypes();
+ List<?> targets = link.getEndTypes();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof Type) {
continue;
}
Type dst = (Type)theTarget;
- List sources = link.getEndTypes();
+ List<?> sources = link.getEndTypes();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Type) {
continue;
@@ -2660,13 +2905,13 @@ public class UMLDiagramUpdater {
if(AssociationBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getEndTypes();
+ List<?> targets = link.getEndTypes();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof Type) {
continue;
}
Type dst = (Type)theTarget;
- List sources = link.getEndTypes();
+ List<?> sources = link.getEndTypes();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Type) {
continue;
@@ -2711,13 +2956,13 @@ public class UMLDiagramUpdater {
if(DependencyEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getSuppliers();
+ List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof NamedElement) {
continue;
}
NamedElement dst = (NamedElement)theTarget;
- List sources = link.getClients();
+ List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof NamedElement) {
continue;
@@ -2742,13 +2987,13 @@ public class UMLDiagramUpdater {
if(DependencyBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getSuppliers();
+ List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof NamedElement) {
continue;
}
NamedElement dst = (NamedElement)theTarget;
- List sources = link.getClients();
+ List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof NamedElement) {
continue;
@@ -2815,7 +3060,7 @@ public class UMLDiagramUpdater {
if(ExtensionEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List sources = link.getOwnedEnds();
+ List<?> sources = link.getOwnedEnds();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Property) {
continue;
@@ -2840,7 +3085,7 @@ public class UMLDiagramUpdater {
if(AssociationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List sources = link.getEndTypes();
+ List<?> sources = link.getEndTypes();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Type) {
continue;
@@ -2885,7 +3130,7 @@ public class UMLDiagramUpdater {
if(AssociationBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List sources = link.getEndTypes();
+ List<?> sources = link.getEndTypes();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Type) {
continue;
@@ -2915,7 +3160,6 @@ public class UMLDiagramUpdater {
}
Classifier container = (Classifier)link.eContainer();
result.add(new UMLLinkDescriptor(container, target, link, UMLElementTypes.Generalization_4002, GeneralizationEditPart.VISUAL_ID));
-
}
return result;
}
@@ -2934,7 +3178,7 @@ public class UMLDiagramUpdater {
if(DependencyEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List sources = link.getClients();
+ List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof NamedElement) {
continue;
@@ -2959,7 +3203,7 @@ public class UMLDiagramUpdater {
if(DependencyBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List sources = link.getClients();
+ List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof NamedElement) {
continue;
@@ -3078,13 +3322,13 @@ public class UMLDiagramUpdater {
if(AssociationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getEndTypes();
+ List<?> targets = link.getEndTypes();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof Type) {
continue;
}
Type dst = (Type)theTarget;
- List sources = link.getEndTypes();
+ List<?> sources = link.getEndTypes();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Type) {
continue;
@@ -3160,13 +3404,13 @@ public class UMLDiagramUpdater {
if(AssociationBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getEndTypes();
+ List<?> targets = link.getEndTypes();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof Type) {
continue;
}
Type dst = (Type)theTarget;
- List sources = link.getEndTypes();
+ List<?> sources = link.getEndTypes();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Type) {
continue;
@@ -3206,13 +3450,13 @@ public class UMLDiagramUpdater {
if(DependencyEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getSuppliers();
+ List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof NamedElement) {
continue;
}
NamedElement dst = (NamedElement)theTarget;
- List sources = link.getClients();
+ List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof NamedElement) {
continue;
@@ -3252,13 +3496,13 @@ public class UMLDiagramUpdater {
if(DependencyBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getSuppliers();
+ List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof NamedElement) {
continue;
}
NamedElement dst = (NamedElement)theTarget;
- List sources = link.getClients();
+ List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof NamedElement) {
continue;
@@ -3389,7 +3633,6 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
-
public List<UMLNodeDescriptor> getSemanticChildren(View view) {
return UMLDiagramUpdater.getSemanticChildren(view);
}
@@ -3397,7 +3640,6 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
-
public List<UMLLinkDescriptor> getContainedLinks(View view) {
return UMLDiagramUpdater.getContainedLinks(view);
}
@@ -3405,7 +3647,6 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
-
public List<UMLLinkDescriptor> getIncomingLinks(View view) {
return UMLDiagramUpdater.getIncomingLinks(view);
}
@@ -3413,10 +3654,8 @@ public class UMLDiagramUpdater {
/**
* @generated
*/
-
public List<UMLLinkDescriptor> getOutgoingLinks(View view) {
return UMLDiagramUpdater.getOutgoingLinks(view);
}
};
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDocumentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDocumentProvider.java
index cdeeb5ec7b7..87bb35c3a42 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDocumentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDocumentProvider.java
@@ -82,7 +82,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
}
IEditorInput editorInput = (IEditorInput)element;
IDiagramDocument document = (IDiagramDocument)createDocument(editorInput);
-
ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
info.setModificationStamp(computeModificationStamp(info));
info.fStatus = null;
@@ -175,9 +174,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
public void setTarget(Notifier newTarget) {
myTarger = newTarget;
}
-
});
-
return editingDomain;
}
@@ -201,7 +198,8 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
}
if(!resource.isLoaded()) {
try {
- Map options = new HashMap(GMFResourceFactory.getDefaultLoadOptions());
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ Map<?, ?> options = new HashMap(GMFResourceFactory.getDefaultLoadOptions());
// @see 171060
// options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
resource.load(options);
@@ -217,7 +215,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
return;
}
} else {
- for(Iterator it = resource.getContents().iterator(); it.hasNext();) {
+ for(Iterator<EObject> it = resource.getContents().iterator(); it.hasNext();) {
Object rootElement = it.next();
if(rootElement instanceof Diagram) {
document.setContent((Diagram)rootElement);
@@ -302,7 +300,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
}
ResourcesPlugin.getWorkspace().validateEdit((IFile[])files2Validate.toArray(new IFile[files2Validate.size()]), computationContext);
}
-
super.doValidateState(element, computationContext);
}
@@ -474,7 +471,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
private ISchedulingRule computeSchedulingRule(IResource toCreateOrModify) {
if(toCreateOrModify.exists())
return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(toCreateOrModify);
-
IResource parent = toCreateOrModify;
do {
/*
@@ -486,7 +482,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
toCreateOrModify = parent;
parent = toCreateOrModify.getParent();
} while(parent != null && !parent.exists());
-
return ResourcesPlugin.getWorkspace().getRuleFactory().createRule(toCreateOrModify);
}
@@ -594,7 +589,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
}
}
changedResource.unload();
-
fireElementContentAboutToBeReplaced(info.getEditorInput());
removeUnchangedElementListeners(info.getEditorInput(), info);
info.fStatus = null;
@@ -914,9 +908,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
}
return true;
}
-
}
-
}
/**
@@ -954,7 +946,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
Resource resource = (Resource)notification.getNotifier();
if(resource.isLoaded()) {
boolean modified = false;
- for(Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = myInfo.getLoadedResourcesIterator(); it.hasNext() && !modified;) {
+ for(Iterator<Resource> it = myInfo.getLoadedResourcesIterator(); it.hasNext() && !modified;) {
Resource nextResource = (Resource)it.next();
if(nextResource.isLoaded()) {
modified = nextResource.isModified();
@@ -972,7 +964,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
}
if(dirtyStateChanged) {
fireElementDirtyStateChanged(myInfo.getEditorInput(), modified);
-
if(!modified) {
myInfo.setModificationStamp(computeModificationStamp(myInfo));
}
@@ -981,7 +972,5 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
}
}
}
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLLinkDescriptor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLLinkDescriptor.java
index 1d39ac68774..c44b651a22b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLLinkDescriptor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLLinkDescriptor.java
@@ -35,5 +35,4 @@ public class UMLLinkDescriptor extends UpdaterLinkDescriptor {
public UMLLinkDescriptor(EObject source, EObject destination, EObject linkElement, IElementType elementType, int linkVID) {
super(source, destination, linkElement, elementType, linkVID);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLMatchingStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLMatchingStrategy.java
index 04b4b5e1774..88943a00002 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLMatchingStrategy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLMatchingStrategy.java
@@ -34,7 +34,6 @@ public class UMLMatchingStrategy implements IEditorMatchingStrategy {
} catch (PartInitException e) {
return false;
}
-
if(editorInput.equals(input)) {
return true;
}
@@ -43,5 +42,4 @@ public class UMLMatchingStrategy implements IEditorMatchingStrategy {
}
return false;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNewDiagramFileWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNewDiagramFileWizard.java
index 00ec67372c5..e87dc2e8c5b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNewDiagramFileWizard.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNewDiagramFileWizard.java
@@ -69,7 +69,6 @@ public class UMLNewDiagramFileWizard extends Wizard {
assert domainModelURI != null : "Domain model uri must be specified"; //$NON-NLS-1$
assert diagramRoot != null : "Doagram root element must be specified"; //$NON-NLS-1$
assert editingDomain != null : "Editing domain must be specified"; //$NON-NLS-1$
-
myFileCreationPage = new WizardNewFileCreationPage(Messages.UMLNewDiagramFileWizard_CreationPageName, StructuredSelection.EMPTY);
myFileCreationPage.setTitle(Messages.UMLNewDiagramFileWizard_CreationPageTitle);
myFileCreationPage.setDescription(NLS.bind(Messages.UMLNewDiagramFileWizard_CreationPageDescription, ProfileDiagramEditPart.MODEL_ID));
@@ -85,12 +84,10 @@ public class UMLNewDiagramFileWizard extends Wizard {
}
myFileCreationPage.setContainerFullPath(filePath);
myFileCreationPage.setFileName(UMLDiagramEditorUtil.getUniqueFileName(filePath, fileName, "PapyrusUMLProfile_diagram")); //$NON-NLS-1$
-
diagramRootElementSelectionPage = new DiagramRootElementSelectionPage(Messages.UMLNewDiagramFileWizard_RootSelectionPageName);
diagramRootElementSelectionPage.setTitle(Messages.UMLNewDiagramFileWizard_RootSelectionPageTitle);
diagramRootElementSelectionPage.setDescription(Messages.UMLNewDiagramFileWizard_RootSelectionPageDescription);
diagramRootElementSelectionPage.setModelElement(diagramRoot);
-
myEditingDomain = editingDomain;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNodeDescriptor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNodeDescriptor.java
index 3c5b5af9ebd..efbb87c9759 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNodeDescriptor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNodeDescriptor.java
@@ -27,5 +27,4 @@ public class UMLNodeDescriptor extends UpdaterNodeDescriptor {
public UMLNodeDescriptor(EObject modelElement, int visualID) {
super(modelElement, visualID);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLPaletteFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLPaletteFactory.java
index 63817582520..279c01fdaa2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLPaletteFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLPaletteFactory.java
@@ -29,7 +29,6 @@ import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
public class UMLPaletteFactory extends PaletteFactory.Adapter {
//RS: New Palette generation
-
//Generates the ID for the tool elements
//Generate the tool factory (if(ID) createtool...)
/**
@@ -60,37 +59,42 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
/**
* @generated
*/
- private final static String CREATEIMPORTMETACLASS6CREATIONTOOL = "createImportMetaclass6CreationTool";//$NON-NLS-1$
+ private final static String CREATECLASS6CREATIONTOOL = "createClass6CreationTool";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CREATEIMPORTMETACLASS7CREATIONTOOL = "createImportMetaclass7CreationTool";//$NON-NLS-1$
/**
* @generated
*/
- private final static String CREATEENUMERATION7CREATIONTOOL = "createEnumeration7CreationTool";//$NON-NLS-1$
+ private final static String CREATEENUMERATION8CREATIONTOOL = "createEnumeration8CreationTool";//$NON-NLS-1$
/**
* @generated
*/
- private final static String CREATEDATATYPE8CREATIONTOOL = "createDataType8CreationTool";//$NON-NLS-1$
+ private final static String CREATEDATATYPE9CREATIONTOOL = "createDataType9CreationTool";//$NON-NLS-1$
/**
* @generated
*/
- private final static String CREATEPRIMITIVETYPE9CREATIONTOOL = "createPrimitiveType9CreationTool";//$NON-NLS-1$
+ private final static String CREATEPRIMITIVETYPE10CREATIONTOOL = "createPrimitiveType10CreationTool";//$NON-NLS-1$
/**
* @generated
*/
- private final static String CREATEPROPERTY10CREATIONTOOL = "createProperty10CreationTool";//$NON-NLS-1$
+ private final static String CREATEPROPERTY11CREATIONTOOL = "createProperty11CreationTool";//$NON-NLS-1$
/**
* @generated
*/
- private final static String CREATEOPERATION11CREATIONTOOL = "createOperation11CreationTool";//$NON-NLS-1$
+ private final static String CREATEOPERATION12CREATIONTOOL = "createOperation12CreationTool";//$NON-NLS-1$
/**
* @generated
*/
- private final static String CREATEENUMERATIONLITERAL12CREATIONTOOL = "createEnumerationLiteral12CreationTool";//$NON-NLS-1$
+ private final static String CREATEENUMERATIONLITERAL13CREATIONTOOL = "createEnumerationLiteral13CreationTool";//$NON-NLS-1$
/**
* @generated
@@ -126,7 +130,6 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
* @generated
*/
public UMLPaletteFactory() {
-
}
/**
@@ -148,26 +151,29 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
if(toolId.equals(CREATESTEREOTYPE5CREATIONTOOL)) {
return createStereotype5CreationTool();
}
- if(toolId.equals(CREATEIMPORTMETACLASS6CREATIONTOOL)) {
- return createImportMetaclass6CreationTool();
+ if(toolId.equals(CREATECLASS6CREATIONTOOL)) {
+ return createClass6CreationTool();
+ }
+ if(toolId.equals(CREATEIMPORTMETACLASS7CREATIONTOOL)) {
+ return createImportMetaclass7CreationTool();
}
- if(toolId.equals(CREATEENUMERATION7CREATIONTOOL)) {
- return createEnumeration7CreationTool();
+ if(toolId.equals(CREATEENUMERATION8CREATIONTOOL)) {
+ return createEnumeration8CreationTool();
}
- if(toolId.equals(CREATEDATATYPE8CREATIONTOOL)) {
- return createDataType8CreationTool();
+ if(toolId.equals(CREATEDATATYPE9CREATIONTOOL)) {
+ return createDataType9CreationTool();
}
- if(toolId.equals(CREATEPRIMITIVETYPE9CREATIONTOOL)) {
- return createPrimitiveType9CreationTool();
+ if(toolId.equals(CREATEPRIMITIVETYPE10CREATIONTOOL)) {
+ return createPrimitiveType10CreationTool();
}
- if(toolId.equals(CREATEPROPERTY10CREATIONTOOL)) {
- return createProperty10CreationTool();
+ if(toolId.equals(CREATEPROPERTY11CREATIONTOOL)) {
+ return createProperty11CreationTool();
}
- if(toolId.equals(CREATEOPERATION11CREATIONTOOL)) {
- return createOperation11CreationTool();
+ if(toolId.equals(CREATEOPERATION12CREATIONTOOL)) {
+ return createOperation12CreationTool();
}
- if(toolId.equals(CREATEENUMERATIONLITERAL12CREATIONTOOL)) {
- return createEnumerationLiteral12CreationTool();
+ if(toolId.equals(CREATEENUMERATIONLITERAL13CREATIONTOOL)) {
+ return createEnumerationLiteral13CreationTool();
}
if(toolId.equals(CREATEEXTENSION1CREATIONTOOL)) {
return createExtension1CreationTool();
@@ -195,12 +201,10 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
* @generated
*/
public Object getTemplate(String templateId) {
-
// default return: null
return null;
}
-
/**
* @generated
*/
@@ -259,7 +263,18 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
/**
* @generated
*/
- private Tool createImportMetaclass6CreationTool() {
+ private Tool createClass6CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.Class_3010);
+ types.add(UMLElementTypes.Class_2008);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createImportMetaclass7CreationTool() {
List<IElementType> types = new ArrayList<IElementType>(2);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Class_3028);
@@ -270,7 +285,7 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
/**
* @generated
*/
- private Tool createEnumeration7CreationTool() {
+ private Tool createEnumeration8CreationTool() {
List<IElementType> types = new ArrayList<IElementType>(2);
types.add(UMLElementTypes.Enumeration_2006);
types.add(UMLElementTypes.Enumeration_3025);
@@ -281,7 +296,7 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
/**
* @generated
*/
- private Tool createDataType8CreationTool() {
+ private Tool createDataType9CreationTool() {
List<IElementType> types = new ArrayList<IElementType>(2);
types.add(UMLElementTypes.DataType_2010);
types.add(UMLElementTypes.DataType_3027);
@@ -292,7 +307,7 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
/**
* @generated
*/
- private Tool createPrimitiveType9CreationTool() {
+ private Tool createPrimitiveType10CreationTool() {
List<IElementType> types = new ArrayList<IElementType>(2);
types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.PrimitiveType_3026);
@@ -303,7 +318,7 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
/**
* @generated
*/
- private Tool createProperty10CreationTool() {
+ private Tool createProperty11CreationTool() {
List<IElementType> types = new ArrayList<IElementType>(2);
types.add(UMLElementTypes.Property_3002);
types.add(UMLElementTypes.Property_3018);
@@ -314,7 +329,7 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
/**
* @generated
*/
- private Tool createOperation11CreationTool() {
+ private Tool createOperation12CreationTool() {
List<IElementType> types = new ArrayList<IElementType>(2);
types.add(UMLElementTypes.Operation_3019);
types.add(UMLElementTypes.Operation_3020);
@@ -325,7 +340,7 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
/**
* @generated
*/
- private Tool createEnumerationLiteral12CreationTool() {
+ private Tool createEnumerationLiteral13CreationTool() {
List<IElementType> types = new ArrayList<IElementType>(1);
types.add(UMLElementTypes.EnumerationLiteral_1037);
Tool tool = new AspectUnspecifiedTypeCreationTool(types);
@@ -392,5 +407,4 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter {
Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
return tool;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLUriEditorInputTester.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLUriEditorInputTester.java
index 7c120b80806..ac59ee8cfcd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLUriEditorInputTester.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLUriEditorInputTester.java
@@ -31,5 +31,4 @@ public class UMLUriEditorInputTester extends PropertyTester {
URIEditorInput editorInput = (URIEditorInput)receiver;
return "PapyrusUMLProfile_diagram".equals(editorInput.getURI().fileExtension()); //$NON-NLS-1$
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLVisualIDRegistry.java
index 6c3c15617b8..d4e0a3bd232 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLVisualIDRegistry.java
@@ -1,15 +1,15 @@
/*
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *
+ *
+ *
*/
package org.eclipse.papyrus.uml.diagram.profile.part;
@@ -20,106 +20,20 @@ import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.gmf.tooling.runtime.structure.DiagramStructure;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AppliedStereotypeElementImportEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchMultiplicityEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchRoleEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationMultiplicitySourceEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationMultiplicityTargetEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationRoleSourceEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationRoleTargetEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentBodyEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentBodyEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintBodyEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintBodyEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeAttributeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeAttributeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeOperationCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeOperationCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeOperationEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypePropertyEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DiagramNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportAliasEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationEnumerationLiteralCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationEnumerationLiteralCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationLiteralEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ExtensionEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.GeneralizationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.MetaclassEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.MetaclassEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.MetaclassNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.MetaclassNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelEditPartTN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelPackageableElementCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelPackageableElementCompartmentEditPartTN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.MultiDependencyLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageImportAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageImportEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PrimitiveTypeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PrimitiveTypeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PrimitiveTypeNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PrimitiveTypeNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfileApplicationEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfileDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfileEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfileEditPartTN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfileNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfileNameEditPartTN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfilePackageableElementCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfilePackageableElementCompartmentEditPartTN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ShortCutDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeAttributeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeAttributeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeOperationCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeOperationCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.common.util.Util;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.*;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.Type;
import org.eclipse.uml2.uml.UMLPackage;
/**
* This registry is used to determine which type of visual object should be
* created for the corresponding Diagram, Node, ChildNode or Link represented
* by a domain model object.
- *
+ *
* @generated
*/
public class UMLVisualIDRegistry {
@@ -151,7 +65,7 @@ public class UMLVisualIDRegistry {
while(view != diagram) {
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation != null) {
- return (String)annotation.getDetails().get("modelID"); //$NON-NLS-1$
+ return annotation.getDetails().get("modelID"); //$NON-NLS-1$
}
view = (View)view.eContainer();
}
@@ -190,7 +104,8 @@ public class UMLVisualIDRegistry {
}
/**
- * @generated
+ * @generated NOT
+ * we manually test if it's a class or a metaclass
*/
public static int getNodeVisualID(View containerView, EObject domainElement) {
if(domainElement == null) {
@@ -222,7 +137,12 @@ public class UMLVisualIDRegistry {
return StereotypeEditPart.VISUAL_ID;
}
if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
- return MetaclassEditPart.VISUAL_ID;
+ if(domainElement instanceof Type) {
+ if(Util.isMetaclass((Type)domainElement)) {
+ return MetaclassEditPart.VISUAL_ID;
+ }
+ }
+ return ClassEditPart.VISUAL_ID;
}
if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPart.VISUAL_ID;
@@ -285,6 +205,9 @@ public class UMLVisualIDRegistry {
if(UMLPackage.eINSTANCE.getStereotype().isSuperTypeOf(domainElement.eClass())) {
return StereotypeEditPartCN.VISUAL_ID;
}
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ return ClassEditPartCN.VISUAL_ID;
+ }
break;
case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
@@ -314,6 +237,9 @@ public class UMLVisualIDRegistry {
if(UMLPackage.eINSTANCE.getStereotype().isSuperTypeOf(domainElement.eClass())) {
return StereotypeEditPartCN.VISUAL_ID;
}
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ return ClassEditPartCN.VISUAL_ID;
+ }
break;
case ProfilePackageableElementCompartmentEditPartTN.VISUAL_ID:
if(UMLPackage.eINSTANCE.getStereotype().isSuperTypeOf(domainElement.eClass())) {
@@ -344,7 +270,12 @@ public class UMLVisualIDRegistry {
return CommentEditPartCN.VISUAL_ID;
}
if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
- return MetaclassEditPartCN.VISUAL_ID;
+ if(domainElement instanceof Type) {
+ if(Util.isMetaclass((Type)domainElement)) {
+ return MetaclassEditPartCN.VISUAL_ID;
+ }
+ }
+ return ClassEditPartCN.VISUAL_ID;
}
break;
case ProfilePackageableElementCompartmentEditPartCN.VISUAL_ID:
@@ -376,7 +307,12 @@ public class UMLVisualIDRegistry {
return CommentEditPartCN.VISUAL_ID;
}
if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
- return MetaclassEditPartCN.VISUAL_ID;
+ if(domainElement instanceof Type) {
+ if(Util.isMetaclass((Type)domainElement)) {
+ return MetaclassEditPartCN.VISUAL_ID;
+ }
+ }
+ return ClassEditPartCN.VISUAL_ID;
}
break;
case StereotypeAttributeCompartmentEditPart.VISUAL_ID:
@@ -424,6 +360,9 @@ public class UMLVisualIDRegistry {
if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ return ClassEditPartCN.VISUAL_ID;
+ }
break;
case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
@@ -450,6 +389,9 @@ public class UMLVisualIDRegistry {
if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ return ClassEditPartCN.VISUAL_ID;
+ }
break;
case EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID:
if(UMLPackage.eINSTANCE.getEnumerationLiteral().isSuperTypeOf(domainElement.eClass())) {
@@ -481,6 +423,26 @@ public class UMLVisualIDRegistry {
return DataTypeOperationEditPart.VISUAL_ID;
}
break;
+ case ClassAttributeCompartmentEditPart.VISUAL_ID:
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass())) {
+ return ClassPropertyEditPart.VISUAL_ID;
+ }
+ break;
+ case ClassAttributeCompartmentEditPartCN.VISUAL_ID:
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass())) {
+ return ClassPropertyEditPart.VISUAL_ID;
+ }
+ break;
+ case ClassOperationCompartmentEditPart.VISUAL_ID:
+ if(UMLPackage.eINSTANCE.getOperation().isSuperTypeOf(domainElement.eClass())) {
+ return ClassOperationEditPart.VISUAL_ID;
+ }
+ break;
+ case ClassOperationCompartmentEditPartCN.VISUAL_ID:
+ if(UMLPackage.eINSTANCE.getOperation().isSuperTypeOf(domainElement.eClass())) {
+ return ClassOperationEditPart.VISUAL_ID;
+ }
+ break;
}
return -1;
}
@@ -514,6 +476,9 @@ public class UMLVisualIDRegistry {
if(StereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(ClassEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if(MetaclassEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -561,6 +526,17 @@ public class UMLVisualIDRegistry {
return true;
}
break;
+ case ClassEditPart.VISUAL_ID:
+ if(ClassNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if(ClassOperationCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if(ClassAttributeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
case MetaclassEditPart.VISUAL_ID:
if(MetaclassNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
@@ -648,6 +624,17 @@ public class UMLVisualIDRegistry {
return true;
}
break;
+ case ClassEditPartCN.VISUAL_ID:
+ if(ClassNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if(ClassAttributeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if(ClassOperationCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
case MetaclassEditPartCN.VISUAL_ID:
if(MetaclassNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
@@ -740,6 +727,9 @@ public class UMLVisualIDRegistry {
if(StereotypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(ClassEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
@@ -769,6 +759,9 @@ public class UMLVisualIDRegistry {
if(StereotypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(ClassEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case ProfilePackageableElementCompartmentEditPartTN.VISUAL_ID:
if(StereotypeEditPartCN.VISUAL_ID == nodeVisualID) {
@@ -801,6 +794,9 @@ public class UMLVisualIDRegistry {
if(MetaclassEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(ClassEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case ProfilePackageableElementCompartmentEditPartCN.VISUAL_ID:
if(StereotypeEditPartCN.VISUAL_ID == nodeVisualID) {
@@ -833,6 +829,9 @@ public class UMLVisualIDRegistry {
if(MetaclassEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(ClassEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case StereotypeAttributeCompartmentEditPart.VISUAL_ID:
if(ClassPropertyEditPart.VISUAL_ID == nodeVisualID) {
@@ -879,6 +878,9 @@ public class UMLVisualIDRegistry {
if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(ClassEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
@@ -905,6 +907,9 @@ public class UMLVisualIDRegistry {
if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(ClassEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID:
if(EnumerationLiteralEditPart.VISUAL_ID == nodeVisualID) {
@@ -936,6 +941,26 @@ public class UMLVisualIDRegistry {
return true;
}
break;
+ case ClassAttributeCompartmentEditPart.VISUAL_ID:
+ if(ClassPropertyEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ClassAttributeCompartmentEditPartCN.VISUAL_ID:
+ if(ClassPropertyEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ClassOperationCompartmentEditPart.VISUAL_ID:
+ if(ClassOperationEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ClassOperationCompartmentEditPartCN.VISUAL_ID:
+ if(ClassOperationEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
case AssociationEditPart.VISUAL_ID:
if(AssociationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
@@ -1034,14 +1059,13 @@ public class UMLVisualIDRegistry {
/**
* User can change implementation of this method to handle some specific
* situations not covered by default logic.
- *
+ *
* @generated
*/
private static boolean isDiagram(Profile element) {
return true;
}
-
/**
* @generated
*/
@@ -1075,6 +1099,10 @@ public class UMLVisualIDRegistry {
case DataTypeAttributeCompartmentEditPartCN.VISUAL_ID:
case DataTypeOperationCompartmentEditPart.VISUAL_ID:
case DataTypeOperationCompartmentEditPartCN.VISUAL_ID:
+ case ClassAttributeCompartmentEditPart.VISUAL_ID:
+ case ClassAttributeCompartmentEditPartCN.VISUAL_ID:
+ case ClassOperationCompartmentEditPart.VISUAL_ID:
+ case ClassOperationCompartmentEditPartCN.VISUAL_ID:
return true;
default:
break;
@@ -1165,5 +1193,4 @@ public class UMLVisualIDRegistry {
return org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry.isSemanticLeafVisualID(visualID);
}
};
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ValidateAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ValidateAction.java
index 3146d914afd..248915ad7d2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ValidateAction.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ValidateAction.java
@@ -44,6 +44,8 @@ import org.eclipse.jface.action.Action;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLMarkerNavigationProvider;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLValidationProvider;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
@@ -110,7 +112,11 @@ public class ValidateAction extends Action {
* @generated
*/
public static void runNonUIValidation(View view) {
- DiagramEditPart diagramEditPart = OffscreenEditPartFactory.getInstance().createDiagramEditPart(view.getDiagram());
+ Shell shell = Display.getCurrent().getActiveShell();
+ if(shell == null) {
+ shell = new Shell();
+ }
+ DiagramEditPart diagramEditPart = OffscreenEditPartFactory.getInstance().createDiagramEditPart(view.getDiagram(), shell);
runValidation(diagramEditPart, view);
}
@@ -187,11 +193,11 @@ public class ValidateAction extends Action {
return;
}
final Diagnostic rootStatus = emfValidationStatus;
- List allDiagnostics = new ArrayList();
+ List<Diagnostic> allDiagnostics = new ArrayList<Diagnostic>();
UMLDiagramEditorUtil.LazyElement2ViewMap element2ViewMap = new UMLDiagramEditorUtil.LazyElement2ViewMap(diagramEditPart.getDiagramView(), collectTargetElements(rootStatus, new HashSet<EObject>(), allDiagnostics));
- for(Iterator it = emfValidationStatus.getChildren().iterator(); it.hasNext();) {
+ for(Iterator<Diagnostic> it = emfValidationStatus.getChildren().iterator(); it.hasNext();) {
Diagnostic nextDiagnostic = (Diagnostic)it.next();
- List data = nextDiagnostic.getData();
+ List<?> data = nextDiagnostic.getData();
if(data != null && !data.isEmpty() && data.get(0) instanceof EObject) {
EObject element = (EObject)data.get(0);
View view = UMLDiagramEditorUtil.findView(diagramEditPart, element, element2ViewMap);
@@ -229,10 +235,10 @@ public class ValidateAction extends Action {
/**
* @generated
*/
- private static Set<EObject> collectTargetElements(IStatus status, Set<EObject> targetElementCollector, List allConstraintStatuses) {
+ private static Set<EObject> collectTargetElements(IStatus status, Set<EObject> targetElementCollector, List<IConstraintStatus> allConstraintStatuses) {
if(status instanceof IConstraintStatus) {
targetElementCollector.add(((IConstraintStatus)status).getTarget());
- allConstraintStatuses.add(status);
+ allConstraintStatuses.add((IConstraintStatus)status);
}
if(status.isMultiStatus()) {
IStatus[] children = status.getChildren();
@@ -246,8 +252,8 @@ public class ValidateAction extends Action {
/**
* @generated
*/
- private static Set<EObject> collectTargetElements(Diagnostic diagnostic, Set<EObject> targetElementCollector, List allDiagnostics) {
- List data = diagnostic.getData();
+ private static Set<EObject> collectTargetElements(Diagnostic diagnostic, Set<EObject> targetElementCollector, List<Diagnostic> allDiagnostics) {
+ List<?> data = diagnostic.getData();
EObject target = null;
if(data != null && !data.isEmpty() && data.get(0) instanceof EObject) {
target = (EObject)data.get(0);
@@ -255,7 +261,7 @@ public class ValidateAction extends Action {
allDiagnostics.add(diagnostic);
}
if(diagnostic.getChildren() != null && !diagnostic.getChildren().isEmpty()) {
- for(Iterator it = diagnostic.getChildren().iterator(); it.hasNext();) {
+ for(Iterator<Diagnostic> it = diagnostic.getChildren().iterator(); it.hasNext();) {
collectTargetElements((Diagnostic)it.next(), targetElementCollector, allDiagnostics);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/preferences/DiagramPreferenceInitializer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/preferences/DiagramPreferenceInitializer.java
index cc7f6ac9ebc..ce263b55df9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/preferences/DiagramPreferenceInitializer.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/preferences/DiagramPreferenceInitializer.java
@@ -32,7 +32,6 @@ public class DiagramPreferenceInitializer extends AbstractPreferenceInitializer
DiagramConnectionsPreferencePage.initDefaults(store);
DiagramPrintingPreferencePage.initDefaults(store);
DiagramRulersAndGridPreferencePage.initDefaults(store);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/ElementInitializers.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/ElementInitializers.java
index da96e10a479..bddde53be59 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/ElementInitializers.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/ElementInitializers.java
@@ -59,6 +59,18 @@ public class ElementInitializers {
/**
* @generated
*/
+ public void init_Class_2008(Class instance) {
+ try {
+ Object value_0 = name_Class_2008(instance);
+ instance.setName((String)value_0);
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
public void init_Class_1031(Class instance) {
try {
Object value_0 = isAbstract_Class_1031(instance);
@@ -253,6 +265,18 @@ public class ElementInitializers {
/**
* @generated
*/
+ public void init_Class_3010(Class instance) {
+ try {
+ Object value_0 = name_Class_3010(instance);
+ instance.setName((String)value_0);
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
public void init_Class_3028(Class instance) {
try {
Object value_0 = isAbstract_Class_3028(instance);
@@ -406,6 +430,13 @@ public class ElementInitializers {
/**
* @generated
*/
+ private String name_Class_2008(Class it) {
+ return NamedElementUtil.getDefaultNameWithIncrementFromBase(it.eClass().getName(), it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
private Boolean isAbstract_Class_1031(Class it) {
//isAbstract = true
return true;
@@ -528,6 +559,13 @@ public class ElementInitializers {
/**
* @generated
*/
+ private String name_Class_3010(Class it) {
+ return NamedElementUtil.getDefaultNameWithIncrementFromBase(it.eClass().getName(), it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
private Boolean isAbstract_Class_3028(Class it) {
//isAbstract = true
return true;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLEditPartProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLEditPartProvider.java
index 13dfbd0f678..c83ae8d346c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLEditPartProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLEditPartProvider.java
@@ -29,5 +29,4 @@ public class UMLEditPartProvider extends DefaultEditPartProvider {
public UMLEditPartProvider() {
super(new UMLEditPartFactory(), UMLVisualIDRegistry.TYPED_INSTANCE, ProfileDiagramEditPart.MODEL_ID);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLElementTypes.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLElementTypes.java
index 17b64c344a1..88aef624dc4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLElementTypes.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLElementTypes.java
@@ -29,6 +29,8 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
@@ -120,6 +122,11 @@ public class UMLElementTypes {
/**
* @generated
*/
+ public static final IElementType Class_2008 = getElementType("org.eclipse.papyrus.uml.diagram.profile.Class_2008"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
public static final IElementType Class_1031 = getElementType("org.eclipse.papyrus.uml.diagram.profile.Metaclass_1031"); //$NON-NLS-1$
/**
@@ -205,6 +212,11 @@ public class UMLElementTypes {
/**
* @generated
*/
+ public static final IElementType Class_3010 = getElementType("org.eclipse.papyrus.uml.diagram.profile.Class_3010"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
public static final IElementType Class_3028 = getElementType("org.eclipse.papyrus.uml.diagram.profile.Metaclass_3028"); //$NON-NLS-1$
/**
@@ -339,124 +351,48 @@ public class UMLElementTypes {
Object type = hint.getAdapter(IElementType.class);
if(elements == null) {
elements = new IdentityHashMap<IElementType, ENamedElement>();
-
elements.put(Profile_1000, UMLPackage.eINSTANCE.getProfile());
-
-
elements.put(Dependency_2014, UMLPackage.eINSTANCE.getDependency());
-
-
elements.put(Association_2015, UMLPackage.eINSTANCE.getAssociation());
-
-
elements.put(Stereotype_1026, UMLPackage.eINSTANCE.getStereotype());
-
-
+ elements.put(Class_2008, UMLPackage.eINSTANCE.getClass_());
elements.put(Class_1031, UMLPackage.eINSTANCE.getClass_());
-
-
elements.put(Comment_1002, UMLPackage.eINSTANCE.getComment());
-
-
elements.put(Constraint_1014, UMLPackage.eINSTANCE.getConstraint());
-
-
elements.put(Model_2005, UMLPackage.eINSTANCE.getModel());
-
-
elements.put(Profile_1030, UMLPackage.eINSTANCE.getProfile());
-
-
elements.put(Package_2007, UMLPackage.eINSTANCE.getPackage());
-
-
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());
-
-
elements.put(EnumerationLiteral_1037, UMLPackage.eINSTANCE.getEnumerationLiteral());
-
-
elements.put(Property_3018, UMLPackage.eINSTANCE.getProperty());
-
-
elements.put(Property_3002, UMLPackage.eINSTANCE.getProperty());
-
-
elements.put(Operation_3020, UMLPackage.eINSTANCE.getOperation());
-
-
elements.put(Stereotype_1023, UMLPackage.eINSTANCE.getStereotype());
-
-
+ elements.put(Class_3010, UMLPackage.eINSTANCE.getClass_());
elements.put(Class_3028, UMLPackage.eINSTANCE.getClass_());
-
-
elements.put(Comment_1007, UMLPackage.eINSTANCE.getComment());
-
-
elements.put(Model_1027, UMLPackage.eINSTANCE.getModel());
-
-
elements.put(Profile_1024, UMLPackage.eINSTANCE.getProfile());
-
-
elements.put(Package_1012, UMLPackage.eINSTANCE.getPackage());
-
-
elements.put(Constraint_1028, UMLPackage.eINSTANCE.getConstraint());
-
-
elements.put(Enumeration_3025, UMLPackage.eINSTANCE.getEnumeration());
-
-
elements.put(DataType_3027, UMLPackage.eINSTANCE.getDataType());
-
-
elements.put(Extension_1013, UMLPackage.eINSTANCE.getExtension());
-
-
elements.put(Association_4001, UMLPackage.eINSTANCE.getAssociation());
-
-
elements.put(ProfileApplication_1045, UMLPackage.eINSTANCE.getProfileApplication());
-
-
elements.put(Association_4019, UMLPackage.eINSTANCE.getAssociation());
-
-
elements.put(Generalization_4002, UMLPackage.eINSTANCE.getGeneralization());
-
-
elements.put(Dependency_4008, UMLPackage.eINSTANCE.getDependency());
-
-
elements.put(Dependency_4018, UMLPackage.eINSTANCE.getDependency());
-
-
elements.put(ElementImport_1064, UMLPackage.eINSTANCE.getElementImport());
-
-
elements.put(PackageImport_1065, UMLPackage.eINSTANCE.getPackageImport());
-
elements.put(CommentAnnotatedElement_1022, UMLPackage.eINSTANCE.getComment_AnnotatedElement());
-
elements.put(ConstraintConstrainedElement_4014, UMLPackage.eINSTANCE.getConstraint_ConstrainedElement());
-
elements.put(ConstraintContext_8500, UMLPackage.eINSTANCE.getConstraint_Context());
}
return (ENamedElement)elements.get(type);
@@ -479,6 +415,7 @@ public class UMLElementTypes {
KNOWN_ELEMENT_TYPES.add(Dependency_2014);
KNOWN_ELEMENT_TYPES.add(Association_2015);
KNOWN_ELEMENT_TYPES.add(Stereotype_1026);
+ KNOWN_ELEMENT_TYPES.add(Class_2008);
KNOWN_ELEMENT_TYPES.add(Class_1031);
KNOWN_ELEMENT_TYPES.add(Comment_1002);
KNOWN_ELEMENT_TYPES.add(Constraint_1014);
@@ -496,6 +433,7 @@ public class UMLElementTypes {
KNOWN_ELEMENT_TYPES.add(Property_3002);
KNOWN_ELEMENT_TYPES.add(Operation_3020);
KNOWN_ELEMENT_TYPES.add(Stereotype_1023);
+ KNOWN_ELEMENT_TYPES.add(Class_3010);
KNOWN_ELEMENT_TYPES.add(Class_3028);
KNOWN_ELEMENT_TYPES.add(Comment_1007);
KNOWN_ELEMENT_TYPES.add(Model_1027);
@@ -533,6 +471,8 @@ public class UMLElementTypes {
return Association_2015;
case StereotypeEditPart.VISUAL_ID:
return Stereotype_1026;
+ case ClassEditPart.VISUAL_ID:
+ return Class_2008;
case MetaclassEditPart.VISUAL_ID:
return Class_1031;
case CommentEditPart.VISUAL_ID:
@@ -567,6 +507,8 @@ public class UMLElementTypes {
return Operation_3020;
case StereotypeEditPartCN.VISUAL_ID:
return Stereotype_1023;
+ case ClassEditPartCN.VISUAL_ID:
+ return Class_3010;
case MetaclassEditPartCN.VISUAL_ID:
return Class_3028;
case CommentEditPartCN.VISUAL_ID:
@@ -640,5 +582,4 @@ public class UMLElementTypes {
return org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes.getElement(elementTypeAdapter);
}
};
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLIconProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLIconProvider.java
index 9a67e717fd2..cdcac28418c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLIconProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLIconProvider.java
@@ -27,5 +27,4 @@ public class UMLIconProvider extends DefaultElementTypeIconProvider implements I
public UMLIconProvider() {
super(UMLElementTypes.TYPED_INSTANCE);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLParserProvider.java
index 785345d5a01..64e73b4312f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLParserProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLParserProvider.java
@@ -38,6 +38,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationMultiplicit
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationNameEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationRoleSourceEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationRoleTargetEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassNameEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassNameEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentBodyEditPart;
@@ -118,6 +120,23 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser className_5029Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getClassName_5029Parser() {
+ if(className_5029Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ className_5029Parser = parser;
+ }
+ return className_5029Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser className_1084Parser;
/**
@@ -420,6 +439,23 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser className_5014Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getClassName_5014Parser() {
+ if(className_5014Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ className_5014Parser = parser;
+ }
+ return className_5014Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser className_5062Parser;
/**
@@ -806,6 +842,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
return getDependencyName_1Parser();
case StereotypeNameEditPart.VISUAL_ID:
return getStereotypeName_1034Parser();
+ case ClassNameEditPart.VISUAL_ID:
+ return getClassName_5029Parser();
case MetaclassNameEditPart.VISUAL_ID:
return getClassName_1084Parser();
case CommentBodyEditPart.VISUAL_ID:
@@ -842,6 +880,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
return getOperation_3020Parser();
case StereotypeNameEditPartCN.VISUAL_ID:
return getStereotypeName_1046Parser();
+ case ClassNameEditPartCN.VISUAL_ID:
+ return getClassName_5014Parser();
case MetaclassNameEditPartCN.VISUAL_ID:
return getClassName_5062Parser();
case CommentBodyEditPartCN.VISUAL_ID:
@@ -956,5 +996,4 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
return super.getAdapter(adapter);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationDecoratorProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationDecoratorProvider.java
index c2080483711..e05c89cb8ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationDecoratorProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationDecoratorProvider.java
@@ -68,6 +68,4 @@ public class UMLValidationDecoratorProvider extends ValidationDecoratorProvider
View view = (View)decoratorTarget.getAdapter(View.class);
return view != null && ProfileDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationProvider.java
index 6df12be1728..99d87b6323f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationProvider.java
@@ -75,8 +75,4 @@ public class UMLValidationProvider {
}
return true;
}
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLViewProvider.java
index 427768c049b..e91706e7bee 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLViewProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLViewProvider.java
@@ -58,6 +58,7 @@ import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.*;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AppliedStereotypeElementImportEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
@@ -190,18 +191,15 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
if (op.getViewKind() == Edge.class)
return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
*/
-
// check Diagram Type should be the class diagram
String modelID = UMLVisualIDRegistry.getModelID(op.getContainerView());
if(!getDiagramProvidedId().equals(modelID)) {
return false;
}
-
int visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint());
if(Node.class.isAssignableFrom(op.getViewKind())) {
return UMLVisualIDRegistry.canCreateNode(op.getContainerView(), visualID);
}
-
return true;
}
@@ -273,6 +271,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
case DependencyNodeEditPart.VISUAL_ID:
case AssociationNodeEditPart.VISUAL_ID:
case StereotypeEditPart.VISUAL_ID:
+ case ClassEditPart.VISUAL_ID:
case CommentEditPart.VISUAL_ID:
case ConstraintEditPart.VISUAL_ID:
case ModelEditPartTN.VISUAL_ID:
@@ -294,6 +293,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
case ConstraintEditPartCN.VISUAL_ID:
case MetaclassEditPart.VISUAL_ID:
case PrimitiveTypeEditPart.VISUAL_ID:
+ case ClassEditPartCN.VISUAL_ID:
case ModelEditPartCN.VISUAL_ID:
case ProfileEditPartCN.VISUAL_ID:
case EnumerationEditPartCN.VISUAL_ID:
@@ -307,9 +307,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 || 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;
-
-
+ return DependencyNodeEditPart.VISUAL_ID == visualID || AssociationNodeEditPart.VISUAL_ID == visualID || StereotypeEditPart.VISUAL_ID == visualID || ClassEditPart.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 || ClassEditPartCN.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;
}
/**
@@ -344,7 +342,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
return true;
}
-
/**
* @generated
*/
@@ -376,6 +373,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
return createAssociation_2015(domainElement, containerView, index, persisted, preferencesHint);
case StereotypeEditPart.VISUAL_ID:
return createStereotype_1026(domainElement, containerView, index, persisted, preferencesHint);
+ case ClassEditPart.VISUAL_ID:
+ return createClass_2008(domainElement, containerView, index, persisted, preferencesHint);
case MetaclassEditPart.VISUAL_ID:
return createClass_1031(domainElement, containerView, index, persisted, preferencesHint);
case CommentEditPart.VISUAL_ID:
@@ -410,6 +409,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
return createOperation_3020(domainElement, containerView, index, persisted, preferencesHint);
case StereotypeEditPartCN.VISUAL_ID:
return createStereotype_1023(domainElement, containerView, index, persisted, preferencesHint);
+ case ClassEditPartCN.VISUAL_ID:
+ return createClass_3010(domainElement, containerView, index, persisted, preferencesHint);
case MetaclassEditPartCN.VISUAL_ID:
return createClass_3028(domainElement, containerView, index, persisted, preferencesHint);
case CommentEditPartCN.VISUAL_ID:
@@ -471,9 +472,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* @generated
*/
public Node createDependency_2014(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Node node = NotationFactory.eINSTANCE.createNode();
- node.getStyles().add(NotationFactory.eINSTANCE.createDescriptionStyle());
- node.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(DependencyNodeEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -494,9 +493,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* @generated
*/
public Node createAssociation_2015(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Node node = NotationFactory.eINSTANCE.createNode();
- node.getStyles().add(NotationFactory.eINSTANCE.createDescriptionStyle());
- node.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(AssociationNodeEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -520,7 +517,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Stereotype");
Node label1034 = createLabel(node, UMLVisualIDRegistry.getType(StereotypeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(StereotypeAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
@@ -532,6 +528,26 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
+ public Node createClass_2008(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ stampShortcut(containerView, node);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Class");
+ Node label5029 = createLabel(node, UMLVisualIDRegistry.getType(ClassNameEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(ClassOperationCompartmentEditPart.VISUAL_ID), true, true, true, true);
+ createCompartment(node, UMLVisualIDRegistry.getType(ClassAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Class");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
public Node createClass_1031(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
@@ -541,7 +557,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Metaclass");
Node label1084 = createLabel(node, UMLVisualIDRegistry.getType(MetaclassNameEditPart.VISUAL_ID));
return node;
@@ -559,7 +574,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Comment");
Node label3 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyEditPart.VISUAL_ID));
return node;
@@ -577,7 +591,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
Node label1015 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID));
Node label5063 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintBodyEditPart.VISUAL_ID));
@@ -596,7 +609,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Model");
Node label5020 = createLabel(node, UMLVisualIDRegistry.getType(ModelNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ModelPackageableElementCompartmentEditPartTN.VISUAL_ID), false, true, false, false);
@@ -616,7 +628,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Profile");
Node label1047 = createLabel(node, UMLVisualIDRegistry.getType(ProfileNameEditPartTN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ProfilePackageableElementCompartmentEditPartTN.VISUAL_ID), false, true, false, false);
@@ -636,7 +647,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Package");
Node label5026 = createLabel(node, UMLVisualIDRegistry.getType(PackageNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(PackagePackageableElementCompartmentEditPart.VISUAL_ID), false, true, false, false);
@@ -656,7 +666,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Enumeration");
Node label5023 = createLabel(node, UMLVisualIDRegistry.getType(EnumerationNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID), true, true, true, true);
@@ -676,7 +685,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "PrimitiveType");
Node label5032 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPart.VISUAL_ID));
return node;
@@ -694,7 +702,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DataType");
Node label5035 = createLabel(node, UMLVisualIDRegistry.getType(DataTypeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(DataTypeAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
@@ -715,7 +722,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ShortCutDiagram");
Node label2 = createLabel(node, UMLVisualIDRegistry.getType(DiagramNameEditPart.VISUAL_ID));
label2.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
@@ -736,7 +742,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "PrimitiveType");
Node label5058 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPartCN.VISUAL_ID));
return node;
@@ -751,7 +756,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(DataTypeOperationEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Operation");
return node;
@@ -766,7 +770,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(EnumerationLiteralEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "EnumerationLiteral");
return node;
@@ -781,7 +784,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(DataTypePropertyEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Property");
return node;
@@ -796,7 +798,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(ClassPropertyEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Property");
return node;
@@ -811,7 +812,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setType(UMLVisualIDRegistry.getType(ClassOperationEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Operation");
return node;
@@ -828,7 +828,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Stereotype");
Node label1046 = createLabel(node, UMLVisualIDRegistry.getType(StereotypeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(StereotypeAttributeCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
@@ -840,6 +839,25 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
+ public Node createClass_3010(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ClassEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Class");
+ Node label5014 = createLabel(node, UMLVisualIDRegistry.getType(ClassNameEditPartCN.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(ClassAttributeCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
+ createCompartment(node, UMLVisualIDRegistry.getType(ClassOperationCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Class");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
public Node createClass_3028(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
@@ -848,7 +866,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Metaclass");
Node label5062 = createLabel(node, UMLVisualIDRegistry.getType(MetaclassNameEditPartCN.VISUAL_ID));
return node;
@@ -865,7 +882,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Comment");
Node label1008 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyEditPartCN.VISUAL_ID));
return node;
@@ -882,7 +898,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Model");
Node label1056 = createLabel(node, UMLVisualIDRegistry.getType(ModelNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ModelPackageableElementCompartmentEditPartCN.VISUAL_ID), false, true, false, false);
@@ -901,7 +916,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Profile");
Node label1050 = createLabel(node, UMLVisualIDRegistry.getType(ProfileNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ProfilePackageableElementCompartmentEditPartCN.VISUAL_ID), false, true, false, false);
@@ -920,7 +934,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Package");
Node label1010 = createLabel(node, UMLVisualIDRegistry.getType(PackageNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(PackagePackageableElementCompartmentEditPartCN.VISUAL_ID), false, true, false, false);
@@ -939,7 +952,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
Node label1059 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPartCN.VISUAL_ID));
Node label5064 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintBodyEditPartCN.VISUAL_ID));
@@ -957,7 +969,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Enumeration");
Node label5055 = createLabel(node, UMLVisualIDRegistry.getType(EnumerationNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
@@ -976,7 +987,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DataType");
Node label5061 = createLabel(node, UMLVisualIDRegistry.getType(DataTypeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(DataTypeAttributeCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
@@ -1002,13 +1012,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Extension");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -1029,7 +1037,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Association");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -1065,7 +1072,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
Location location6034 = (Location)label6034.getLayoutConstraint();
location6034.setX(0);
location6034.setY(-20);
-
PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "Association");
return edge;
}
@@ -1087,13 +1093,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ProfileApplication");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -1114,7 +1118,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "AssociationBranch");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -1130,7 +1133,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
Location location6035 = (Location)label6035.getLayoutConstraint();
location6035.setX(0);
location6035.setY(20);
-
return edge;
}
@@ -1151,7 +1153,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Generalization");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -1162,7 +1163,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
Location location6007 = (Location)label6007.getLayoutConstraint();
location6007.setX(0);
location6007.setY(60);
-
PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "Generalization");
return edge;
}
@@ -1184,7 +1184,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Dependency");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -1200,7 +1199,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
Location location6027 = (Location)label6027.getLayoutConstraint();
location6027.setX(0);
location6027.setY(60);
-
PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "Dependency");
return edge;
}
@@ -1222,13 +1220,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Dependency");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -1249,7 +1245,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ElementImport");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -1265,7 +1260,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
Location location6021 = (Location)label6021.getLayoutConstraint();
location6021.setX(0);
location6021.setY(60);
-
PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "ElementImport");
return edge;
}
@@ -1287,7 +1281,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "PackageImport");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -1298,7 +1291,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
Location location6022 = (Location)label6022.getLayoutConstraint();
location6022.setX(0);
location6022.setY(60);
-
PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "PackageImport");
return edge;
}
@@ -1320,12 +1312,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -1346,12 +1336,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -1372,12 +1360,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -1416,9 +1402,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
} else {
rv = NotationFactory.eINSTANCE.createDecorationNode();
}
-
rv.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
-
if(hasTitle) {
TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle();
rv.getStyles().add(ts);
@@ -1464,7 +1448,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
private void initFontStyleFromPrefs(View view, final IPreferenceStore store, String elementName) {
String fontConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.FONT);
String fontColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FONT);
-
FontStyle viewFontStyle = (FontStyle)view.getStyle(NotationPackage.Literals.FONT_STYLE);
if(viewFontStyle != null) {
FontData fontData = PreferenceConverter.getFontData(store, fontConstant);
@@ -1472,7 +1455,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
viewFontStyle.setFontHeight(fontData.getHeight());
viewFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
viewFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
-
org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(store, fontColorConstant);
viewFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
}
@@ -1494,22 +1476,14 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
String fillColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FILL);
String gradientColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_GRADIENT);
String gradientPolicyConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.GRADIENT_POLICY);
-
-
org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(store, fillColorConstant);
ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB));
-
-
FillStyle fillStyle = (FillStyle)view.getStyle(NotationPackage.Literals.FILL_STYLE);
- fillStyle.setFillColor(FigureUtilities.RGBToInteger(fillRGB).intValue());
-
- ;
+ fillStyle.setFillColor(FigureUtilities.RGBToInteger(fillRGB).intValue());;
if(store.getBoolean(gradientPolicyConstant)) {
GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(store.getString(gradientColorConstant));
fillStyle.setGradient(gradientPreferenceConverter.getGradientData());
fillStyle.setTransparency(gradientPreferenceConverter.getTransparency());
}
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLPropertySection.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLPropertySection.java
index 21c0e974da8..c33a5197ea4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLPropertySection.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLPropertySection.java
@@ -30,5 +30,4 @@ public class UMLPropertySection extends DefaultPropertySection implements IPrope
selected = /*super.*/transformSelectionToDomain(selected);
return selected;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLSheetLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLSheetLabelProvider.java
index 59de850a53c..b9b5ee0f2f7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLSheetLabelProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLSheetLabelProvider.java
@@ -87,5 +87,4 @@ public class UMLSheetLabelProvider extends BaseLabelProvider implements ILabelPr
}
return null;
}
-
}

Back to the top